Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: views/widget/widget.h

Issue 42490: Experiments with a new tabstrip + animator (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « views/views.gyp ('k') | views/widget/widget_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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; 20 class FocusManager;
21 class RootView; 21 class RootView;
22 class TooltipManager; 22 class TooltipManager;
23 class View;
23 class Window; 24 class Window;
24 25
25 //////////////////////////////////////////////////////////////////////////////// 26 ////////////////////////////////////////////////////////////////////////////////
26 // 27 //
27 // Widget interface 28 // Widget interface
28 // 29 //
29 // Widget is an abstract class that defines the API that should be implemented 30 // 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. 31 // by a native window in order to host a view hierarchy.
31 // 32 //
32 // Widget wraps a hierarchy of View objects (see view.h) that implement 33 // Widget wraps a hierarchy of View objects (see view.h) that implement
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 90
90 // Returns whether the Widget is the currently active window. 91 // Returns whether the Widget is the currently active window.
91 virtual bool IsActive() const = 0; 92 virtual bool IsActive() const = 0;
92 93
93 // Returns the TooltipManager for this Widget. If this Widget does not support 94 // Returns the TooltipManager for this Widget. If this Widget does not support
94 // tooltips, NULL is returned. 95 // tooltips, NULL is returned.
95 virtual TooltipManager* GetTooltipManager() { 96 virtual TooltipManager* GetTooltipManager() {
96 return NULL; 97 return NULL;
97 } 98 }
98 99
100 // Starts a drag operation for the specified view. |point| is a position in
101 // |view| coordinates that the drag was initiated from.
102 virtual void GenerateMousePressedForView(View* view,
103 const gfx::Point& point) = 0;
104
99 // Returns the accelerator given a command id. Returns false if there is 105 // 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. 106 // no accelerator associated with a given id, which is a common condition.
101 virtual bool GetAccelerator(int cmd_id, 107 virtual bool GetAccelerator(int cmd_id,
102 Accelerator* accelerator) = 0; 108 Accelerator* accelerator) = 0;
103 109
104 // Returns the Window containing this Widget, or NULL if not contained in a 110 // Returns the Window containing this Widget, or NULL if not contained in a
105 // window. 111 // window.
106 virtual Window* GetWindow() { return NULL; } 112 virtual Window* GetWindow() { return NULL; }
107 virtual const Window* GetWindow() const { return NULL; } 113 virtual const Window* GetWindow() const { return NULL; }
108 114
109 // Gets the theme provider. 115 // Gets the theme provider.
110 virtual ThemeProvider* GetThemeProvider() const { return NULL; } 116 virtual ThemeProvider* GetThemeProvider() const { return NULL; }
111 117
112 // Gets the default theme provider; this is necessary for when a widget has 118 // Gets the default theme provider; this is necessary for when a widget has
113 // no profile (and ThemeProvider) associated with it. The default theme 119 // no profile (and ThemeProvider) associated with it. The default theme
114 // provider provides a default set of bitmaps that such widgets can use. 120 // provider provides a default set of bitmaps that such widgets can use.
115 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; } 121 virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; }
116 122
117 // Returns the FocusManager for this widget. 123 // Returns the FocusManager for this widget.
118 // Note that all widgets in a widget hierarchy share the same focus manager. 124 // Note that all widgets in a widget hierarchy share the same focus manager.
119 virtual FocusManager* GetFocusManager() { return NULL; } 125 virtual FocusManager* GetFocusManager() { return NULL; }
120 }; 126 };
121 127
122 } // namespace views 128 } // namespace views
123 129
124 #endif // VIEWS_WIDGET_WIDGET_H_ 130 #endif // VIEWS_WIDGET_WIDGET_H_
OLDNEW
« no previous file with comments | « views/views.gyp ('k') | views/widget/widget_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698