#ifndef _ORXONOX_GUI_H #define _ORXONOX_GUI_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class OrxonoxGui { public: OrxonoxGui (int argc, char *argv[]); ~OrxonoxGui (); }; class Widget { private: public: Widget* next; GtkWidget* widget; virtual void init(void); int is_option; void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *)); void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *)); void connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *)); void show (); void walkThrough (void (*function)(Widget*)); static void listOptions (Widget* widget); static void setOptions (Widget* widget); }; class Container : public Widget { private: int borderwidth; int policy; char* label; public: void init(void); Widget* down; void setBorderWidth (int borderwidth); virtual void setTitle (char* title) = 0; void fill (Widget *lowerWidget); }; class Window : public Container { public: Window (char* windowName); Window (void); ~Window (); void init (); void setTitle (char* title); void showall (); static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data); }; class Frame :public Container { public: Frame (char* frameName); Frame (void); ~Frame (); void init(void); void setTitle (char* title); }; class EventBox : public Container { public: EventBox (char* eventBoxName); EventBox (void); ~EventBox (); void init(void); void setTitle (char* title); }; class Box : public Widget { public: Box (void); Box (char boxtype); ~Box (void); void init(char boxtype); Widget* down; void fill (Widget* lowerWidget); }; class Image : public Widget { public: Image (char* imgaename); ~Image (); void init(void); }; class Option : public Widget { public: //virtual gint OptionChange (GtkWidget *widget, GdkEvent *event, gpointer data); void init(void); int value; char* option_name; char* flag_name; char* flag_name_short; int default_value; void setFlagName (char* flagname, int defaultvalue); void setFlagName (char* flagname, char* flagnameshort, int defaultvalue); virtual void redraw () = 0; }; class Button : public Option { public: Button (char* buttonname); ~Button (void); void init(void); void setTitle(char* title); void redraw(); }; class CheckButton : public Option { public: CheckButton (char* buttonname); ~CheckButton (void); static gint OptionChange (GtkWidget* widget, Widget* checkbutton); void init(void); void setTitle(char* title); void redraw (); }; class Slider : public Option { public: Slider (char* slidername,int start, int end); ~Slider (); void init(int start, int end); void setTitle(char* title); void setValue(int value); static gint OptionChange (GtkWidget* widget, Widget* slider); void redraw(); }; class Menu : public Option { private: GtkWidget* menu; GtkWidget* item; va_list itemlist; public: Menu (char* menuname, ...); ~Menu (); void init(void); void setTitle(char* title); void addItem(char* itemName); static gint OptionChange (GtkWidget* widget, Widget* menu); void redraw(); }; class Label : public Widget { public: Label (); Label (char* text); ~Label (); void init(void); void setText (char * text); char* getText (); }; //gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data); #endif /* _ORXONOX_GUI_H */