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

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

Issue 119273002: Clean-up: Retires obsolete methods in views::Label and views::TextButtonBase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged. Created 6 years, 11 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_LABEL_H_ 5 #ifndef UI_VIEWS_CONTROLS_LABEL_H_
6 #define UI_VIEWS_CONTROLS_LABEL_H_ 6 #define UI_VIEWS_CONTROLS_LABEL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Internal class name. 52 // Internal class name.
53 static const char kViewClassName[]; 53 static const char kViewClassName[];
54 54
55 // The padding for the focus border when rendering focused text. 55 // The padding for the focus border when rendering focused text.
56 static const int kFocusBorderPadding; 56 static const int kFocusBorderPadding;
57 57
58 Label(); 58 Label();
59 explicit Label(const base::string16& text); 59 explicit Label(const base::string16& text);
60 Label(const base::string16& text, const gfx::FontList& font_list); 60 Label(const base::string16& text, const gfx::FontList& font_list);
61 Label(const base::string16& text, const gfx::Font& font); // OBSOLETE
62 virtual ~Label(); 61 virtual ~Label();
63 62
64 // Gets or sets the fonts used by this label. 63 // Gets or sets the fonts used by this label.
65 const gfx::FontList& font_list() const { return font_list_; } 64 const gfx::FontList& font_list() const { return font_list_; }
66 virtual void SetFontList(const gfx::FontList& font_list); 65 virtual void SetFontList(const gfx::FontList& font_list);
67 // Obsolete gfx::Font version. Should use gfx::FontList version instead.
68 const gfx::Font& font() const; // OBSOLETE
69 virtual void SetFont(const gfx::Font& font); // OBSOLETE
70 66
71 // Get or set the label text. 67 // Get or set the label text.
72 const base::string16& text() const { return text_; } 68 const base::string16& text() const { return text_; }
73 virtual void SetText(const base::string16& text); 69 virtual void SetText(const base::string16& text);
74 70
75 // Enables or disables auto-color-readability (enabled by default). If this 71 // Enables or disables auto-color-readability (enabled by default). If this
76 // is enabled, then calls to set any foreground or background color will 72 // is enabled, then calls to set any foreground or background color will
77 // trigger an automatic mapper that uses color_utils::GetReadableColor() to 73 // trigger an automatic mapper that uses color_utils::GetReadableColor() to
78 // ensure that the foreground colors are readable over the background color. 74 // ensure that the foreground colors are readable over the background color.
79 void SetAutoColorReadabilityEnabled(bool enabled); 75 void SetAutoColorReadabilityEnabled(bool enabled);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 // The cached heights to avoid recalculation in GetHeightForWidth(). 278 // The cached heights to avoid recalculation in GetHeightForWidth().
283 std::vector<gfx::Size> cached_heights_; 279 std::vector<gfx::Size> cached_heights_;
284 int cached_heights_cursor_; 280 int cached_heights_cursor_;
285 281
286 DISALLOW_COPY_AND_ASSIGN(Label); 282 DISALLOW_COPY_AND_ASSIGN(Label);
287 }; 283 };
288 284
289 } // namespace views 285 } // namespace views
290 286
291 #endif // UI_VIEWS_CONTROLS_LABEL_H_ 287 #endif // UI_VIEWS_CONTROLS_LABEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698