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

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

Issue 114054: Splits TooltipManager so that it can be ported and stubs out the GTK... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « views/widget/tooltip_manager_win.cc ('k') | views/widget/widget_gtk.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_H_ 5 #ifndef VIEWS_WIDGET_WIDGET_GTK_H_
6 #define VIEWS_WIDGET_WIDGET_GTK_H_ 6 #define VIEWS_WIDGET_WIDGET_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "views/widget/widget.h" 11 #include "views/widget/widget.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Rect; 14 class Rect;
15 } 15 }
16 16
17 namespace views { 17 namespace views {
18 18
19 class TooltipManagerGtk;
19 class View; 20 class View;
20 class WindowGtk; 21 class WindowGtk;
21 22
22 // Widget implementation for GTK. 23 // Widget implementation for GTK.
23 class WidgetGtk : public Widget, public MessageLoopForUI::Observer { 24 class WidgetGtk : public Widget, public MessageLoopForUI::Observer {
24 public: 25 public:
25 // Type of widget. 26 // Type of widget.
26 enum Type { 27 enum Type {
27 // Used for popup type windows (bubbles, menus ...). 28 // Used for popup type windows (bubbles, menus ...).
28 TYPE_POPUP, 29 TYPE_POPUP,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 166
166 // Our native views. If we're a window/popup, then widget_ is the window and 167 // Our native views. If we're a window/popup, then widget_ is the window and
167 // child_widget_parent_ is a GtkFixed. If we're not a window/popup, then 168 // child_widget_parent_ is a GtkFixed. If we're not a window/popup, then
168 // widget_ and child_widget_parent_ are a GtkFixed. 169 // widget_ and child_widget_parent_ are a GtkFixed.
169 GtkWidget* widget_; 170 GtkWidget* widget_;
170 GtkWidget* child_widget_parent_; 171 GtkWidget* child_widget_parent_;
171 172
172 // The root of the View hierarchy attached to this window. 173 // The root of the View hierarchy attached to this window.
173 scoped_ptr<RootView> root_view_; 174 scoped_ptr<RootView> root_view_;
174 175
176 scoped_ptr<TooltipManagerGtk> tooltip_manager_;
177
175 // If true, the mouse is currently down. 178 // If true, the mouse is currently down.
176 bool is_mouse_down_; 179 bool is_mouse_down_;
177 180
178 // Have we done a mouse grab? 181 // Have we done a mouse grab?
179 bool has_capture_; 182 bool has_capture_;
180 183
181 // The following are used to detect duplicate mouse move events and not 184 // The following are used to detect duplicate mouse move events and not
182 // deliver them. Displaying a window may result in the system generating 185 // deliver them. Displaying a window may result in the system generating
183 // duplicate move events even though the mouse hasn't moved. 186 // duplicate move events even though the mouse hasn't moved.
184 187
185 // If true, the last event was a mouse move event. 188 // If true, the last event was a mouse move event.
186 bool last_mouse_event_was_move_; 189 bool last_mouse_event_was_move_;
187 190
188 // Coordinates of the last mouse move event, in screen coordinates. 191 // Coordinates of the last mouse move event, in screen coordinates.
189 int last_mouse_move_x_; 192 int last_mouse_move_x_;
190 int last_mouse_move_y_; 193 int last_mouse_move_y_;
191 194
192 // The following factory is used to delay destruction. 195 // The following factory is used to delay destruction.
193 ScopedRunnableMethodFactory<WidgetGtk> close_widget_factory_; 196 ScopedRunnableMethodFactory<WidgetGtk> close_widget_factory_;
194 197
195 // See description above setter. 198 // See description above setter.
196 bool delete_on_destroy_; 199 bool delete_on_destroy_;
197 200
198 DISALLOW_COPY_AND_ASSIGN(WidgetGtk); 201 DISALLOW_COPY_AND_ASSIGN(WidgetGtk);
199 }; 202 };
200 203
201 } // namespace views 204 } // namespace views
202 205
203 #endif // VIEWS_WIDGET_WIDGET_GTK_H_ 206 #endif // VIEWS_WIDGET_WIDGET_GTK_H_
OLDNEW
« no previous file with comments | « views/widget/tooltip_manager_win.cc ('k') | views/widget/widget_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698