aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Button.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-12-25 11:28:43 (GMT)
committerfluxgen <fluxgen>2002-12-25 11:28:43 (GMT)
commit885ddd9322ea4a175e992e4a6fe757d19e8e86e2 (patch)
treed4dab0e28e646cf13534f29762a5101cfae703ec /src/FbTk/Button.hh
parent2202914053a7fe1d586dfed19ad41965b51fa4b1 (diff)
downloadfluxbox_pavel-885ddd9322ea4a175e992e4a6fe757d19e8e86e2.zip
fluxbox_pavel-885ddd9322ea4a175e992e4a6fe757d19e8e86e2.tar.bz2
using number for buttons and max five buttons
Diffstat (limited to 'src/FbTk/Button.hh')
-rw-r--r--src/FbTk/Button.hh17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/FbTk/Button.hh b/src/FbTk/Button.hh
index c49815d..a96dcd8 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.2 2002/12/16 11:02:41 fluxgen Exp $ 22// $Id: Button.hh,v 1.3 2002/12/25 11:28:43 fluxgen Exp $
23 23
24#ifndef FBTK_BUTTON_HH 24#ifndef FBTK_BUTTON_HH
25#define FBTK_BUTTON_HH 25#define FBTK_BUTTON_HH
@@ -41,13 +41,10 @@ class Button:public EventHandler,
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);
43 Button(const FbWindow &parent, int x, int y, unsigned int width, unsigned int height); 43 Button(const FbWindow &parent, int x, int y, unsigned int width, unsigned int height);
44 virtual ~Button(); 44 virtual ~Button();
45 /// sets action when the button is clicked with left mouse btn 45
46 void setOnClick(RefCount<Command> &com) { m_onclick_left = com; } 46 /// sets action when the button is clicked with #button mouse btn
47 /// sets action when the button is clicked with middle mouse btn 47 void setOnClick(RefCount<Command> &com, int button = 1);
48 void setOnClickMiddle(RefCount<Command> &com) { m_onclick_middle = com; }
49 /// sets action when the button is clicked with right mouse btn
50 void setOnClickRight(RefCount<Command> &com) { m_onclick_right = com; }
51 48
52 void move(int x, int y); 49 void move(int x, int y);
53 void resize(unsigned int width, unsigned int height); 50 void resize(unsigned int width, unsigned int height);
@@ -100,9 +97,7 @@ private:
100 Pixmap m_pressed_pm; ///< pressed pixmap 97 Pixmap m_pressed_pm; ///< pressed pixmap
101 GC m_gc; ///< graphic context for button 98 GC m_gc; ///< graphic context for button
102 bool m_pressed; ///< if the button is pressed 99 bool m_pressed; ///< if the button is pressed
103 RefCount<Command> m_onclick_left; ///< what to do when this button is clicked with lmb 100 RefCount<Command> m_onclick[5]; ///< what to do when this button is clicked with button num
104 RefCount<Command> m_onclick_middle; ///< what to do when this button is clicked with mmb
105 RefCount<Command> m_onclick_right; ///< what to do when this button is clicked with rmb
106}; 101};
107 102
108}; 103};