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

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

Issue 11068012: Add new views::LabelButton and LabelButtonBorder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove stray semicolon. Created 8 years, 2 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 | « ui/views/controls/image_view.cc ('k') | ui/views/examples/button_example.h » ('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) 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 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Sets the label text. 67 // Sets the label text.
68 void SetText(const string16& text); 68 void SetText(const string16& text);
69 69
70 // Sets the label text to |email|. Emails have a custom eliding algorithm. 70 // Sets the label text to |email|. Emails have a custom eliding algorithm.
71 void SetEmail(const string16& email); 71 void SetEmail(const string16& email);
72 72
73 // Returns the font used by this label. 73 // Returns the font used by this label.
74 gfx::Font font() const { return font_; } 74 gfx::Font font() const { return font_; }
75 75
76 // Returns the label text. 76 // Returns the label text.
77 string16 text() const { return text_; }; 77 const string16& text() const { return text_; };
78 78
79 // Enables or disables auto-color-readability (enabled by default). If this 79 // Enables or disables auto-color-readability (enabled by default). If this
80 // is enabled, then calls to set any foreground or background color will 80 // is enabled, then calls to set any foreground or background color will
81 // trigger an automatic mapper that uses color_utils::GetReadableColor() to 81 // trigger an automatic mapper that uses color_utils::GetReadableColor() to
82 // ensure that the foreground colors are readable over the background color. 82 // ensure that the foreground colors are readable over the background color.
83 void SetAutoColorReadabilityEnabled(bool enabled); 83 void SetAutoColorReadabilityEnabled(bool enabled);
84 84
85 // Sets the color. This will automatically force the color to be readable 85 // Sets the color. This will automatically force the color to be readable
86 // over the current background color. 86 // over the current background color.
87 virtual void SetEnabledColor(SkColor color); 87 virtual void SetEnabledColor(SkColor color);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 // Should a shadow be drawn behind the text? 302 // Should a shadow be drawn behind the text?
303 bool has_shadow_; 303 bool has_shadow_;
304 304
305 DISALLOW_COPY_AND_ASSIGN(Label); 305 DISALLOW_COPY_AND_ASSIGN(Label);
306 }; 306 };
307 307
308 } // namespace views 308 } // namespace views
309 309
310 #endif // UI_VIEWS_CONTROLS_LABEL_H_ 310 #endif // UI_VIEWS_CONTROLS_LABEL_H_
OLDNEW
« no previous file with comments | « ui/views/controls/image_view.cc ('k') | ui/views/examples/button_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698