OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_WIDGET_ROOT_VIEW_H_ | 5 #ifndef UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
6 #define UI_VIEWS_WIDGET_ROOT_VIEW_H_ | 6 #define UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual FocusSearch* GetFocusSearch() OVERRIDE; | 90 virtual FocusSearch* GetFocusSearch() OVERRIDE; |
91 virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE; | 91 virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE; |
92 virtual View* GetFocusTraversableParentView() OVERRIDE; | 92 virtual View* GetFocusTraversableParentView() OVERRIDE; |
93 | 93 |
94 // Overridden from View: | 94 // Overridden from View: |
95 virtual const Widget* GetWidget() const OVERRIDE; | 95 virtual const Widget* GetWidget() const OVERRIDE; |
96 virtual Widget* GetWidget() OVERRIDE; | 96 virtual Widget* GetWidget() OVERRIDE; |
97 virtual bool IsDrawn() const OVERRIDE; | 97 virtual bool IsDrawn() const OVERRIDE; |
98 virtual std::string GetClassName() const OVERRIDE; | 98 virtual std::string GetClassName() const OVERRIDE; |
99 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | 99 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; |
100 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 100 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
101 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 101 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
102 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 102 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
103 virtual void OnMouseCaptureLost() OVERRIDE; | 103 virtual void OnMouseCaptureLost() OVERRIDE; |
104 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; | 104 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; |
105 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; | 105 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
106 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; | 106 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; |
107 virtual bool OnScrollEvent(const ScrollEvent& event) OVERRIDE; | 107 virtual bool OnScrollEvent(const ScrollEvent& event) OVERRIDE; |
108 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event) OVERRIDE; | 108 virtual ui::TouchStatus OnTouchEvent(const TouchEvent& event) OVERRIDE; |
109 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE; | 109 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) OVERRIDE; |
110 virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE; | 110 virtual void SetMouseHandler(View* new_mouse_handler) OVERRIDE; |
111 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 111 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
112 virtual void ReorderChildLayers(ui::Layer* parent_layer) OVERRIDE; | 112 virtual void ReorderChildLayers(ui::Layer* parent_layer) OVERRIDE; |
113 | 113 |
114 protected: | 114 protected: |
115 // Overridden from View: | 115 // Overridden from View: |
116 virtual void ViewHierarchyChanged(bool is_add, View* parent, | 116 virtual void ViewHierarchyChanged(bool is_add, View* parent, |
117 View* child) OVERRIDE; | 117 View* child) OVERRIDE; |
118 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 118 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
119 virtual void CalculateOffsetToAncestorWithLayer( | 119 virtual void CalculateOffsetToAncestorWithLayer( |
120 gfx::Point* offset, | 120 gfx::Point* offset, |
121 ui::Layer** layer_parent) OVERRIDE; | 121 ui::Layer** layer_parent) OVERRIDE; |
122 | 122 |
123 private: | 123 private: |
124 friend class View; | 124 friend class View; |
125 friend class Widget; | 125 friend class Widget; |
126 | 126 |
127 // Input --------------------------------------------------------------------- | 127 // Input --------------------------------------------------------------------- |
128 | 128 |
129 // Update the cursor given a mouse event. This is called by non mouse_move | 129 // Update the cursor given a mouse event. This is called by non mouse_move |
130 // event handlers to honor the cursor desired by views located under the | 130 // event handlers to honor the cursor desired by views located under the |
131 // cursor during drag operations. The location of the mouse should be in the | 131 // cursor during drag operations. The location of the mouse should be in the |
132 // current coordinate system (i.e. any necessary transformation should be | 132 // current coordinate system (i.e. any necessary transformation should be |
133 // applied to the point prior to calling this). | 133 // applied to the point prior to calling this). |
134 void UpdateCursor(const MouseEvent& event); | 134 void UpdateCursor(const ui::MouseEvent& event); |
135 | 135 |
136 // Updates the last_mouse_* fields from e. The location of the mouse should be | 136 // Updates the last_mouse_* fields from e. The location of the mouse should be |
137 // in the current coordinate system (i.e. any necessary transformation should | 137 // in the current coordinate system (i.e. any necessary transformation should |
138 // be applied to the point prior to calling this). | 138 // be applied to the point prior to calling this). |
139 void SetMouseLocationAndFlags(const MouseEvent& event); | 139 void SetMouseLocationAndFlags(const ui::MouseEvent& event); |
140 | 140 |
141 ////////////////////////////////////////////////////////////////////////////// | 141 ////////////////////////////////////////////////////////////////////////////// |
142 | 142 |
143 // Tree operations ----------------------------------------------------------- | 143 // Tree operations ----------------------------------------------------------- |
144 | 144 |
145 // The host Widget | 145 // The host Widget |
146 Widget* widget_; | 146 Widget* widget_; |
147 | 147 |
148 // Input --------------------------------------------------------------------- | 148 // Input --------------------------------------------------------------------- |
149 | 149 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 // Tracks drag state for a view. | 197 // Tracks drag state for a view. |
198 View::DragInfo drag_info_; | 198 View::DragInfo drag_info_; |
199 | 199 |
200 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); | 200 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); |
201 }; | 201 }; |
202 | 202 |
203 } // namespace internal | 203 } // namespace internal |
204 } // namespace views | 204 } // namespace views |
205 | 205 |
206 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_ | 206 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
OLD | NEW |