| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_WIDGET_WIDGET_H_ | 5 #ifndef VIEWS_WIDGET_WIDGET_H_ |
| 6 #define VIEWS_WIDGET_WIDGET_H_ | 6 #define 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // Sizes and/or places the widget to the specified bounds, size or position. | 298 // Sizes and/or places the widget to the specified bounds, size or position. |
| 299 void SetBounds(const gfx::Rect& bounds); | 299 void SetBounds(const gfx::Rect& bounds); |
| 300 void SetSize(const gfx::Size& size); | 300 void SetSize(const gfx::Size& size); |
| 301 | 301 |
| 302 // Like SetBounds(), but ensures the Widget is fully visible on screen, | 302 // Like SetBounds(), but ensures the Widget is fully visible on screen, |
| 303 // resizing and/or repositioning as necessary. This is only useful for | 303 // resizing and/or repositioning as necessary. This is only useful for |
| 304 // non-child widgets. | 304 // non-child widgets. |
| 305 void SetBoundsConstrained(const gfx::Rect& bounds); | 305 void SetBoundsConstrained(const gfx::Rect& bounds); |
| 306 | 306 |
| 307 // Places the widget in front of the specified widget in z-order. | 307 // Places the widget in front of the specified widget in z-order. |
| 308 void MoveAboveWidget(Widget* widget); | 308 void StackAboveWidget(Widget* widget); |
| 309 void MoveAbove(gfx::NativeView native_view); | 309 void StackAbove(gfx::NativeView native_view); |
| 310 void MoveToTop(); | 310 void StackAtTop(); |
| 311 | 311 |
| 312 // Sets a shape on the widget. This takes ownership of shape. | 312 // Sets a shape on the widget. This takes ownership of shape. |
| 313 void SetShape(gfx::NativeRegion shape); | 313 void SetShape(gfx::NativeRegion shape); |
| 314 | 314 |
| 315 // Hides the widget then closes it after a return to the message loop. | 315 // Hides the widget then closes it after a return to the message loop. |
| 316 virtual void Close(); | 316 virtual void Close(); |
| 317 | 317 |
| 318 // TODO(beng): Move off public API. | 318 // TODO(beng): Move off public API. |
| 319 // Closes the widget immediately. Compare to |Close|. This will destroy the | 319 // Closes the widget immediately. Compare to |Close|. This will destroy the |
| 320 // window handle associated with this Widget, so should not be called from | 320 // window handle associated with this Widget, so should not be called from |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 // duplicate move events even though the mouse hasn't moved. | 737 // duplicate move events even though the mouse hasn't moved. |
| 738 bool last_mouse_event_was_move_; | 738 bool last_mouse_event_was_move_; |
| 739 gfx::Point last_mouse_event_position_; | 739 gfx::Point last_mouse_event_position_; |
| 740 | 740 |
| 741 DISALLOW_COPY_AND_ASSIGN(Widget); | 741 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 742 }; | 742 }; |
| 743 | 743 |
| 744 } // namespace views | 744 } // namespace views |
| 745 | 745 |
| 746 #endif // VIEWS_WIDGET_WIDGET_H_ | 746 #endif // VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |