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 "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
10 #include "ui/gfx/font.h" | 10 #include "ui/gfx/font.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Get or set the text's multi-line property to break on '\n', etc. | 38 // Get or set the text's multi-line property to break on '\n', etc. |
39 bool GetTextMultiLine() const; | 39 bool GetTextMultiLine() const; |
40 void SetTextMultiLine(bool text_multi_line); | 40 void SetTextMultiLine(bool text_multi_line); |
41 | 41 |
42 // Get or set the font used by this button. | 42 // Get or set the font used by this button. |
43 const gfx::Font& GetFont() const; | 43 const gfx::Font& GetFont() const; |
44 void SetFont(const gfx::Font& font); | 44 void SetFont(const gfx::Font& font); |
45 | 45 |
46 // Get or set the horizontal alignment used for the button. | 46 // Get or set the horizontal alignment used for the button. |
47 // The optional image will lead the text, unless the button is right-aligned. | 47 // The optional image will lead the text, unless the button is right-aligned. |
48 Label::Alignment GetHorizontalAlignment() const; | 48 gfx::HorizontalAlignment GetHorizontalAlignment() const; |
49 void SetHorizontalAlignment(Label::Alignment alignment); | 49 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); |
50 | 50 |
51 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. | 51 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. |
52 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; } | 52 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; } |
53 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; } | 53 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; } |
54 | 54 |
55 // Get or set the option to handle the return key; false by default. | 55 // Get or set the option to handle the return key; false by default. |
56 bool default_button() const { return default_button_; } | 56 bool default_button() const { return default_button_; } |
57 void SetDefaultButton(bool default_button); | 57 void SetDefaultButton(bool default_button); |
58 | 58 |
59 // Get or set the option to use a native button appearance; false by default. | 59 // Get or set the option to use a native button appearance; false by default. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Flag indicating native theme styling (or Views styling) of the button. | 109 // Flag indicating native theme styling (or Views styling) of the button. |
110 bool native_theme_; | 110 bool native_theme_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 112 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
113 }; | 113 }; |
114 | 114 |
115 } // namespace views | 115 } // namespace views |
116 | 116 |
117 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 117 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
OLD | NEW |