| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ | 5 #ifndef UI_VIEWS_WIDGET_WIDGET_H_ |
| 6 #define UI_VIEWS_WIDGET_WIDGET_H_ | 6 #define UI_VIEWS_WIDGET_WIDGET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <stack> | 10 #include <stack> |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 // Returns the bounds of the Widget's client area in screen coordinates. | 308 // Returns the bounds of the Widget's client area in screen coordinates. |
| 309 gfx::Rect GetClientAreaScreenBounds() const; | 309 gfx::Rect GetClientAreaScreenBounds() const; |
| 310 | 310 |
| 311 // Retrieves the restored bounds for the window. | 311 // Retrieves the restored bounds for the window. |
| 312 gfx::Rect GetRestoredBounds() const; | 312 gfx::Rect GetRestoredBounds() const; |
| 313 | 313 |
| 314 // Sizes and/or places the widget to the specified bounds, size or position. | 314 // Sizes and/or places the widget to the specified bounds, size or position. |
| 315 void SetBounds(const gfx::Rect& bounds); | 315 void SetBounds(const gfx::Rect& bounds); |
| 316 void SetSize(const gfx::Size& size); | 316 void SetSize(const gfx::Size& size); |
| 317 void SetSizeAndCenterize(const gfx::Size& size); |
| 317 | 318 |
| 318 // Like SetBounds(), but ensures the Widget is fully visible on screen, | 319 // Like SetBounds(), but ensures the Widget is fully visible on screen, |
| 319 // resizing and/or repositioning as necessary. This is only useful for | 320 // resizing and/or repositioning as necessary. This is only useful for |
| 320 // non-child widgets. | 321 // non-child widgets. |
| 321 void SetBoundsConstrained(const gfx::Rect& bounds); | 322 void SetBoundsConstrained(const gfx::Rect& bounds); |
| 322 | 323 |
| 323 // Sets whether animations that occur when visibility is changed are enabled. | 324 // Sets whether animations that occur when visibility is changed are enabled. |
| 324 // Default is true. | 325 // Default is true. |
| 325 void SetVisibilityChangedAnimationsEnabled(bool value); | 326 void SetVisibilityChangedAnimationsEnabled(bool value); |
| 326 | 327 |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 // duplicate move events even though the mouse hasn't moved. | 772 // duplicate move events even though the mouse hasn't moved. |
| 772 bool last_mouse_event_was_move_; | 773 bool last_mouse_event_was_move_; |
| 773 gfx::Point last_mouse_event_position_; | 774 gfx::Point last_mouse_event_position_; |
| 774 | 775 |
| 775 DISALLOW_COPY_AND_ASSIGN(Widget); | 776 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 776 }; | 777 }; |
| 777 | 778 |
| 778 } // namespace views | 779 } // namespace views |
| 779 | 780 |
| 780 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 781 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |