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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 ui::MouseEvent& event) OVERRIDE; | 110 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
111 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 111 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
112 virtual void ShowContextMenu(const gfx::Point& p, | 112 virtual void ShowContextMenu(const gfx::Point& p, |
113 bool is_mouse_gesture) OVERRIDE; | 113 bool is_mouse_gesture) OVERRIDE; |
114 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 114 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
115 | 115 |
116 // TreeModelObserver overrides: | 116 // TreeModelObserver overrides: |
117 virtual void TreeNodesAdded(ui::TreeModel* model, | 117 virtual void TreeNodesAdded(ui::TreeModel* model, |
118 ui::TreeModelNode* parent, | 118 ui::TreeModelNode* parent, |
119 int start, | 119 int start, |
120 int count) OVERRIDE; | 120 int count) OVERRIDE; |
121 virtual void TreeNodesRemoved(ui::TreeModel* model, | 121 virtual void TreeNodesRemoved(ui::TreeModel* model, |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 // Offset the text is drawn at. This accounts for the size of the expand | 364 // Offset the text is drawn at. This accounts for the size of the expand |
365 // control, icon and offsets. | 365 // control, icon and offsets. |
366 int text_offset_; | 366 int text_offset_; |
367 | 367 |
368 DISALLOW_COPY_AND_ASSIGN(TreeView); | 368 DISALLOW_COPY_AND_ASSIGN(TreeView); |
369 }; | 369 }; |
370 | 370 |
371 } // namespace views | 371 } // namespace views |
372 | 372 |
373 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ | 373 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ |
OLD | NEW |