aboutsummaryrefslogtreecommitdiff
path: root/lib/gui/ebutton.h
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:35:43 +0000
committerFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:35:43 +0000
commitfc2f5b2cd655f1391f2abda1b39e37cdec98a951 (patch)
tree312efcea86a319de407a7c314fb981fb1c71019a /lib/gui/ebutton.h
downloadenigma2-fc2f5b2cd655f1391f2abda1b39e37cdec98a951.tar.gz
enigma2-fc2f5b2cd655f1391f2abda1b39e37cdec98a951.zip
Initial revision
Diffstat (limited to 'lib/gui/ebutton.h')
-rw-r--r--lib/gui/ebutton.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/gui/ebutton.h b/lib/gui/ebutton.h
new file mode 100644
index 00000000..6e9783eb
--- /dev/null
+++ b/lib/gui/ebutton.h
@@ -0,0 +1,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