| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Get or set the text's multi-line property to break on '\n', etc. | 46 // Get or set the text's multi-line property to break on '\n', etc. |
| 47 bool GetTextMultiLine() const; | 47 bool GetTextMultiLine() const; |
| 48 void SetTextMultiLine(bool text_multi_line); | 48 void SetTextMultiLine(bool text_multi_line); |
| 49 | 49 |
| 50 // Get or set the font list used by this button. | 50 // Get or set the font list used by this button. |
| 51 const gfx::FontList& GetFontList() const; | 51 const gfx::FontList& GetFontList() const; |
| 52 void SetFontList(const gfx::FontList& font_list); | 52 void SetFontList(const gfx::FontList& font_list); |
| 53 | 53 |
| 54 // Set the elide behavior of this button. | 54 // Set the elide behavior of this button. |
| 55 void SetElideBehavior(Label::ElideBehavior elide_behavior); | 55 void SetElideBehavior(gfx::ElideBehavior elide_behavior); |
| 56 | 56 |
| 57 // Get or set the horizontal alignment used for the button; reversed in RTL. | 57 // Get or set the horizontal alignment used for the button; reversed in RTL. |
| 58 // The optional image will lead the text, unless the button is right-aligned. | 58 // The optional image will lead the text, unless the button is right-aligned. |
| 59 gfx::HorizontalAlignment GetHorizontalAlignment() const; | 59 gfx::HorizontalAlignment GetHorizontalAlignment() const; |
| 60 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); | 60 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); |
| 61 | 61 |
| 62 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. | 62 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. |
| 63 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; } | 63 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; } |
| 64 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; } | 64 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; } |
| 65 | 65 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 bool border_is_themed_border_; | 164 bool border_is_themed_border_; |
| 165 | 165 |
| 166 scoped_ptr<Painter> focus_painter_; | 166 scoped_ptr<Painter> focus_painter_; |
| 167 | 167 |
| 168 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 168 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 } // namespace views | 171 } // namespace views |
| 172 | 172 |
| 173 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 173 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |