| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 321 // any code that expects it to be valid beyond this call. | 321 // any code that expects it to be valid beyond this call. |
| 322 void CloseNow(); | 322 void CloseNow(); |
| 323 | 323 |
| 324 // Toggles the enable state for the Close button (and the Close menu item in | |
| 325 // the system menu). | |
| 326 void EnableClose(bool enable); | |
| 327 | |
| 328 // Shows or hides the widget, without changing activation state. | 324 // Shows or hides the widget, without changing activation state. |
| 329 virtual void Show(); | 325 virtual void Show(); |
| 330 void Hide(); | 326 void Hide(); |
| 331 | 327 |
| 332 // Like Show(), but does not activate the window. | 328 // Like Show(), but does not activate the window. |
| 333 void ShowInactive(); | 329 void ShowInactive(); |
| 334 | 330 |
| 335 // Activates the widget, assuming it already exists and is visible. | 331 // Activates the widget, assuming it already exists and is visible. |
| 336 void Activate(); | 332 void Activate(); |
| 337 | 333 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 // duplicate move events even though the mouse hasn't moved. | 733 // duplicate move events even though the mouse hasn't moved. |
| 738 bool last_mouse_event_was_move_; | 734 bool last_mouse_event_was_move_; |
| 739 gfx::Point last_mouse_event_position_; | 735 gfx::Point last_mouse_event_position_; |
| 740 | 736 |
| 741 DISALLOW_COPY_AND_ASSIGN(Widget); | 737 DISALLOW_COPY_AND_ASSIGN(Widget); |
| 742 }; | 738 }; |
| 743 | 739 |
| 744 } // namespace views | 740 } // namespace views |
| 745 | 741 |
| 746 #endif // VIEWS_WIDGET_WIDGET_H_ | 742 #endif // VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |