Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: ui/views/controls/tree/tree_view.h

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Returns the node for the specified row, or NULL for an invalid row index. 114 // Returns the node for the specified row, or NULL for an invalid row index.
115 ui::TreeModelNode* GetNodeForRow(int row); 115 ui::TreeModelNode* GetNodeForRow(int row);
116 116
117 // Maps a node to a row, returns -1 if node is not valid. 117 // Maps a node to a row, returns -1 if node is not valid.
118 int GetRowForNode(ui::TreeModelNode* node); 118 int GetRowForNode(ui::TreeModelNode* node);
119 119
120 views::Textfield* editor() { return editor_; } 120 views::Textfield* editor() { return editor_; }
121 121
122 // View overrides: 122 // View overrides:
123 virtual void Layout() OVERRIDE; 123 virtual void Layout() OVERRIDE;
124 virtual gfx::Size GetPreferredSize() OVERRIDE; 124 virtual gfx::Size GetPreferredSize() const OVERRIDE;
125 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 125 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
126 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 126 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
127 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; 127 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE;
128 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 128 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
129 virtual void ShowContextMenu(const gfx::Point& p, 129 virtual void ShowContextMenu(const gfx::Point& p,
130 ui::MenuSourceType source_type) OVERRIDE; 130 ui::MenuSourceType source_type) OVERRIDE;
131 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 131 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
132 virtual const char* GetClassName() const OVERRIDE; 132 virtual const char* GetClassName() const OVERRIDE;
133 133
134 // TreeModelObserver overrides: 134 // TreeModelObserver overrides:
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 int text_offset_; 388 int text_offset_;
389 389
390 scoped_ptr<PrefixSelector> selector_; 390 scoped_ptr<PrefixSelector> selector_;
391 391
392 DISALLOW_COPY_AND_ASSIGN(TreeView); 392 DISALLOW_COPY_AND_ASSIGN(TreeView);
393 }; 393 };
394 394
395 } // namespace views 395 } // namespace views
396 396
397 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ 397 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698