| 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 char* name, void* value) = 0; | 210 virtual void SetNativeWindowProperty(const std::wstring& name, |
| 211 virtual void* GetNativeWindowProperty(const char* name) = 0; | 211 void* value) = 0; |
| 212 virtual void* GetNativeWindowProperty(const std::wstring& name) = 0; |
| 212 | 213 |
| 213 // Gets the theme provider. | 214 // Gets the theme provider. |
| 214 virtual ThemeProvider* GetThemeProvider() const = 0; | 215 virtual ThemeProvider* GetThemeProvider() const = 0; |
| 215 | 216 |
| 216 // Gets the default theme provider; this is necessary for when a widget has | 217 // Gets the default theme provider; this is necessary for when a widget has |
| 217 // no profile (and ThemeProvider) associated with it. The default theme | 218 // no profile (and ThemeProvider) associated with it. The default theme |
| 218 // provider provides a default set of bitmaps that such widgets can use. | 219 // provider provides a default set of bitmaps that such widgets can use. |
| 219 virtual ThemeProvider* GetDefaultThemeProvider() const = 0; | 220 virtual ThemeProvider* GetDefaultThemeProvider() const = 0; |
| 220 | 221 |
| 221 // Returns the FocusManager for this widget. | 222 // Returns the FocusManager for this widget. |
| 222 // Note that all widgets in a widget hierarchy share the same focus manager. | 223 // Note that all widgets in a widget hierarchy share the same focus manager. |
| 223 virtual FocusManager* GetFocusManager() = 0; | 224 virtual FocusManager* GetFocusManager() = 0; |
| 224 | 225 |
| 225 // Forwarded from the RootView so that the widget can do any cleanup. | 226 // Forwarded from the RootView so that the widget can do any cleanup. |
| 226 virtual void ViewHierarchyChanged(bool is_add, View *parent, | 227 virtual void ViewHierarchyChanged(bool is_add, View *parent, |
| 227 View *child) = 0; | 228 View *child) = 0; |
| 228 | 229 |
| 229 // Returns true if the native view |native_view| is contained in the | 230 // Returns true if the native view |native_view| is contained in the |
| 230 // views::View hierarchy rooted at this widget. | 231 // views::View hierarchy rooted at this widget. |
| 231 virtual bool ContainsNativeView(gfx::NativeView native_view) = 0; | 232 virtual bool ContainsNativeView(gfx::NativeView native_view) = 0; |
| 232 }; | 233 }; |
| 233 | 234 |
| 234 } // namespace views | 235 } // namespace views |
| 235 | 236 |
| 236 #endif // VIEWS_WIDGET_WIDGET_H_ | 237 #endif // VIEWS_WIDGET_WIDGET_H_ |
| OLD | NEW |