Changeset 3289 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_gtk.h
- Timestamp:
- Dec 26, 2004, 3:44:44 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_gtk.h
r3288 r3289 44 44 45 45 public: 46 ~Widget (); 47 48 Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next 49 #ifdef HAVE_GTK2 50 GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains. 51 #endif /* HAVE_GTK2 */ 52 void init(void); 53 int isOption; //!< with this Paramenter one can set the option-type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option, 3: float option, 4:char option, 5: char* option 54 /** 55 \briefdefines isOption states 56 */ 57 enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; 58 char* label; //!< The name of the Widget. Some do display it, Options need it to save; 59 #ifdef HAVE_GTK2 46 virtual ~Widget (); 47 void init(void); 48 void destroy(void); 49 50 void show (); 51 void hide (); 52 void setSize(int width, int height); 53 virtual void setTitle(char* title) = 0; //!< An abstract Function, that sets the title of Widgets. 54 55 void walkThrough (void (*function)(Widget*)); 56 static void listOptions (Widget* widget); 57 static void setOptions (Widget* widget); 58 59 #ifdef HAVE_GTK2 60 // Connection - Functions 61 60 62 gulong connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void* )); 61 63 gulong connectSignal (char* event, gint (*signal)(GtkWidget*, Widget* )); … … 63 65 gulong connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEventKey*, void* )); 64 66 void disconnectSignal (gulong signalID); 65 #endif /* HAVE_GTK2 */ 66 void show (); 67 void hide (); 68 void setSize(int width, int height); 69 virtual void setTitle(char* title) = 0; 70 71 void walkThrough (void (*function)(Widget*)); 72 static void listOptions (Widget* widget); 73 static void setOptions (Widget* widget); 74 75 #ifdef HAVE_GTK2 67 68 // Signals 76 69 static gint doNothingSignal (GtkWidget* widget, GdkEvent* event, void* nothing); 77 70 #endif /* HAVE_GTK2 */ 71 72 Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next 73 #ifdef HAVE_GTK2 74 GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains. 75 #endif /* HAVE_GTK2 */ 76 int isOption; //!< with this Paramenter one can set the option-type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option, 3: float option, 4:char option, 5: char* option 77 78 //! defines isOption states 79 enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; 80 char* label; //!< The name of the Widget. Some do display it, Options need it to save; 78 81 }; 79 82 … … 86 89 87 90 void init(void); 91 void destroy(void); 92 88 93 void setGroupName (char* name); 89 94 char* getGroupName (void); 90 95 91 virtual void fill (Widget* lowerWidget) = 0; 96 virtual void fill (Widget* lowerWidget) = 0; //!< An abstract function, that fills Packers. 92 97 }; 93 98 … … 106 111 public: 107 112 void init(void); 113 void destroy(void); 114 108 115 // void setBorderWidth (int borderwidth); 109 116 // virtual void setTitle (char* title) = 0; … … 119 126 { 120 127 private: 121 bool isOpen; //!< A bool Variable that checks if a Window is already open.122 public: 123 static Window* mainWindow; //!< Pointer to the First Window that was opened. By default this should be the GUI's main-Window.128 bool isOpen; //!< A bool Variable that checks if a Window is already open. 129 public: 130 static Window* mainWindow; //!< Pointer to the First Window that was opened. By default this should be the GUI's main-Window. 124 131 static void addWindow(Window* windowToAdd); 125 132 126 133 Window(void); 127 134 Window(char* windowName); 135 ~Window(void); 128 136 void init(); 137 void destroy(void); 129 138 130 139 void setTitle(char* title); … … 134 143 135 144 #ifdef HAVE_GTK2 145 // Signals 136 146 static gint windowOpen(GtkWidget* widget, GdkEvent* event, void* window); 137 147 static gint windowClose(GtkWidget* widget, GdkEvent* event, void* window); … … 148 158 { 149 159 public: 160 Frame(void); 150 161 Frame (char* frameName); 151 Frame (void); 152 void init(void); 162 ~Frame(void); 163 void init(void); 164 void destroy(void); 153 165 154 166 void setTitle(char* title); … … 162 174 { 163 175 public: 176 EventBox (void); 164 177 EventBox (char* eventBoxName); 165 EventBox (void); 166 void init(void); 178 ~EventBox(void); 179 void init(void); 180 void destroy(void); 167 181 168 182 void setTitle(char* title); … … 180 194 Box (void); 181 195 Box (char boxtype); 196 ~Box(void); 182 197 void init(char boxtype); 198 void destroy(void); 183 199 184 200 void fill (Widget* lowerWidget); … … 199 215 //virtual gint OptionChange (GtkWidget* widget, GdkEvent* event, gpointer data); 200 216 void init(void); 217 void destroy(void); 201 218 202 219 int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume … … 221 238 public: 222 239 Button (char* buttonname); 223 void init(void); 224 225 void setTitle(char* title); 226 240 ~Button(void); 241 void init(void); 242 void destroy(void); 243 244 void setTitle(char* title); 227 245 void redraw(); 228 246 }; … … 235 253 public: 236 254 CheckButton (char* buttonname); 237 #ifdef HAVE_GTK2 238 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 239 #endif /* HAVE_GTK2 */ 240 241 void init(void); 242 void setTitle(char* title); 243 255 ~CheckButton(void); 256 void init(void); 257 void destroy(void); 258 259 void setTitle(char* title); 244 260 bool isActive(); //!< a Bool value to see, if this CheckButton is active. 245 261 void redraw (); 262 263 #ifdef HAVE_GTK2 264 // Signals 265 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 266 #endif /* HAVE_GTK2 */ 246 267 }; 247 268 … … 253 274 { 254 275 public: 255 Slider (char* slidername,int start, int end); 276 Slider(char* slidername,int start, int end); 277 ~Slider(void); 256 278 void init(int start, int end); 279 void destroy(void); 257 280 258 281 void setTitle(char* title); 259 282 void setValue(int value); 260 261 #ifdef HAVE_GTK2 283 void redraw(); 284 285 #ifdef HAVE_GTK2 286 // Signals 262 287 static gint OptionChange (GtkWidget* widget, Widget* slider); 263 288 #endif /* HAVE_GTK2 */ 264 void redraw();265 289 }; 266 290 … … 270 294 private: 271 295 #ifdef HAVE_GTK2 272 GtkWidget* menu; //!< The menu That will hold the Options.273 GtkWidget* item; //!< One Item From a Menu.274 #endif /* HAVE_GTK2 */ 275 va_list itemlist; //!< The list to readin multiple Options.296 GtkWidget* menu; //!< The menu That will hold the Options. 297 GtkWidget* item; //!< One Item From a Menu. 298 #endif /* HAVE_GTK2 */ 299 va_list itemlist; //!< The list to readin multiple Options. 276 300 277 301 public: 278 302 Menu (char* menuname, ...); 279 void init(void); 280 281 void setTitle(char* title); 282 303 ~Menu(void); 304 void init(void); 305 void destroy(void); 306 307 void setTitle(char* title); 283 308 void addItem(char* itemName); 284 309 #ifdef HAVE_GTK2 … … 291 316 class OptionLabel : public Option 292 317 { 318 private: 319 293 320 public: 294 321 OptionLabel(char* label, char* value); 295 void init(void); 296 297 char* cValue; //!< The Value the Label will have. 322 ~OptionLabel(void); 323 void init(void); 324 void destroy(void); 325 298 326 299 327 void setValue(char* newValue); 300 328 void setTitle(char* title); 301 329 void redraw(); 330 331 char* cValue; //!< The Value the Label will have. \todo make private 332 302 333 }; 303 334 … … 306 337 { 307 338 public: 308 Label ( );339 Label (void); 309 340 Label (char* text); 310 void init(void); 341 ~Label(void); 342 void init(void); 343 void destroy(void); 311 344 312 345 void setTitle(char* text); … … 320 353 ProgressBar (void); 321 354 ProgressBar (char* label); 322 ~ProgressBar ( );323 void init 324 325 void setTitle(char* title); 326 355 ~ProgressBar (void); 356 void init(void); 357 void destroy(void); 358 359 void setTitle(char* title); 327 360 void setProgress (double progress); 328 361 void setTotalSize (double totalSize); … … 346 379 public: 347 380 Image (char* imgaename); 348 void init(void); 381 ~Image(void); 382 void init(void); 383 void destroy(void); 349 384 350 385 void setTitle(char* title);
Note: See TracChangeset
for help on using the changeset viewer.