Changeset 3315 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_gtk.h
- Timestamp:
- Jan 3, 2005, 12:13:38 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_gtk.h
r3312 r3315 42 42 43 43 public: 44 virtual ~Widget ();45 void init(void); 46 void destroy(void); 47 48 void show ();49 void hide ();44 virtual ~Widget(void); 45 void init(void); 46 void destroy(void); 47 48 void show(void); 49 void hide(void); 50 50 void setSize(int width, int height); 51 51 virtual void setTitle(char* title) = 0; //!< An abstract Function, that sets the title of Widgets. 52 52 53 53 Widget* findWidgetByName(char* name, unsigned int depth); 54 void walkThrough (void(*function)(Widget*), unsigned int depth);55 void walkThrough (void(*function)(Widget*, void*), void* data, unsigned int depth);54 void walkThrough(void(*function)(Widget*), unsigned int depth); 55 void walkThrough(void(*function)(Widget*, void*), void* data, unsigned int depth); 56 56 static void listOptionsAndGroups(Widget* widget); 57 57 static void listOptions(Widget* widget); … … 67 67 // Connection - Functions 68 68 69 gulong connectSignal (char* event, gint(*signal)(GtkWidget*, GdkEvent*, void* ));70 gulong connectSignal (char* event, gint(*signal)(GtkWidget*, Widget* ));71 gulong connectSignal (char* event, void* extObj, gint(*signal)(GtkWidget*, GdkEvent*, void* ));72 gulong connectSignal (char* event, void* extObj, gint(*signal)(GtkWidget*, void* ));73 gulong connectSignal (char* event, void* extObj, gint(*signal)(GtkWidget*, GdkEventKey*, void* ));74 void disconnectSignal 69 gulong connectSignal(char* event, gint(*signal)(GtkWidget*, GdkEvent*, void* )); 70 gulong connectSignal(char* event, gint(*signal)(GtkWidget*, Widget* )); 71 gulong connectSignal(char* event, void* extObj, gint(*signal)(GtkWidget*, GdkEvent*, void* )); 72 gulong connectSignal(char* event, void* extObj, gint(*signal)(GtkWidget*, void* )); 73 gulong connectSignal(char* event, void* extObj, gint(*signal)(GtkWidget*, GdkEventKey*, void* )); 74 void disconnectSignal(gulong signalID); 75 75 76 76 // Signals 77 static gint doNothingSignal 77 static gint doNothingSignal(GtkWidget* widget, GdkEvent* event, void* nothing); 78 78 #endif /* HAVE_GTK2 */ 79 79 … … 99 99 void destroy(void); 100 100 101 void setGroupName 102 char* getGroupName 103 104 virtual void fill 101 void setGroupName(char* name); 102 char* getGroupName(void); 103 104 virtual void fill(Widget* lowerWidget) = 0; //!< An abstract function, that fills Packers. 105 105 }; 106 106 … … 121 121 void destroy(void); 122 122 123 // void setBorderWidth 124 // virtual void setTitle 125 void fill 123 // void setBorderWidth(int borderwidth); 124 // virtual void setTitle(char* title) = 0; 125 void fill(Widget* lowerWidget); 126 126 }; 127 127 … … 142 142 Window(char* windowName); 143 143 ~Window(void); 144 void init( );144 void init(void); 145 145 void destroy(void); 146 146 … … 166 166 public: 167 167 Frame(void); 168 Frame 168 Frame(char* frameName); 169 169 ~Frame(void); 170 170 void init(void); … … 181 181 { 182 182 public: 183 EventBox 184 EventBox 183 EventBox(void); 184 EventBox(char* eventBoxName); 185 185 ~EventBox(void); 186 186 void init(void); … … 194 194 A Box can Contain multiple Widgets, that are ordered either horizontally or vertically 195 195 I defined the standartbox to be horizontally. 196 A Box is always filled left->right (horizontally) or up->down(vertically)196 A Box is always filled left->right(horizontally) or up->down(vertically) 197 197 */ 198 198 class Box : public Packer 199 199 { 200 200 public: 201 Box 202 Box 201 Box(void); 202 Box(char boxtype); 203 203 ~Box(void); 204 204 void init(char boxtype); 205 205 void destroy(void); 206 206 207 void fill 207 void fill(Widget* lowerWidget); 208 208 209 209 void setTitle(char* title); … … 223 223 void destroy(void); 224 224 225 int value; //!< every option has a value either true or false 225 int value; //!< every option has a value either true or false(0,1) or something else like 25 for 25% of the volume 226 226 char* flagName; //!< options have a flag name that will be appendet if you start the Program from the GUI. 227 227 char* flagNameShort; //!< like flag_name but shorter 228 int defaultValue; //!< A default value is good, for hiding a option if it is not needed. 228 int defaultValue; //!< A default value is good, for hiding a option if it is not needed.(hidden if value == default_value) 229 229 230 230 void saveability(void); 231 231 void saveability(bool isSaveable); 232 232 bool isSaveable(void); 233 void setFlagName 234 void setFlagName 235 virtual void redraw 233 void setFlagName(char* flagname, int defaultvalue); 234 void setFlagName(char* flagname, char* flagnameshort, int defaultvalue); 235 virtual void redraw(void) = 0; //!< A Option must be able to redraw itself. 236 236 virtual void changeOption(void) = 0; //!< What to do, if an Option is Changed. eacht option decides for itself. 237 237 #ifdef HAVE_GTK2 238 238 // Signals 239 static gint OptionChange 239 static gint OptionChange(GtkWidget* widget, Widget* option); //!< Signal for Options that change. 240 240 #endif /* HAVE_GTK2 */ 241 241 }; … … 248 248 { 249 249 public: 250 Button 250 Button(char* buttonname); 251 251 ~Button(void); 252 252 void init(void); … … 254 254 255 255 void setTitle(char* title); 256 void redraw( );256 void redraw(void); 257 257 void changeOption(void); 258 258 }; … … 264 264 { 265 265 public: 266 CheckButton 266 CheckButton(char* buttonname); 267 267 ~CheckButton(void); 268 268 void init(void); … … 270 270 271 271 void setTitle(char* title); 272 bool isActive( ); //!< a Bool value to see, if this CheckButton is active.273 void redraw ();272 bool isActive(void); //!< a Bool value to see, if this CheckButton is active. 273 void redraw(void); 274 274 void changeOption(void); 275 275 }; … … 307 307 308 308 public: 309 Menu 309 Menu(char* menuname, ...); 310 310 ~Menu(void); 311 311 void init(void); … … 332 332 void setValue(char* newValue); 333 333 void setTitle(char* title); 334 void redraw( );335 void changeOption( );334 void redraw(void); 335 void changeOption(void); 336 336 337 337 char* cValue; //!< The Value the Label will have. \todo make private … … 343 343 { 344 344 public: 345 Label 346 Label 345 Label(void); 346 Label(char* text); 347 347 ~Label(void); 348 348 void init(void); … … 353 353 void appendText(char* textToAppend); 354 354 void appendInt(int intToAppend); 355 char* getText ();355 char* getText(void); 356 356 }; 357 357 … … 360 360 { 361 361 public: 362 ProgressBar 363 ProgressBar 364 ~ProgressBar 365 void init(void); 366 void destroy(void); 367 368 void setTitle(char* title); 369 void setProgress 370 void setTotalSize 371 double getProgress 362 ProgressBar(void); 363 ProgressBar(char* label); 364 ~ProgressBar(void); 365 void init(void); 366 void destroy(void); 367 368 void setTitle(char* title); 369 void setProgress(double progress); 370 void setTotalSize(double totalSize); 371 double getProgress(void); 372 372 373 373 private: … … 387 387 { 388 388 public: 389 Image 389 Image(char* imgaename); 390 390 ~Image(void); 391 391 void init(void); … … 395 395 }; 396 396 397 //gint orxonox_gui_quit 397 //gint orxonox_gui_quit(GtkWidget* widget, GdkEvent* event, gpointer data); 398 398 399 399 #endif /* _ORXONOX_GUI_GTK_H */
Note: See TracChangeset
for help on using the changeset viewer.