| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 317 |
| 318 // Sizes the window to the specified size and centerizes it. |
| 319 void CenterWindow(const gfx::Size& size); |
| 320 |
| 318 // Like SetBounds(), but ensures the Widget is fully visible on screen, | 321 // Like SetBounds(), but ensures the Widget is fully visible on screen, |
| 319 // resizing and/or repositioning as necessary. This is only useful for | 322 // resizing and/or repositioning as necessary. This is only useful for |
| 320 // non-child widgets. | 323 // non-child widgets. |
| 321 void SetBoundsConstrained(const gfx::Rect& bounds); | 324 void SetBoundsConstrained(const gfx::Rect& bounds); |
| 322 | 325 |
| 323 // Sets whether animations that occur when visibility is changed are enabled. | 326 // Sets whether animations that occur when visibility is changed are enabled. |
| 324 // Default is true. | 327 // Default is true. |
| 325 void SetVisibilityChangedAnimationsEnabled(bool value); | 328 void SetVisibilityChangedAnimationsEnabled(bool value); |
| 326 | 329 |
| 327 // Starts a nested message loop that moves the window. This can be used to | 330 // Starts a nested message loop that moves the window. This can be used to |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 // duplicate move events even though the mouse hasn't moved. | 774 // duplicate move events even though the mouse hasn't moved. |
| 772 bool last_mouse_event_was_move_; | 775 bool last_mouse_event_was_move_; |
| 773 gfx::Point last_mouse_event_position_; | 776 gfx::Point last_mouse_event_position_; |
| 774 | 777 |
| 775 DISALLOW_COPY_AND_ASSIGN(Widget); | 778 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 776 }; | 779 }; |
| 777 | 780 |
| 778 } // namespace views | 781 } // namespace views |
| 779 | 782 |
| 780 #endif // UI_VIEWS_WIDGET_WIDGET_H_ | 783 #endif // UI_VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |