| 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_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
| 6 #define UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 int* node_depth); | 329 int* node_depth); |
| 330 | 330 |
| 331 // Increments the selection. Invoked in response to up/down arrow. | 331 // Increments the selection. Invoked in response to up/down arrow. |
| 332 void IncrementSelection(IncrementType type); | 332 void IncrementSelection(IncrementType type); |
| 333 | 333 |
| 334 // If the current node is expanded, it's collapsed, otherwise selection is | 334 // If the current node is expanded, it's collapsed, otherwise selection is |
| 335 // moved to the parent. | 335 // moved to the parent. |
| 336 void CollapseOrSelectParent(); | 336 void CollapseOrSelectParent(); |
| 337 | 337 |
| 338 // If the selected node is collapsed, it's expanded. Otherwise the first child | 338 // If the selected node is collapsed, it's expanded. Otherwise the first child |
| 339 // is seleected. | 339 // is selected. |
| 340 void ExpandOrSelectChild(); | 340 void ExpandOrSelectChild(); |
| 341 | 341 |
| 342 // Implementation of Expand(). Returns true if at least one node was expanded | 342 // Implementation of Expand(). Returns true if at least one node was expanded |
| 343 // that previously wasn't. | 343 // that previously wasn't. |
| 344 bool ExpandImpl(ui::TreeModelNode* model_node); | 344 bool ExpandImpl(ui::TreeModelNode* model_node); |
| 345 | 345 |
| 346 PrefixSelector* GetPrefixSelector(); | 346 PrefixSelector* GetPrefixSelector(); |
| 347 | 347 |
| 348 // Returns whether |point| is in the bounds of |node|'s expand/collapse | 348 // Returns whether |point| is in the bounds of |node|'s expand/collapse |
| 349 // control. | 349 // control. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 int text_offset_; | 405 int text_offset_; |
| 406 | 406 |
| 407 std::unique_ptr<PrefixSelector> selector_; | 407 std::unique_ptr<PrefixSelector> selector_; |
| 408 | 408 |
| 409 DISALLOW_COPY_AND_ASSIGN(TreeView); | 409 DISALLOW_COPY_AND_ASSIGN(TreeView); |
| 410 }; | 410 }; |
| 411 | 411 |
| 412 } // namespace views | 412 } // namespace views |
| 413 | 413 |
| 414 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 414 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
| OLD | NEW |