Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ |
| 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ | 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 vr::Mat4f view_proj_matrix) const; | 108 vr::Mat4f view_proj_matrix) const; |
| 109 | 109 |
| 110 virtual void Initialize(); | 110 virtual void Initialize(); |
| 111 | 111 |
| 112 // Controller interaction methods. | 112 // Controller interaction methods. |
| 113 virtual void OnHoverEnter(gfx::PointF position); | 113 virtual void OnHoverEnter(gfx::PointF position); |
| 114 virtual void OnHoverLeave(); | 114 virtual void OnHoverLeave(); |
| 115 virtual void OnMove(gfx::PointF position); | 115 virtual void OnMove(gfx::PointF position); |
| 116 virtual void OnButtonDown(gfx::PointF position); | 116 virtual void OnButtonDown(gfx::PointF position); |
| 117 virtual void OnButtonUp(gfx::PointF position); | 117 virtual void OnButtonUp(gfx::PointF position); |
| 118 // Whether the point (relative to the origin of the element), should be | |
|
cjgrant
2017/05/15 16:55:09
- Typo at "by considered".
- What does "local" mea
mthiesse
2017/05/15 21:11:27
What typo?
Clarified the comment and got rid of t
cjgrant
2017/05/15 21:51:52
"All elements are by considered rectangular by def
mthiesse
2017/05/15 22:23:32
I do not see the the problem.
fixed ;)
| |
| 119 // considered on the element. All elements are by considered rectangular by | |
| 120 // default. Local points are mapped as follows, though will extend outside the | |
| 121 // rectangular bounds of the element: | |
| 122 // [(0.0, 0.0), (1.0, 0.0) | |
| 123 // (1.0, 0.0), (1.0, 1.0)] | |
| 124 virtual bool HitTest(gfx::PointF point) const; | |
| 118 | 125 |
| 119 int id() const { return id_; } | 126 int id() const { return id_; } |
| 120 void set_id(int id) { id_ = id; } | 127 void set_id(int id) { id_ = id; } |
| 121 | 128 |
| 122 // If a non-negative parent ID is specified, applicable transformations | 129 // If a non-negative parent ID is specified, applicable transformations |
| 123 // are applied relative to the parent, rather than absolutely. | 130 // are applied relative to the parent, rather than absolutely. |
| 124 int parent_id() const { return parent_id_; } | 131 int parent_id() const { return parent_id_; } |
| 125 void set_parent_id(int id) { parent_id_ = id; } | 132 void set_parent_id(int id) { parent_id_ = id; } |
| 126 | 133 |
| 127 // If true, this object will be visible. | 134 // If true, this object will be visible. |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 bool dirty_ = false; | 299 bool dirty_ = false; |
| 293 | 300 |
| 294 Transform transform_; | 301 Transform transform_; |
| 295 | 302 |
| 296 DISALLOW_COPY_AND_ASSIGN(UiElement); | 303 DISALLOW_COPY_AND_ASSIGN(UiElement); |
| 297 }; | 304 }; |
| 298 | 305 |
| 299 } // namespace vr_shell | 306 } // namespace vr_shell |
| 300 | 307 |
| 301 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ | 308 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ |
| OLD | NEW |