| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 7 |
| 8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
| 9 | 9 |
| 10 class ThemeProvider; | 10 class ThemeProvider; |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 class Path; | 13 class Path; |
| 14 class Rect; | 14 class Rect; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 | 18 |
| 19 class Accelerator; | 19 class Accelerator; |
| 20 class FocusManager; | |
| 21 class RootView; | 20 class RootView; |
| 22 class TooltipManager; | 21 class TooltipManager; |
| 23 class Window; | 22 class Window; |
| 24 | 23 |
| 25 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
| 26 // | 25 // |
| 27 // Widget interface | 26 // Widget interface |
| 28 // | 27 // |
| 29 // Widget is an abstract class that defines the API that should be implemented | 28 // Widget is an abstract class that defines the API that should be implemented |
| 30 // by a native window in order to host a view hierarchy. | 29 // by a native window in order to host a view hierarchy. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Returns the accelerator given a command id. Returns false if there is | 98 // Returns the accelerator given a command id. Returns false if there is |
| 100 // no accelerator associated with a given id, which is a common condition. | 99 // no accelerator associated with a given id, which is a common condition. |
| 101 virtual bool GetAccelerator(int cmd_id, | 100 virtual bool GetAccelerator(int cmd_id, |
| 102 Accelerator* accelerator) = 0; | 101 Accelerator* accelerator) = 0; |
| 103 | 102 |
| 104 // Returns the Window containing this Widget, or NULL if not contained in a | 103 // Returns the Window containing this Widget, or NULL if not contained in a |
| 105 // window. | 104 // window. |
| 106 virtual Window* GetWindow() { return NULL; } | 105 virtual Window* GetWindow() { return NULL; } |
| 107 virtual const Window* GetWindow() const { return NULL; } | 106 virtual const Window* GetWindow() const { return NULL; } |
| 108 | 107 |
| 109 // Gets the theme provider. | 108 // Get the theme provider. |
| 110 virtual ThemeProvider* GetThemeProvider() const { return NULL; } | 109 virtual ThemeProvider* GetThemeProvider() const { return NULL; } |
| 111 | 110 |
| 112 // Gets the default theme provider; this is necessary for when a widget has | 111 // Get the default theme provider; this is necessary for when a widget has |
| 113 // no profile (and ThemeProvider) associated with it. The default theme | 112 // no profile (and ThemeProvider) associated with it. The default theme |
| 114 // provider provides a default set of bitmaps that such widgets can use. | 113 // provider provides a default set of bitmaps that such widgets can use. |
| 115 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; } | 114 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; } |
| 116 | |
| 117 // Returns the FocusManager for this widget. | |
| 118 // Note that all widgets in a widget hierarchy share the same focus manager. | |
| 119 virtual FocusManager* GetFocusManager() { return NULL; } | |
| 120 }; | 115 }; |
| 121 | 116 |
| 122 } // namespace views | 117 } // namespace views |
| 123 | 118 |
| 124 #endif // VIEWS_WIDGET_WIDGET_H_ | 119 #endif // VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |