Index: ui/views/controls/button/text_button.h |
diff --git a/ui/views/controls/button/text_button.h b/ui/views/controls/button/text_button.h |
index 9185b59f3694504d48ff28ab2e54339bb7c8273b..de612765ac1f8a2ed6fc0a8025f220dd9474aaee 100644 |
--- a/ui/views/controls/button/text_button.h |
+++ b/ui/views/controls/button/text_button.h |
@@ -160,6 +160,11 @@ class VIEWS_EXPORT TextButtonBase : public CustomButton, |
enum PaintButtonMode { PB_NORMAL, PB_FOR_DRAG }; |
virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode); |
+ // Paint the button's text into the specified canvas. If |mode| is |
+ // |PB_FOR_DRAG|, the function paints a drag image representation. Derived |
+ // can override this function to change only the text rendering. |
+ virtual void OnPaintText(gfx::Canvas* canvas, PaintButtonMode mode); |
sky
2014/05/15 16:55:12
Why is this public?
Roger Tawa OOO till Jul 10th
2014/05/15 17:19:27
No good reason. Made it protected.
|
+ |
// Overridden from View: |
virtual gfx::Size GetPreferredSize() OVERRIDE; |
virtual gfx::Size GetMinimumSize() OVERRIDE; |
@@ -328,6 +333,11 @@ class VIEWS_EXPORT TextButton : public TextButtonBase { |
virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) OVERRIDE; |
protected: |
+ // Paint the button's icon into the specified canvas. If |mode| is |
+ // |PB_FOR_DRAG|, the function paints a drag image representation. Derived |
+ // can override this function to change only the icon rendering. |
+ virtual void OnPaintIcon(gfx::Canvas* canvas, PaintButtonMode mode); |
+ |
gfx::ImageSkia icon() const { return icon_; } |
virtual const gfx::ImageSkia& GetImageToPaint() const; |