Changeset 2588 in orxonox.OLD for orxonox/trunk/gui/orxonox_gui.h
- Timestamp:
- Oct 17, 2004, 5:18:58 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui.h
r2587 r2588 1 /*! 2 \file orxonox_gui.h 3 \brief Contains all Widgets and the Creation of the Gui 4 */ 5 1 6 #ifndef _ORXONOX_GUI_H 2 7 #define _ORXONOX_GUI_H … … 19 24 #include <gtk/gtkeventbox.h> 20 25 26 //! Class that creates the OrxonoxGui 21 27 class OrxonoxGui 22 28 { … … 27 33 }; 28 34 35 //! This is the topmost object that can be displayed all others are derived from it. 36 29 37 class Widget 30 38 { 31 39 private: 32 40 public: 33 Widget* next; 34 GtkWidget* widget; 41 Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next 42 GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains. 35 43 virtual void init(void); 36 int is_option; 44 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 37 45 38 46 void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *)); … … 48 56 49 57 50 58 //! This is a Container Class, it can contain one sub-Widget: down. 59 /** 60 * A Container is a Widget that can hold a subWidget in addition to a next-Widget. 61 * The Container can by itself not be displayed created or used. 62 * The derived classes of Container can be displayed 63 */ 51 64 class Container : public Widget 52 65 { … … 58 71 public: 59 72 void init(void); 60 Widget* down; 61 void setBorderWidth (int borderwidth);62 virtual void setTitle (char* title) = 0;73 Widget* down; //!< this points to the Widget below this. 74 // void setBorderWidth (int borderwidth); 75 // virtual void setTitle (char* title) = 0; 63 76 void fill (Widget *lowerWidget); 64 77 }; 65 78 79 //! Window is the class that creates new Windows, and handels them 80 /** 81 * A Window is a class derived from Container that contains a window-widget. 82 * It has the ability to hold one sub-object 83 */ 66 84 class Window : public Container 67 85 { … … 73 91 74 92 void setTitle (char* title); 75 void showall (); 93 void showall (); 76 94 static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data); 77 95 }; 78 96 97 //! Frame is the class that handles frames 98 /** 99 * A Frame is an object, that has a border and if you like a name on it. 100 * It can contain a Widget, which means that you can insert anything you like inside of a frame 101 */ 79 102 class Frame :public Container 80 103 { … … 88 111 }; 89 112 113 //! EventBox is a Container that can Handle all Events happening inside of it. 114 /** 115 * Example: if you have a picture, and you want it to catch mouse-clicks, you have to pack it inside a EventBox 116 */ 90 117 class EventBox : public Container 91 118 { … … 99 126 }; 100 127 128 //! A Box can contain multiple Widgets 129 /** 130 * A Box can Contain multiple Widgets, that are ordered either horizontally or vertically 131 * I defined the standartbox to be horizontally. 132 * A Box is always filled left->right (horizontally) or up->down (vertically) 133 */ 101 134 class Box : public Widget 102 135 { … … 107 140 void init(char boxtype); 108 141 109 Widget* down; 142 Widget* down; //!< the Lower Widget of a Box. 110 143 void fill (Widget* lowerWidget); 111 144 112 145 }; 113 146 147 //! Image is the keeper of one Image 148 /** 149 * Images are mighty cool. 150 * Images can help you lighten up the Programming process, and will give everyone a better impression of the Software. 151 */ 114 152 class Image : public Widget 115 153 { … … 120 158 }; 121 159 160 //! An Option is a Widget that contains something that may change its state. 161 /** 162 * Options are the essence of a GUI, they: Configure, Start, Quit, Execute, and make it worth something 163 */ 122 164 class Option : public Widget 123 165 { … … 126 168 void init(void); 127 169 128 int value; 129 char* option_name; 130 char* flag_name; 131 char* flag_name_short; 132 int default_value; 170 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 them 172 char* flag_name; //!< options have a flag name that will be appendet if you start the Program from the GUI. 173 char* flag_name_short; //!< like flag_name but shorter 174 int default_value; //!< A default value is good, for hiding a option if it is not needed. (hidden if value == default_value) 133 175 134 176 void setFlagName (char* flagname, int defaultvalue); 135 177 void setFlagName (char* flagname, char* flagnameshort, int defaultvalue); 136 virtual void redraw () = 0; 137 }; 138 178 virtual void redraw () = 0; //!< A Option must be able to redraw itself. 179 }; 180 181 //! Buttons can be pressed, and released. 182 /** 183 * Buttons are mainly there for executing some action like Starting the Programm, or Quiting it. 184 */ 139 185 class Button : public Option 140 186 { … … 149 195 }; 150 196 197 //! CheckButtons are a key in configuring bool Variables 198 /** CheckButtons can configure bool Variables like wireframe on/off, enable_sound etc. 199 */ 151 200 class CheckButton : public Option 152 201 { … … 162 211 }; 163 212 213 //! Sliders are Options that can be modified in their value 214 /** 215 * good for volume, brightness, etc. 216 */ 164 217 class Slider : public Option 165 218 { … … 176 229 }; 177 230 231 //! A Menu is an Option that has a dropdown menu, where you can chose between different Items 178 232 class Menu : public Option 179 233 { … … 195 249 }; 196 250 251 //! A label is a Widget, that displays a text 197 252 class Label : public Widget 198 253 {
Note: See TracChangeset
for help on using the changeset viewer.