| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 menus::Accelerator* accelerator) = 0; | 200 menus::Accelerator* accelerator) = 0; |
| 201 | 201 |
| 202 // Returns the Window containing this Widget, or NULL if not contained in a | 202 // Returns the Window containing this Widget, or NULL if not contained in a |
| 203 // window. | 203 // window. |
| 204 virtual Window* GetWindow() = 0; | 204 virtual Window* GetWindow() = 0; |
| 205 virtual const Window* GetWindow() const = 0; | 205 virtual const Window* GetWindow() const = 0; |
| 206 | 206 |
| 207 // Sets/Gets a native window property on the underlying native window object. | 207 // Sets/Gets a native window property on the underlying native window object. |
| 208 // Returns NULL if the property does not exist. Setting the property value to | 208 // Returns NULL if the property does not exist. Setting the property value to |
| 209 // NULL removes the property. | 209 // NULL removes the property. |
| 210 virtual void SetNativeWindowProperty(const std::wstring& name, | 210 virtual void SetNativeWindowProperty(const char* name, void* value) = 0; |
| 211 void* value) = 0; | 211 virtual void* GetNativeWindowProperty(const char* name) = 0; |
| 212 virtual void* GetNativeWindowProperty(const std::wstring& name) = 0; | |
| 213 | 212 |
| 214 // Gets the theme provider. | 213 // Gets the theme provider. |
| 215 virtual ThemeProvider* GetThemeProvider() const = 0; | 214 virtual ThemeProvider* GetThemeProvider() const = 0; |
| 216 | 215 |
| 217 // Gets the default theme provider; this is necessary for when a widget has | 216 // Gets the default theme provider; this is necessary for when a widget has |
| 218 // no profile (and ThemeProvider) associated with it. The default theme | 217 // no profile (and ThemeProvider) associated with it. The default theme |
| 219 // provider provides a default set of bitmaps that such widgets can use. | 218 // provider provides a default set of bitmaps that such widgets can use. |
| 220 virtual ThemeProvider* GetDefaultThemeProvider() const = 0; | 219 virtual ThemeProvider* GetDefaultThemeProvider() const = 0; |
| 221 | 220 |
| 222 // Returns the FocusManager for this widget. | 221 // Returns the FocusManager for this widget. |
| 223 // Note that all widgets in a widget hierarchy share the same focus manager. | 222 // Note that all widgets in a widget hierarchy share the same focus manager. |
| 224 virtual FocusManager* GetFocusManager() = 0; | 223 virtual FocusManager* GetFocusManager() = 0; |
| 225 | 224 |
| 226 // Forwarded from the RootView so that the widget can do any cleanup. | 225 // Forwarded from the RootView so that the widget can do any cleanup. |
| 227 virtual void ViewHierarchyChanged(bool is_add, View *parent, | 226 virtual void ViewHierarchyChanged(bool is_add, View *parent, |
| 228 View *child) = 0; | 227 View *child) = 0; |
| 229 | 228 |
| 230 // Returns true if the native view |native_view| is contained in the | 229 // Returns true if the native view |native_view| is contained in the |
| 231 // views::View hierarchy rooted at this widget. | 230 // views::View hierarchy rooted at this widget. |
| 232 virtual bool ContainsNativeView(gfx::NativeView native_view) = 0; | 231 virtual bool ContainsNativeView(gfx::NativeView native_view) = 0; |
| 233 }; | 232 }; |
| 234 | 233 |
| 235 } // namespace views | 234 } // namespace views |
| 236 | 235 |
| 237 #endif // VIEWS_WIDGET_WIDGET_H_ | 236 #endif // VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |