OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_FOCUS_SEARCH_H_ | 5 #ifndef VIEWS_WIDGET_FOCUS_SEARCH_H_ |
6 #define VIEWS_WIDGET_FOCUS_SEARCH_H_ | 6 #define VIEWS_WIDGET_FOCUS_SEARCH_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 | 12 |
13 class FocusTraversable; | 13 class FocusTraversable; |
14 | 14 |
15 // FocusSearch is an object that implements the algorithm to find the | 15 // FocusSearch is an object that implements the algorithm to find the |
16 // next view to focus. | 16 // next view to focus. |
17 class VIEWS_API FocusSearch { | 17 class VIEWS_EXPORT FocusSearch { |
18 public: | 18 public: |
19 // The direction in which the focus traversal is going. | 19 // The direction in which the focus traversal is going. |
20 // TODO (jcampan): add support for lateral (left, right) focus traversal. The | 20 // TODO (jcampan): add support for lateral (left, right) focus traversal. The |
21 // goal is to switch to focusable views on the same level when using the arrow | 21 // goal is to switch to focusable views on the same level when using the arrow |
22 // keys (ala Windows: in a dialog box, arrow keys typically move between the | 22 // keys (ala Windows: in a dialog box, arrow keys typically move between the |
23 // dialog OK, Cancel buttons). | 23 // dialog OK, Cancel buttons). |
24 enum Direction { | 24 enum Direction { |
25 UP = 0, | 25 UP = 0, |
26 DOWN | 26 DOWN |
27 }; | 27 }; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 View* root_; | 113 View* root_; |
114 bool cycle_; | 114 bool cycle_; |
115 bool accessibility_mode_; | 115 bool accessibility_mode_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(FocusSearch); | 117 DISALLOW_COPY_AND_ASSIGN(FocusSearch); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace views | 120 } // namespace views |
121 | 121 |
122 #endif // VIEWS_WIDGET_FOCUS_SEARCH_H_ | 122 #endif // VIEWS_WIDGET_FOCUS_SEARCH_H_ |
OLD | NEW |