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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // Set the text color shown for the specified button state. | 42 // Set the text color shown for the specified button state. |
43 void SetTextColor(ButtonState for_state, SkColor color); | 43 void SetTextColor(ButtonState for_state, SkColor color); |
44 | 44 |
45 // Get or set the text's multi-line property to break on '\n', etc. | 45 // Get or set the text's multi-line property to break on '\n', etc. |
46 bool GetTextMultiLine() const; | 46 bool GetTextMultiLine() const; |
47 void SetTextMultiLine(bool text_multi_line); | 47 void SetTextMultiLine(bool text_multi_line); |
48 | 48 |
49 // Get or set the font list used by this button. | 49 // Get or set the font list used by this button. |
50 const gfx::FontList& GetFontList() const; | 50 const gfx::FontList& GetFontList() const; |
51 void SetFontList(const gfx::FontList& font_list); | 51 void SetFontList(const gfx::FontList& font_list); |
52 // Obsolete versions. | |
53 const gfx::Font& GetFont() const; | |
54 void SetFont(const gfx::Font& font); | |
55 | 52 |
56 // Set the elide behavior of this button. | 53 // Set the elide behavior of this button. |
57 void SetElideBehavior(Label::ElideBehavior elide_behavior); | 54 void SetElideBehavior(Label::ElideBehavior elide_behavior); |
58 | 55 |
59 // Get or set the horizontal alignment used for the button; reversed in RTL. | 56 // Get or set the horizontal alignment used for the button; reversed in RTL. |
60 // The optional image will lead the text, unless the button is right-aligned. | 57 // The optional image will lead the text, unless the button is right-aligned. |
61 gfx::HorizontalAlignment GetHorizontalAlignment() const; | 58 gfx::HorizontalAlignment GetHorizontalAlignment() const; |
62 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); | 59 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); |
63 | 60 |
64 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. | 61 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 ButtonStyle style_; | 147 ButtonStyle style_; |
151 | 148 |
152 scoped_ptr<Painter> focus_painter_; | 149 scoped_ptr<Painter> focus_painter_; |
153 | 150 |
154 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 151 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
155 }; | 152 }; |
156 | 153 |
157 } // namespace views | 154 } // namespace views |
158 | 155 |
159 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 156 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
OLD | NEW |