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 <stack> | 9 #include <stack> |
10 | 10 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // Like SetBounds(), but ensures the Widget is fully visible within the bounds | 255 // Like SetBounds(), but ensures the Widget is fully visible within the bounds |
256 // of its parent. If the Widget has no parent, it is centered within the | 256 // of its parent. If the Widget has no parent, it is centered within the |
257 // bounds of its screen if it is visible, or |other_widget|'s screen if it is | 257 // bounds of its screen if it is visible, or |other_widget|'s screen if it is |
258 // not. | 258 // not. |
259 void SetBoundsConstrained(const gfx::Rect& bounds, | 259 void SetBoundsConstrained(const gfx::Rect& bounds, |
260 Widget* other_widget); | 260 Widget* other_widget); |
261 | 261 |
262 // Places the widget in front of the specified widget in z-order. | 262 // Places the widget in front of the specified widget in z-order. |
263 void MoveAboveWidget(Widget* widget); | 263 void MoveAboveWidget(Widget* widget); |
264 void MoveAbove(gfx::NativeView native_view); | 264 void MoveAbove(gfx::NativeView native_view); |
| 265 void MoveToTop(); |
265 | 266 |
266 // Sets a shape on the widget. This takes ownership of shape. | 267 // Sets a shape on the widget. This takes ownership of shape. |
267 void SetShape(gfx::NativeRegion shape); | 268 void SetShape(gfx::NativeRegion shape); |
268 | 269 |
269 // Hides the widget then closes it after a return to the message loop. | 270 // Hides the widget then closes it after a return to the message loop. |
270 virtual void Close(); | 271 virtual void Close(); |
271 | 272 |
272 // TODO(beng): Move off public API. | 273 // TODO(beng): Move off public API. |
273 // Closes the widget immediately. Compare to |Close|. This will destroy the | 274 // Closes the widget immediately. Compare to |Close|. This will destroy the |
274 // window handle associated with this Widget, so should not be called from | 275 // window handle associated with this Widget, so should not be called from |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 | 613 |
613 // The smallest size the window can be. | 614 // The smallest size the window can be. |
614 gfx::Size minimum_size_; | 615 gfx::Size minimum_size_; |
615 | 616 |
616 DISALLOW_COPY_AND_ASSIGN(Widget); | 617 DISALLOW_COPY_AND_ASSIGN(Widget); |
617 }; | 618 }; |
618 | 619 |
619 } // namespace views | 620 } // namespace views |
620 | 621 |
621 #endif // VIEWS_WIDGET_WIDGET_H_ | 622 #endif // VIEWS_WIDGET_WIDGET_H_ |
OLD | NEW |