| 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 20 matching lines...) Expand all Loading... |
| 31 LabelButton(ButtonListener* listener, const base::string16& text); | 31 LabelButton(ButtonListener* listener, const base::string16& text); |
| 32 ~LabelButton() override; | 32 ~LabelButton() override; |
| 33 | 33 |
| 34 // Get or set the image shown for the specified button state. | 34 // Get or set the image shown for the specified button state. |
| 35 // GetImage returns the image for STATE_NORMAL if the state's image is empty. | 35 // GetImage returns the image for STATE_NORMAL if the state's image is empty. |
| 36 virtual const gfx::ImageSkia& GetImage(ButtonState for_state); | 36 virtual const gfx::ImageSkia& GetImage(ButtonState for_state); |
| 37 void SetImage(ButtonState for_state, const gfx::ImageSkia& image); | 37 void SetImage(ButtonState for_state, const gfx::ImageSkia& image); |
| 38 | 38 |
| 39 // Get or set the text shown on the button. | 39 // Get or set the text shown on the button. |
| 40 const base::string16& GetText() const; | 40 const base::string16& GetText() const; |
| 41 virtual void SetText(const base::string16& text); | 41 void SetText(const base::string16& text); |
| 42 | 42 |
| 43 // Set the text color shown for the specified button state. | 43 // Set the text color shown for the specified button state. |
| 44 void SetTextColor(ButtonState for_state, SkColor color); | 44 void SetTextColor(ButtonState for_state, SkColor color); |
| 45 | 45 |
| 46 // Set drop shadows underneath the text. | 46 // Set drop shadows underneath the text. |
| 47 void SetTextShadows(const gfx::ShadowValues& shadows); | 47 void SetTextShadows(const gfx::ShadowValues& shadows); |
| 48 | 48 |
| 49 // Sets whether subpixel rendering is used on the label. | 49 // Sets whether subpixel rendering is used on the label. |
| 50 void SetTextSubpixelRenderingEnabled(bool enabled); | 50 void SetTextSubpixelRenderingEnabled(bool enabled); |
| 51 | 51 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 int image_label_spacing_; | 192 int image_label_spacing_; |
| 193 | 193 |
| 194 scoped_ptr<Painter> focus_painter_; | 194 scoped_ptr<Painter> focus_painter_; |
| 195 | 195 |
| 196 DISALLOW_COPY_AND_ASSIGN(LabelButton); | 196 DISALLOW_COPY_AND_ASSIGN(LabelButton); |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace views | 199 } // namespace views |
| 200 | 200 |
| 201 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ | 201 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ |
| OLD | NEW |