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

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

Issue 10437006: Converts ui/views/controls, ui/views/examples, ui/base/models to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/base/models/tree_node_model.h" 13 #include "ui/base/models/tree_node_model.h"
15 #include "ui/gfx/font.h" 14 #include "ui/gfx/font.h"
15 #include "ui/gfx/image/image_skia.h"
16 #include "ui/views/controls/textfield/textfield_controller.h" 16 #include "ui/views/controls/textfield/textfield_controller.h"
17 #include "ui/views/focus/focus_manager.h" 17 #include "ui/views/focus/focus_manager.h"
18 #include "ui/views/view.h" 18 #include "ui/views/view.h"
19 19
20 namespace views { 20 namespace views {
21 21
22 class Textfield; 22 class Textfield;
23 class TreeViewController; 23 class TreeViewController;
24 24
25 // TreeView displays hierarchical data as returned from a TreeModel. The user 25 // TreeView displays hierarchical data as returned from a TreeModel. The user
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 void ExpandOrSelectChild(); 304 void ExpandOrSelectChild();
305 305
306 // Implementation of Expand(). Returns true if at least one node was expanded 306 // Implementation of Expand(). Returns true if at least one node was expanded
307 // that previously wasn't. 307 // that previously wasn't.
308 bool ExpandImpl(ui::TreeModelNode* model_node); 308 bool ExpandImpl(ui::TreeModelNode* model_node);
309 309
310 // The model, may be null. 310 // The model, may be null.
311 ui::TreeModel* model_; 311 ui::TreeModel* model_;
312 312
313 // Default icons for closed/open. 313 // Default icons for closed/open.
314 SkBitmap closed_icon_; 314 gfx::ImageSkia closed_icon_;
315 SkBitmap open_icon_; 315 gfx::ImageSkia open_icon_;
316 316
317 // Icons from the model. 317 // Icons from the model.
318 std::vector<SkBitmap> icons_; 318 std::vector<gfx::ImageSkia> icons_;
319 319
320 // The root node. 320 // The root node.
321 InternalNode root_; 321 InternalNode root_;
322 322
323 // The selected node, may be NULL. 323 // The selected node, may be NULL.
324 InternalNode* selected_node_; 324 InternalNode* selected_node_;
325 325
326 // Non-null when editing. 326 // Non-null when editing.
327 Textfield* editor_; 327 Textfield* editor_;
328 328
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Offset the text is drawn at. This accounts for the size of the expand 360 // Offset the text is drawn at. This accounts for the size of the expand
361 // control, icon and offsets. 361 // control, icon and offsets.
362 int text_offset_; 362 int text_offset_;
363 363
364 DISALLOW_COPY_AND_ASSIGN(TreeView); 364 DISALLOW_COPY_AND_ASSIGN(TreeView);
365 }; 365 };
366 366
367 } // namespace views 367 } // namespace views
368 368
369 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_ 369 #endif // UI_VIEWS_CONTROLS_TREE_TREE_VIEW_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698