OLD | NEW |
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_BUTTON_LABEL_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual const gfx::ImageSkia& GetImage(ButtonState for_state); | 36 virtual const gfx::ImageSkia& GetImage(ButtonState for_state); |
37 void SetImage(ButtonState for_state, const gfx::ImageSkia& image); | 37 void SetImage(ButtonState for_state, const gfx::ImageSkia& image); |
38 | 38 |
39 // Get or set the text shown on the button. | 39 // Get or set the text shown on the button. |
40 const base::string16& GetText() const; | 40 const base::string16& GetText() const; |
41 virtual void SetText(const base::string16& text); | 41 virtual void SetText(const base::string16& text); |
42 | 42 |
43 // Set the text color shown for the specified button state. | 43 // Set the text color shown for the specified button state. |
44 void SetTextColor(ButtonState for_state, SkColor color); | 44 void SetTextColor(ButtonState for_state, SkColor color); |
45 | 45 |
46 // Sets a halo color on the label. | 46 // Set drop shadows underneath the text. |
47 void SetHaloColor(SkColor color); | 47 void SetTextShadows(const gfx::ShadowValues& shadows); |
| 48 |
| 49 // Sets whether subpixel rendering is used on the label. |
| 50 void SetTextSubpixelRenderingEnabled(bool enabled); |
48 | 51 |
49 // Get or set the text's multi-line property to break on '\n', etc. | 52 // Get or set the text's multi-line property to break on '\n', etc. |
50 bool GetTextMultiLine() const; | 53 bool GetTextMultiLine() const; |
51 void SetTextMultiLine(bool text_multi_line); | 54 void SetTextMultiLine(bool text_multi_line); |
52 | 55 |
53 // Get or set the font list used by this button. | 56 // Get or set the font list used by this button. |
54 const gfx::FontList& GetFontList() const; | 57 const gfx::FontList& GetFontList() const; |
55 void SetFontList(const gfx::FontList& font_list); | 58 void SetFontList(const gfx::FontList& font_list); |
56 | 59 |
57 // Set the elide behavior of this button. | 60 // Set the elide behavior of this button. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 bool border_is_themed_border_; | 175 bool border_is_themed_border_; |
173 | 176 |
174 scoped_ptr<Painter> focus_painter_; | 177 scoped_ptr<Painter> focus_painter_; |
175 | 178 |
176 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 179 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
177 }; | 180 }; |
178 | 181 |
179 } // namespace views | 182 } // namespace views |
180 | 183 |
181 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 184 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
OLD | NEW |