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 <array> | 8 #include <array> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Call SetMinSize(gfx::Size()) to clear the monotonically increasing size. | 70 // Call SetMinSize(gfx::Size()) to clear the monotonically increasing size. |
71 void SetMinSize(const gfx::Size& min_size); | 71 void SetMinSize(const gfx::Size& min_size); |
72 void SetMaxSize(const gfx::Size& max_size); | 72 void SetMaxSize(const gfx::Size& max_size); |
73 | 73 |
74 // Gets or sets the option to handle the return key; false by default. | 74 // Gets or sets the option to handle the return key; false by default. |
75 bool is_default() const { return is_default_; } | 75 bool is_default() const { return is_default_; } |
76 void SetIsDefault(bool is_default); | 76 void SetIsDefault(bool is_default); |
77 | 77 |
78 // Gets or sets the button's overall style; the default is |STYLE_TEXTBUTTON|. | 78 // Gets or sets the button's overall style; the default is |STYLE_TEXTBUTTON|. |
| 79 // DEPRECATED: ButtonStyle is deprecated. Use MdTextButton in place of |
| 80 // |STYLE_BUTTON|. |
79 ButtonStyle style() const { return style_; } | 81 ButtonStyle style() const { return style_; } |
80 void SetStyle(ButtonStyle style); | 82 void SetStyleDeprecated(ButtonStyle style); |
81 | 83 |
82 // Sets the spacing between the image and the text. Shrinking the spacing | 84 // Sets the spacing between the image and the text. Shrinking the spacing |
83 // will not shrink the overall button size, as it is monotonically increasing. | 85 // will not shrink the overall button size, as it is monotonically increasing. |
84 // Call SetMinSize(gfx::Size()) to clear the size if needed. | 86 // Call SetMinSize(gfx::Size()) to clear the size if needed. |
85 void SetImageLabelSpacing(int spacing); | 87 void SetImageLabelSpacing(int spacing); |
86 | 88 |
87 void SetFocusPainter(std::unique_ptr<Painter> focus_painter); | 89 void SetFocusPainter(std::unique_ptr<Painter> focus_painter); |
88 Painter* focus_painter() { return focus_painter_.get(); } | 90 Painter* focus_painter() { return focus_painter_.get(); } |
89 | 91 |
90 // Creates the default border for this button. This can be overridden by | 92 // Creates the default border for this button. This can be overridden by |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 gfx::HorizontalAlignment horizontal_alignment_; | 239 gfx::HorizontalAlignment horizontal_alignment_; |
238 | 240 |
239 std::unique_ptr<Painter> focus_painter_; | 241 std::unique_ptr<Painter> focus_painter_; |
240 | 242 |
241 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 243 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
242 }; | 244 }; |
243 | 245 |
244 } // namespace views | 246 } // namespace views |
245 | 247 |
246 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 248 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
OLD | NEW |