blob: 6e9783eb02cd0ceb5a59c787d67f32ea0cf64b0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef __ebutton_h
#define __ebutton_h
#include <lib/gui/elabel.h>
#include <lib/gdi/grc.h>
/**
* \brief A widget which acts like a button.
*/
class eButton: public eLabel
{
#ifndef DISABLE_LCD
eLabel* tmpDescr; // used for LCD with description
#endif
protected:
gColor focusB, focusF, normalB, normalF;
eLabel *descr;
int eventHandler(const eWidgetEvent &event);
void gotFocus();
void lostFocus();
public:
/**
* \brief Constructs a button.
*
* \param descr is for use with lcd
*/
eButton(eWidget *parent, eLabel* descr=0, int takefocus=1, const char *deco="eButton" );
/**
* \brief the "selected" signal.
*
* This signals is emitted when OK is pressed.
*/
Signal0<void> selected;
Signal1<void, eButton*> selected_id;
};
#endif
|