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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 // Sets the controller, which may be null. TreeView does not take ownership | 101 // Sets the controller, which may be null. TreeView does not take ownership |
102 // of the controller. | 102 // of the controller. |
103 void SetController(TreeViewController* controller) { | 103 void SetController(TreeViewController* controller) { |
104 controller_ = controller; | 104 controller_ = controller; |
105 } | 105 } |
106 | 106 |
107 // View overrides: | 107 // View overrides: |
108 virtual void Layout() OVERRIDE; | 108 virtual void Layout() OVERRIDE; |
109 virtual gfx::Size GetPreferredSize() OVERRIDE; | 109 virtual gfx::Size GetPreferredSize() OVERRIDE; |
110 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 110 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
111 virtual void ShowContextMenu(const gfx::Point& p, | 111 virtual void ShowContextMenu(const gfx::Point& p, |
112 bool is_mouse_gesture) OVERRIDE; | 112 bool is_mouse_gesture) OVERRIDE; |
113 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 113 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
114 | 114 |
115 // TreeModelObserver overrides: | 115 // TreeModelObserver overrides: |
116 virtual void TreeNodesAdded(ui::TreeModel* model, | 116 virtual void TreeNodesAdded(ui::TreeModel* model, |
117 ui::TreeModelNode* parent, | 117 ui::TreeModelNode* parent, |
118 int start, | 118 int start, |
119 int count) OVERRIDE; | 119 int count) OVERRIDE; |
120 virtual void TreeNodesRemoved(ui::TreeModel* model, | 120 virtual void TreeNodesRemoved(ui::TreeModel* model, |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // Offset the text is drawn at. This accounts for the size of the expand | 359 // Offset the text is drawn at. This accounts for the size of the expand |
360 // control, icon and offsets. | 360 // control, icon and offsets. |
361 int text_offset_; | 361 int text_offset_; |
362 | 362 |
363 DISALLOW_COPY_AND_ASSIGN(TreeView); | 363 DISALLOW_COPY_AND_ASSIGN(TreeView); |
364 }; | 364 }; |
365 | 365 |
366 } // namespace views | 366 } // namespace views |
367 | 367 |
368 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 368 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
OLD | NEW |