Chromium Code Reviews| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 LabelButton(ButtonListener* listener, const base::string16& text); | 39 LabelButton(ButtonListener* listener, const base::string16& text); |
| 40 ~LabelButton() override; | 40 ~LabelButton() override; |
| 41 | 41 |
| 42 // Gets or sets the image shown for the specified button state. | 42 // Gets or sets the image shown for the specified button state. |
| 43 // GetImage returns the image for STATE_NORMAL if the state's image is empty. | 43 // GetImage returns the image for STATE_NORMAL if the state's image is empty. |
| 44 virtual gfx::ImageSkia GetImage(ButtonState for_state) const; | 44 virtual gfx::ImageSkia GetImage(ButtonState for_state) const; |
| 45 void SetImage(ButtonState for_state, const gfx::ImageSkia& image); | 45 void SetImage(ButtonState for_state, const gfx::ImageSkia& image); |
| 46 | 46 |
| 47 // Gets or sets the text shown on the button. | 47 // Gets or sets the text shown on the button. |
| 48 const base::string16& GetText() const; | 48 const base::string16& GetText() const; |
| 49 void SetText(const base::string16& text); | 49 virtual void SetText(const base::string16& text); |
|
sadrul
2016/08/08 20:25:08
Can there a different virtual OnTextChanged() that
Evan Stade
2016/08/08 22:40:54
I just went and made this change, but then I reali
sadrul
2016/08/08 22:56:49
OK
| |
| 50 | 50 |
| 51 // Sets the text color shown for the specified button |for_state| to |color|. | 51 // Sets the text color shown for the specified button |for_state| to |color|. |
| 52 void SetTextColor(ButtonState for_state, SkColor color); | 52 void SetTextColor(ButtonState for_state, SkColor color); |
| 53 | 53 |
| 54 // Sets the text colors shown for the non-disabled states to |color|. | 54 // Sets the text colors shown for the non-disabled states to |color|. |
| 55 virtual void SetEnabledTextColors(SkColor color); | 55 virtual void SetEnabledTextColors(SkColor color); |
| 56 | 56 |
| 57 // Sets drop shadows underneath the text. | 57 // Sets drop shadows underneath the text. |
| 58 void SetTextShadows(const gfx::ShadowValues& shadows); | 58 void SetTextShadows(const gfx::ShadowValues& shadows); |
| 59 | 59 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 gfx::HorizontalAlignment horizontal_alignment_; | 234 gfx::HorizontalAlignment horizontal_alignment_; |
| 235 | 235 |
| 236 std::unique_ptr<Painter> focus_painter_; | 236 std::unique_ptr<Painter> focus_painter_; |
| 237 | 237 |
| 238 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 238 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 } // namespace views | 241 } // namespace views |
| 242 | 242 |
| 243 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 243 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |