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

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

Issue 6286013: V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/root_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_WIDGET_ROOT_VIEW_H_
6 #define UI_VIEWS_WIDGET_ROOT_VIEW_H_
7 #pragma once
8
9 #include "ui/views/view.h"
10
11 namespace ui {
12 namespace internal {
13
14 ////////////////////////////////////////////////////////////////////////////////
15 // RootView class
16 //
17 // A View subclass that owns a View hierarchy. Used by the Widget to perform
18 // View-specific event tracking.
19 //
20 class RootView : public View {
21 public:
22 RootView(Widget* widget, View* contents_view);
23 virtual ~RootView();
24
25 // Overridden from View:
26 virtual void OnViewRemoved(View* parent, View* child);
27 virtual bool OnKeyPressed(const KeyEvent& event);
28 virtual bool OnKeyReleased(const KeyEvent& event);
29 virtual bool OnMouseWheel(const MouseWheelEvent& event);
30 virtual bool OnMousePressed(const MouseEvent& event);
31 virtual bool OnMouseDragged(const MouseEvent& event);
32 virtual void OnMouseReleased(const MouseEvent& event);
33 virtual void OnMouseCaptureLost();
34 virtual void OnMouseMoved(const MouseEvent& event);
35 virtual void OnMouseExited(const MouseEvent& event);
36 virtual void Paint(gfx::Canvas* canvas);
37 virtual void InvalidateRect(const gfx::Rect& invalid_rect);
38 virtual Widget* GetWidget() const;
39
40 private:
41 Widget* widget_;
42
43 // The View that the mouse was pressed down on. Used to track drag operations
44 // and to target mouse-released events at the correct view.
45 View* mouse_pressed_handler_;
46
47 // The View that the mouse is currently over. Used to track mouse-exited
48 // events as the mouse moves from view to view, and when the mouse leaves the
49 // bounds of the containing Widget.
50 View* mouse_move_handler_;
51
52 // State captured on mouse press that would be useful for a potential drag
53 // operation.
54 DragInfo drag_info_;
55
56 DISALLOW_COPY_AND_ASSIGN(RootView);
57 };
58
59 } // namespace internal
60 } // namespace ui
61
62 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | ui/views/widget/root_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698