| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 // Controller interaction methods. | 107 // Controller interaction methods. |
| 108 virtual void OnHoverEnter(); | 108 virtual void OnHoverEnter(); |
| 109 virtual void OnHoverLeave(); | 109 virtual void OnHoverLeave(); |
| 110 virtual void OnButtonDown(); | 110 virtual void OnButtonDown(); |
| 111 virtual void OnButtonUp(); | 111 virtual void OnButtonUp(); |
| 112 | 112 |
| 113 // Valid IDs are non-negative. | 113 // Valid IDs are non-negative. |
| 114 int id = -1; | 114 int id = -1; |
| 115 | 115 |
| 116 // Name string for debugging and testing purposes. | |
| 117 std::string name; | |
| 118 | |
| 119 // If a non-negative parent ID is specified, applicable transformations | 116 // If a non-negative parent ID is specified, applicable transformations |
| 120 // are applied relative to the parent, rather than absolutely. | 117 // are applied relative to the parent, rather than absolutely. |
| 121 int parent_id = -1; | 118 int parent_id = -1; |
| 122 | 119 |
| 123 // If true, this object will be visible. | 120 // If true, this object will be visible. |
| 124 bool visible = true; | 121 bool visible = true; |
| 125 | 122 |
| 126 // If false, the reticle will not hit the element, even if visible. | 123 // If false, the reticle will not hit the element, even if visible. |
| 127 bool hit_testable = true; | 124 bool hit_testable = true; |
| 128 | 125 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // A flag usable during transformation calculates to avoid duplicate work. | 173 // A flag usable during transformation calculates to avoid duplicate work. |
| 177 bool dirty; | 174 bool dirty; |
| 178 | 175 |
| 179 private: | 176 private: |
| 180 DISALLOW_COPY_AND_ASSIGN(UiElement); | 177 DISALLOW_COPY_AND_ASSIGN(UiElement); |
| 181 }; | 178 }; |
| 182 | 179 |
| 183 } // namespace vr_shell | 180 } // namespace vr_shell |
| 184 | 181 |
| 185 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ | 182 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_UI_ELEMENTS_UI_ELEMENT_H_ |
| OLD | NEW |