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

Side by Side Diff: views/controls/label.h

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « views/controls/image_view.cc ('k') | views/controls/label.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 VIEWS_CONTROLS_LABEL_H_ 5 #ifndef VIEWS_CONTROLS_LABEL_H_
6 #define VIEWS_CONTROLS_LABEL_H_ 6 #define VIEWS_CONTROLS_LABEL_H_
7 7
8 #include "app/gfx/chrome_font.h" 8 #include "app/gfx/font.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
11 #include "testing/gtest/include/gtest/gtest_prod.h" 11 #include "testing/gtest/include/gtest/gtest_prod.h"
12 #include "views/view.h" 12 #include "views/view.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 ///////////////////////////////////////////////////////////////////////////// 16 /////////////////////////////////////////////////////////////////////////////
17 // 17 //
18 // Label class 18 // Label class
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Return the height necessary to display this label with the provided width. 61 // Return the height necessary to display this label with the provided width.
62 // This method is used to layout multi-line labels. It is equivalent to 62 // This method is used to layout multi-line labels. It is equivalent to
63 // GetPreferredSize().height() if the receiver is not multi-line 63 // GetPreferredSize().height() if the receiver is not multi-line
64 virtual int GetHeightForWidth(int w); 64 virtual int GetHeightForWidth(int w);
65 65
66 // Returns views/Label. 66 // Returns views/Label.
67 virtual std::string GetClassName() const; 67 virtual std::string GetClassName() const;
68 68
69 // Overridden to paint 69 // Overridden to paint
70 virtual void Paint(ChromeCanvas* canvas); 70 virtual void Paint(gfx::Canvas* canvas);
71 71
72 // If the mouse is over the label, and a mouse over background has been 72 // If the mouse is over the label, and a mouse over background has been
73 // specified, its used. Otherwise super's implementation is invoked 73 // specified, its used. Otherwise super's implementation is invoked
74 virtual void PaintBackground(ChromeCanvas* canvas); 74 virtual void PaintBackground(gfx::Canvas* canvas);
75 75
76 // Set the font. 76 // Set the font.
77 void SetFont(const gfx::Font& font); 77 void SetFont(const gfx::Font& font);
78 78
79 // Return the font used by this label 79 // Return the font used by this label
80 gfx::Font GetFont() const; 80 gfx::Font GetFont() const;
81 81
82 // Set the label text. 82 // Set the label text.
83 void SetText(const std::wstring& text); 83 void SetText(const std::wstring& text);
84 84
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // allows this view to reserve space for a focus border that it otherwise 241 // allows this view to reserve space for a focus border that it otherwise
242 // might not have because it is not itself focusable. 242 // might not have because it is not itself focusable.
243 bool has_focus_border_; 243 bool has_focus_border_;
244 244
245 DISALLOW_COPY_AND_ASSIGN(Label); 245 DISALLOW_COPY_AND_ASSIGN(Label);
246 }; 246 };
247 247
248 } // namespace views 248 } // namespace views
249 249
250 #endif // VIEWS_CONTROLS_LABEL_H_ 250 #endif // VIEWS_CONTROLS_LABEL_H_
OLDNEW
« no previous file with comments | « views/controls/image_view.cc ('k') | views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698