trunk 20080912
[gitenigma.git] / include / lib / gui / ebutton.h
blob1ff127a76b4dbdff4e49d31b2b1ce0ebcbef2322
1 #ifndef __ebutton_h
2 #define __ebutton_h
4 #include <lib/gui/elabel.h>
5 #include <lib/gdi/grc.h>
7 /**
8 * \brief A widget which acts like a button.
9 */
10 class eButton: public eLabel
12 //#ifndef DISABLE_LCD
13 eLabel* tmpDescr; // used for LCD with description
14 //#endif
15 protected:
16 gColor focusB, focusF, normalB, normalF;
17 eLabel *descr;
18 int eventHandler(const eWidgetEvent &event);
19 void gotFocus();
20 void lostFocus();
21 public:
22 int setProperty(const eString &prop, const eString &val);
23 /**
24 * \brief Constructs a button.
26 * \param descr is for use with lcd
28 eButton(eWidget *parent, eLabel* descr=0, int takefocus=1, const char *deco="eButton" );
29 /**
30 * \brief the "selected" signal.
32 * This signals is emitted when OK is pressed.
34 Signal0<void> selected;
35 Signal1<void, eButton*> selected_id;
38 #endif