summaryrefslogtreecommitdiff
path: root/src/FbTk/Button.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Button.hh')
-rw-r--r--src/FbTk/Button.hh27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/FbTk/Button.hh b/src/FbTk/Button.hh
index 80f8663..8aaf561 100644
--- a/src/FbTk/Button.hh
+++ b/src/FbTk/Button.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Button.hh,v 1.4 2003/04/28 22:22:25 fluxgen Exp $ 22// $Id: Button.hh,v 1.5 2003/08/13 09:25:16 fluxgen Exp $
23 23
24#ifndef FBTK_BUTTON_HH 24#ifndef FBTK_BUTTON_HH
25#define FBTK_BUTTON_HH 25#define FBTK_BUTTON_HH
@@ -36,7 +36,7 @@
36 36
37namespace FbTk { 37namespace FbTk {
38 38
39class Button:public EventHandler, 39class Button:public FbTk::FbWindow, public EventHandler,
40 private NotCopyable { 40 private NotCopyable {
41public: 41public:
42 Button(int screen_num, int x, int y, unsigned int width, unsigned int height); 42 Button(int screen_num, int x, int y, unsigned int width, unsigned int height);
@@ -46,10 +46,6 @@ public:
46 /// sets action when the button is clicked with #button mouse btn 46 /// sets action when the button is clicked with #button mouse btn
47 void setOnClick(RefCount<Command> &com, int button = 1); 47 void setOnClick(RefCount<Command> &com, int button = 1);
48 48
49 virtual void move(int x, int y);
50 virtual void resize(unsigned int width, unsigned int height);
51 virtual void moveResize(int x, int y, unsigned int width, unsigned int height);
52
53 /// sets foreground pixmap 49 /// sets foreground pixmap
54 void setPixmap(Pixmap pm); 50 void setPixmap(Pixmap pm);
55 /// sets the pixmap to be viewed when the button is pressed 51 /// sets the pixmap to be viewed when the button is pressed
@@ -60,11 +56,7 @@ public:
60 void setBackgroundPixmap(Pixmap pm); 56 void setBackgroundPixmap(Pixmap pm);
61 /// sets background color 57 /// sets background color
62 void setBackgroundColor(const Color &color); 58 void setBackgroundColor(const Color &color);
63 /// show button 59
64 void show();
65 /// hide button
66 void hide();
67 virtual void clear() { m_win.clear(); }
68 /** 60 /**
69 @name eventhandlers 61 @name eventhandlers
70 */ 62 */
@@ -76,21 +68,10 @@ public:
76 68
77 /// @return true if the button is pressed, else false 69 /// @return true if the button is pressed, else false
78 bool pressed() const { return m_pressed; } 70 bool pressed() const { return m_pressed; }
79 /** 71
80 @name position and size of the button
81 */
82 //@{
83 int x() const { return m_win.x(); }
84 int y() const { return m_win.y(); }
85 unsigned int width() const { return m_win.width(); }
86 unsigned int height() const { return m_win.height(); }
87 //@}
88 FbWindow &window() { return m_win; }
89 const FbWindow &window() const { return m_win; }
90 GC gc() const { return m_gc; } 72 GC gc() const { return m_gc; }
91 73
92private: 74private:
93 FbTk::FbWindow m_win; ///< window for button
94 Pixmap m_foreground_pm; ///< foreground pixmap 75 Pixmap m_foreground_pm; ///< foreground pixmap
95 Pixmap m_background_pm; ///< background pixmap 76 Pixmap m_background_pm; ///< background pixmap
96 Color m_background_color; ///< background color 77 Color m_background_color; ///< background color