summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpixel <pixel>2005-12-02 16:21:59 +0000
committerpixel <pixel>2005-12-02 16:21:59 +0000
commitedd5fe68be2a2a9e23a87f65f6a89807c34b7c3f (patch)
tree1b3dd682e775163290214cedd4dd8a8add5cceee /include
parent6f594ad00a07365eec68e16d338151dde23bb648 (diff)
Added cascade stuff for buttons, and cleaned source a bit.
Diffstat (limited to 'include')
-rw-r--r--include/widgets.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/widgets.h b/include/widgets.h
index ae29cee..66a6191 100644
--- a/include/widgets.h
+++ b/include/widgets.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: widgets.h,v 1.12 2005-12-01 13:48:12 pixel Exp $ */
+/* $Id: widgets.h,v 1.13 2005-12-02 16:21:59 pixel Exp $ */
#ifndef __WIDGETS_H__
#define __WIDGETS_H__
@@ -169,13 +169,16 @@ namespace mogltk {
class Button : public widget {
public:
Button(action *, shape *, widget * father, int x, int y, int w, int h, const String & caption);
+ virtual ~Button();
+ void simulate_press();
+ action * cascade_action();
protected:
virtual void draw();
virtual bool process_event(int, int, event_t);
bool bevel;
private:
bool dragging;
- action * a;
+ action * a, * cascade;
};
/*!
@@ -328,13 +331,19 @@ namespace mogltk {
ContextMenu * subselected;
};
+ /*!
+ The InputText widget is used to do a simple input box on the screen.
+ */
class InputText : public widget {
public:
- InputText(shape *, widget * father, int x, int y);
+ InputText(action *, shape *, widget * father, int x, int y);
virtual ~InputText();
virtual void draw();
const String & GetText() const;
void SetText(const String &);
+ void activate();
+ void SetCursorPos(int);
+ virtual bool process_event(int, int, event_t);
private:
class inputtext_keyevent : public mogltk::engine::keyevent {
public:
@@ -345,6 +354,10 @@ namespace mogltk {
InputText * father;
} * it_keyevent;
String text;
+ action * a;
+ bool cursor_visible;
+ int cursor_pos;
+
};
/*!
@@ -363,7 +376,6 @@ namespace mogltk {
action * a;
mogltk::font * InputDialog_font;
};
-
};
};