Changeset 2707 in orxonox.OLD for orxonox/branches/buerli/gui/orxonox_gui.h
- Timestamp:
- Nov 3, 2004, 12:29:03 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/buerli/gui/orxonox_gui.h
r2595 r2707 7 7 #define _ORXONOX_GUI_H 8 8 9 #if HAVE_CONFIG_H 10 #include <config.h> 11 #endif 12 9 13 #include <stdlib.h> 10 #include <string.h>11 14 #include <gtk/gtkmain.h> 12 15 #include <gtk/gtkwindow.h> … … 34 37 35 38 //! This is the topmost object that can be displayed all others are derived from it. 36 37 39 class Widget 38 40 { 39 41 private: 40 42 public: 43 ~Widget (); 44 41 45 Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next 42 46 GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains. 43 v irtual void init(void);47 void init(void); 44 48 int is_option; //!< with this Paramenter one can set the IsOption type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option 45 enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; //!< defines is_option states 49 /** 50 \briefdefines is_option states 51 */ 52 enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; 53 char* label; //!< The name of the Widget. Some do display it, Options need it to save; 46 54 void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *)); 47 55 void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *)); 48 56 void connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *)); 49 57 void show (); 58 void hide (); 59 void setSize(int width, int height); 50 60 51 61 void walkThrough (void (*function)(Widget*)); … … 55 65 }; 56 66 67 //! This is a Packer Object, which has the ability to Pack other Widgets into itself. 68 class Packer : public Widget 69 { 70 public: 71 Widget* down; //!< this points to the Widget below this. 72 char* groupName; //!< For each Packer you can specify a Groupname under which the lowerWidgets will be saved. 73 74 void init(void); 75 void setGroupName (char* name); 76 char* getGroupName (void); 77 }; 57 78 58 79 //! This is a Container Class, it can contain one sub-Widget: down. … … 62 83 * The derived classes of Container can be displayed 63 84 */ 64 class Container : public Widget85 class Container : public Packer 65 86 { 66 87 private: 67 88 int borderwidth; 68 89 int policy; 69 char* label; 70 71 public: 72 void init(void); 73 Widget* down; //!< this points to the Widget below this. 90 91 public: 92 void init(void); 74 93 // void setBorderWidth (int borderwidth); 75 94 // virtual void setTitle (char* title) = 0; … … 84 103 class Window : public Container 85 104 { 105 private: 106 bool isOpen; 86 107 public: 87 108 Window (char* windowName); 88 109 Window (void); 89 ~Window ();90 110 void init (); 91 111 … … 105 125 Frame (char* frameName); 106 126 Frame (void); 107 ~Frame ();108 127 void init(void); 109 128 … … 120 139 EventBox (char* eventBoxName); 121 140 EventBox (void); 122 ~EventBox ();123 141 void init(void); 124 142 … … 132 150 * A Box is always filled left->right (horizontally) or up->down (vertically) 133 151 */ 134 class Box : public Widget152 class Box : public Packer 135 153 { 136 154 public: 137 155 Box (void); 138 156 Box (char boxtype); 139 ~Box (void);140 157 void init(char boxtype); 141 158 142 Widget* down; //!< the Lower Widget of a Box.143 159 void fill (Widget* lowerWidget); 144 160 … … 154 170 public: 155 171 Image (char* imgaename); 156 ~Image ();157 172 void init(void); 158 173 }; … … 169 184 170 185 int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume 171 char* option_name; //!< options have a name, that can be displayed around them172 186 char* flag_name; //!< options have a flag name that will be appendet if you start the Program from the GUI. 173 187 char* flag_name_short; //!< like flag_name but shorter … … 187 201 public: 188 202 Button (char* buttonname); 189 ~Button (void);190 203 void init(void); 191 204 … … 202 215 public: 203 216 CheckButton (char* buttonname); 204 ~CheckButton (void);205 217 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 206 218 … … 219 231 public: 220 232 Slider (char* slidername,int start, int end); 221 ~Slider ();222 233 void init(int start, int end); 223 234 … … 239 250 public: 240 251 Menu (char* menuname, ...); 241 ~Menu ();242 252 void init(void); 243 253 … … 255 265 Label (); 256 266 Label (char* text); 257 ~Label ();258 267 void init(void); 259 268
Note: See TracChangeset
for help on using the changeset viewer.