aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Button.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/FbTk/Button.hh b/src/FbTk/Button.hh
index c3276a6..7a8cf56 100644
--- a/src/FbTk/Button.hh
+++ b/src/FbTk/Button.hh
@@ -47,6 +47,7 @@ public:
47 /// sets the pixmap to be viewed when the button is pressed 47 /// sets the pixmap to be viewed when the button is pressed
48 virtual void setPressedPixmap(Pixmap pm); 48 virtual void setPressedPixmap(Pixmap pm);
49 virtual void setPressedColor(const FbTk::Color &color); 49 virtual void setPressedColor(const FbTk::Color &color);
50 bool isPressed() const { return m_pressed; }
50 /// sets graphic context for drawing 51 /// sets graphic context for drawing
51 void setGC(GC gc) { m_gc = gc; } 52 void setGC(GC gc) { m_gc = gc; }
52 /// sets background pixmap, this will override background color 53 /// sets background pixmap, this will override background color
@@ -79,6 +80,12 @@ public:
79 Pixmap pressedPixmap() const { return m_pressed_pm; } 80 Pixmap pressedPixmap() const { return m_pressed_pm; }
80 const Color &backgroundColor() const { return m_background_color; } 81 const Color &backgroundColor() const { return m_background_color; }
81 const Color &pressedColor() const { return m_pressed_color; } 82 const Color &pressedColor() const { return m_pressed_color; }
83protected:
84 RefCount<Command<void> > command(int button) const {
85 if (button < 2) return m_onclick[0];
86 if (button > 4) return m_onclick[4];
87 return m_onclick[button - 1];
88 }
82private: 89private:
83 Pixmap m_background_pm; ///< background pixmap 90 Pixmap m_background_pm; ///< background pixmap
84 Color m_background_color; ///< background color 91 Color m_background_color; ///< background color