Changeset 3187 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Dec 15, 2004, 9:00:38 PM (20 years ago)
- Location:
- orxonox/trunk/gui
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui.cc
r3167 r3187 21 21 ### File Specific: 22 22 main-programmer: Benjamin Grauer 23 24 ToDO:25 way to start gui without GTK (textmode)26 curl interface to Download cool stuff27 28 chain all the windows when starting the GUI (DANGER: performance!!)29 30 widgets save themselves31 good way to step through all the Widgets32 ... many more ...33 label -> protected : getlabel function34 23 35 24 */ -
orxonox/trunk/gui/orxonox_gui.h
r3164 r3187 2 2 \file orxonox_gui.h 3 3 \brief Creation of the Gui 4 5 \todo way to start gui without GTK (textmode) AND IMPROOVE 6 \todo curl interface to Download cool stuff 7 8 \todo widgets save themselves 9 \todo good way to step through all the Widgets 10 \todo label -> protected : getlabel function 4 11 */ 5 12 -
orxonox/trunk/gui/orxonox_gui_audio.h
r2595 r3187 13 13 { 14 14 private: 15 Frame* audioFrame; 16 Box* audioBox; 17 CheckButton* enableSound; 18 Slider* musicVolume; 19 Slider* effectsVolume; 15 Frame* audioFrame; //!< The Frame that holds the audio Options. 16 Box* audioBox; //!< The Box that holds the audio Options. 17 CheckButton* enableSound; //!< A Ckeckbutton for enabling Sound. 18 Slider* musicVolume; //!< A Slider for music volume. 19 Slider* effectsVolume; //!< A Slider for effects volume. 20 20 public: 21 21 OrxonoxGuiAudio (); -
orxonox/trunk/gui/orxonox_gui_banner.h
r3153 r3187 15 15 private: 16 16 // the banner Frame 17 Frame* bannerFrame; 18 Box* bannerBox; 19 EventBox* bannerEventBox; //!< an Image needs an EventBox to catch klicks 20 Image* bannerImage; 21 Label* bannerLabel; 17 Frame* bannerFrame; //!< The frame that holds the Banner. 18 Box* bannerBox; //!< The box that holds the Banner. 19 EventBox* bannerEventBox; //!< an Image needs an EventBox to catch klicks. 20 Image* bannerImage; //!< The Image for the Banner. 21 Label* bannerLabel; //!< The Label of the Banner. 22 22 23 23 // the logo Window 24 Window* logoWindow; 25 EventBox* logoEventBox; 26 Box* logoBox; 27 Image* logoImage; 28 Label* logoLabel; 24 Window* logoWindow; //!< The Window that holds the Orxonox-CrewLogo. 25 EventBox* logoEventBox; //!< The EventBox that holds the Orxonox-CrewLogo. it has to be an eventbox, because Images can not receive clicks. 26 Box* logoBox; //!< The Box that holds the Orxonox-CrewLogo 27 Image* logoImage; //!< The Orxonox-CrewLogo-Image 28 Label* logoLabel; //!< The Label for the Orxonox-CrewLogo 29 29 30 30 public: -
orxonox/trunk/gui/orxonox_gui_exec.cc
r3165 r3187 110 110 /** 111 111 \brief Saves the configuration-file to the Disk.\n 112 \param widget from which Widget on should be saved. 113 112 114 this Function only opens and closes the file, in between OrxonoxGuiExec::writeFileText (Widget* widget) will execute the real writing process. 113 \param widget from which Widget on should be saved.114 115 */ 115 116 void OrxonoxGuiExec::writeToFile (Widget* widget) … … 248 249 249 250 /** 250 \brief locates a Group member 251 \brief Locates a Group. 252 \param widget The Widget from where to search from 253 \param groupName The GroupName for which to search. 254 \param depth The Depth of the search seen from the first widget we searched from. 255 \returns The Widget that holds the Group, or the NULL if the Group wasn't found. 251 256 */ 252 257 Widget* OrxonoxGuiExec::locateGroup(Widget* widget, char* groupName, int depth) -
orxonox/trunk/gui/orxonox_gui_exec.h
r3165 r3187 15 15 { 16 16 private: 17 Frame* execFrame; 18 Box* execBox; 19 Button* start; 20 CheckButton* saveSettings; 21 Menu* verboseMode; 22 CheckButton* alwaysShow; 23 Button* quit; 24 char* configFile; 25 FILE* CONFIG_FILE; 17 Frame* execFrame; //!< The Frame that holds the ExecutionOptions. 18 Box* execBox; //!< The Box that holds the ExecutionOptions. 19 Button* start; //!< The start Button of orxonox. 20 CheckButton* saveSettings; //!< A CheckBox for if the Options should be saved. 21 Menu* verboseMode; //!< A Menu for setting the verbose-Mode. \todo setting up a verbose-class. 22 CheckButton* alwaysShow; //!< A CheckButton, for if orxonox should start with or without gui. 23 Button* quit; //!< A Button to quit the Gui without starting orxonox. 24 char* configFile; //!< The name of the .orxonox.conf(ig)-file. 25 FILE* CONFIG_FILE; //!< Filehandler for reading and writing. 26 26 27 public: 27 28 OrxonoxGuiExec (Window* orxonoxGUI); -
orxonox/trunk/gui/orxonox_gui_flags.h
r2595 r3187 13 13 { 14 14 private: 15 Frame* flagsFrame; 16 Box* flagsBox; 17 CheckButton* shortFlags; 18 Label* flagsLabel; 19 char* flagText; 15 Frame* flagsFrame; //!< The Frame that holds the flagsDisplay. 16 Box* flagsBox; //!< The Box that holds the flagsDisplay. 17 CheckButton* shortFlags; //!< CheckButton to change the display of short and long flags \todo show long if long not availible... 18 Label* flagsLabel; //!< The Label of the Flags 19 char* flagText; //!< The Text of the Label. \todo Delete when Object is destroyed. 20 20 21 21 public: -
orxonox/trunk/gui/orxonox_gui_gtk.cc
r3166 r3187 40 40 41 41 #ifdef HAVE_GTK2 42 /** 43 \brief Initializes the Guis GTK-stuff. 44 \param argc the argument count. 45 \param argv The Argument strings. 46 */ 42 47 bool initGTK(int argc, char *argv[]) 43 48 { … … 45 50 gtk_rc_parse( "rc" ); 46 51 } 52 53 /** 54 \brief enters the GTK-main-loop 55 */ 47 56 bool mainloopGTK(void) 48 57 { … … 158 167 /** 159 168 \brief Moves through all the Widgets downwards from this and executes the function on them. 160 \param function must be of type void and takes a Widget* as an Input.169 \param Function must be of type void and takes a Widget* as an Input. 161 170 */ 162 171 void Widget::walkThrough (void (*function)(Widget*)) … … 197 206 198 207 #ifdef HAVE_GTK2 208 209 /** 210 \brief Signal that does absolutely nothing 211 \param widget The widget that initiated the Signal 212 \param event The event-type. 213 \param nothing nothin. 214 */ 199 215 gint Widget::doNothingSignal (GtkWidget *widget, GdkEvent* event, void* nothing) 200 216 { … … 209 225 /** 210 226 \brief Initializes a Packer. 227 211 228 Sets the down-pinter to NULL and other PackerSpecific-values to their defaults. 212 229 */ … … 246 263 /** 247 264 \brief Initializes a Container. 265 248 266 sets the Container-Specific defaults. 249 267 */ … … 259 277 /** 260 278 \briefFills a Container with lowerWidget. 279 \param lowerWidget the Widget that should be filled into the Container. 280 261 281 It does this by filling up the down pointer only if down points to NULL. 262 \param lowerWidget the Widget that should be filled into the Container.263 282 */ 264 283 void Container::fill (Widget *lowerWidget) … … 281 300 Window* Window::mainWindow = NULL; 282 301 302 /** 303 \brief Adds a new Window Windows to the List of Windows. 304 \param windowToAdd The Windows that should be added to the List 305 \todo this instead of windowToAdd (possibly) 306 */ 283 307 void Window::addWindow(Window* windowToAdd) 284 308 { … … 410 434 \brief opens up a window (not topmost Window). 411 435 this is the Signal that does it. !!SIGNALS ARE STATIC!! 412 \param widget the widget that did it !413 \param event the event that did it !436 \param widget the widget that did it. 437 \param event the event that did it. 414 438 \param window the Window that should be opened 415 439 */ … … 585 609 /** 586 610 \brief Fills a box with a given Widget. 611 \param lowerWidget the next Widget that should be appendet to this Box 612 587 613 It does this by apending the first one to its down-pointer and all its following ones to the preceding next-pointer. The last one will receive a NULL pointer as Next 588 \param lowerWidget the next Widget that should be appendet to this Box589 614 */ 590 615 void Box::fill (Widget *lowerWidget) … … 658 683 /** 659 684 \brief This sets The FlagName of an Option and defines its default Values 660 !! Options will be saved if flagname is different from ""!!685 !! Options will be saved if flagname is different from NULL !! 661 686 \param flagname the Name that will be displayed in the output 662 687 \param defaultvalue the default Value for this Option (see definition of defaultvalue … … 995 1020 } 996 1021 1022 /** 1023 \brief Creates a new OptionLabel with a LabelName and a Value. 1024 \param label The name of the OptionLabel. 1025 \param value The Value of the OptionLabel (what will be displayed). 1026 */ 997 1027 OptionLabel::OptionLabel(char* label, char* value) 998 1028 { … … 1002 1032 } 1003 1033 1034 /** 1035 \brief Initializes an OptionLabel 1036 */ 1004 1037 void OptionLabel::init(void) 1005 1038 { … … 1013 1046 } 1014 1047 1048 /** 1049 \brief Updates the value of an OptionLabel 1050 \param newValue The new Name that should be displayed. 1051 */ 1015 1052 void OptionLabel::setValue(char* newValue) 1016 1053 { … … 1024 1061 } 1025 1062 1063 /** 1064 \brief Sets a ned Title to the OptionLabel. 1065 \param title The now title of the OptionLabel. 1066 */ 1026 1067 void OptionLabel::setTitle(char* title) 1027 1068 { … … 1035 1076 } 1036 1077 1078 /** 1079 \brief Redraws an OptionLabel (not implemented yet, but it works). 1080 */ 1037 1081 void OptionLabel::redraw(void) 1038 1082 { -
orxonox/trunk/gui/orxonox_gui_gtk.h
r3165 r3187 38 38 { 39 39 private: 40 40 41 public: 41 42 ~Widget (); … … 111 112 { 112 113 private: 113 bool isOpen; 114 public: 115 static Window* mainWindow; 114 bool isOpen; //!< A bool Variable that checks if a Window is already open. 115 public: 116 static Window* mainWindow; //!< Pointer to the First Window that was opened. By default this should be the GUI's main-Window. 116 117 static void addWindow(Window* windowToAdd); 117 118 … … 163 164 //! A Box can contain multiple Widgets 164 165 /** 165 *A Box can Contain multiple Widgets, that are ordered either horizontally or vertically166 *I defined the standartbox to be horizontally.167 *A Box is always filled left->right (horizontally) or up->down (vertically)168 166 A Box can Contain multiple Widgets, that are ordered either horizontally or vertically 167 I defined the standartbox to be horizontally. 168 A Box is always filled left->right (horizontally) or up->down (vertically) 169 */ 169 170 class Box : public Packer 170 171 { … … 204 205 char* flagNameShort; //!< like flag_name but shorter 205 206 int defaultValue; //!< A default value is good, for hiding a option if it is not needed. (hidden if value == default_value) 206 bool saveable; //! Options can be Saved.207 bool saveable; //!< Options can be Saved. 207 208 208 209 void setFlagName (char* flagname, int defaultvalue); … … 268 269 private: 269 270 #ifdef HAVE_GTK2 270 GtkWidget* menu; 271 GtkWidget* item; 272 #endif /* HAVE_GTK2 */ 273 va_list itemlist; 271 GtkWidget* menu; //!< The menu That will hold the Options. 272 GtkWidget* item; //!< One Item From a Menu. 273 #endif /* HAVE_GTK2 */ 274 va_list itemlist; //!> The list to readin multiple Options. 274 275 275 276 public: … … 293 294 void init(void); 294 295 295 char* cValue; 296 char* cValue; //!< The Value the Label will have. 296 297 297 298 void setValue(char* newValue); -
orxonox/trunk/gui/orxonox_gui_keys.cc
r3166 r3187 53 53 54 54 /* PLAYER */ 55 56 /** 57 \brief Creates new inputs for a player 58 \param player the name of the Player 59 */ 55 60 Player::Player(char* player) 56 61 { … … 97 102 } 98 103 104 /** 105 \brief adds a new Key. 106 \param key the number of the Key 107 \param name The name of the new Key. 108 \returns A widget that has the Key-Box 109 */ 99 110 Widget* Player::addKey (KEYS key, char* name) 100 111 { … … 114 125 } 115 126 127 /** 128 \returns the OpenButton of a Player 129 */ 116 130 Button* Player::getOpenButton() 117 131 { … … 119 133 } 120 134 121 135 /** 136 \brief sets a new Key (only output) 137 \param key the new Key. 138 */ 122 139 void Player::setkey(KEYS key) 123 140 { -
orxonox/trunk/gui/orxonox_gui_keys.h
r3165 r3187 11 11 #include <gdk/gdkkeysyms.h> 12 12 #endif /* HAVE_GTK2 */ 13 13 14 /** 14 *defines the Possible Player Keys15 15 \brief defines the Possible Player Keys 16 */ 16 17 enum KEYS { UP, DOWN, LEFT, RIGHT, SHOOT }; 17 18 … … 21 22 { 22 23 private: 23 Frame* keysFrame; 24 Box* keysBox; 25 Player* player1; 26 Player* player2; 27 Button* misc; 24 Frame* keysFrame; //!< The Frame that holds the keyOptions. 25 Box* keysBox; //!< The Frame that holds the keyOptions. 26 Player* player1; //!< The first Player's keys. 27 Player* player2; //!< The seconds Player's keys. 28 Button* misc; //!< Other keyboeard options come here. \todo include some like pause, quit and so on. 28 29 29 30 public: … … 35 36 36 37 //! Class to hold infos about a Player 38 /** 39 \todo split into subclass and superclass ButtonConfigurator 40 */ 37 41 class Player 38 42 { 39 43 private: 40 Window* pKeyWindow; 41 Frame* pKeyFrame; 42 Button* openButton; 43 Button* closeButton; 44 Box* pKeysBox; 44 Window* pKeyWindow; //!< The Window for a new Key-setting. 45 Frame* pKeyFrame; //!< The Frame for a new Key-setting. 46 Button* openButton; //!< The OpenButton for this key-settings. 47 Button* closeButton; //!< The CloseButton for this key-settings. 48 Box* pKeysBox; //!< The Box that holds the Key-settings. 45 49 50 //! One KeyOption has one InputKey 46 51 struct InputKey 47 52 { 48 Box* pKeyBox; 49 Button* pKeyButton; 50 OptionLabel* pKeyOLabel; 53 Box* pKeyBox; //!< One Box that holds the Keys 54 Button* pKeyButton; //!< The Button for changing the Key. 55 OptionLabel* pKeyOLabel;//!< The Label for displaying the Key-setting. 51 56 }; 52 57 53 InputKey* inputKey[10]; 58 InputKey* inputKey[10]; //!< Buttons-array. \todo make it dynamic. 54 59 55 static Window* inputWindow; 56 static Button* inputButton; 57 static long keySignal; 60 static Window* inputWindow; //!< A Window that gets keyboard clicks. Static, because only one needed. 61 static Button* inputButton; //!< A Button that gets keyboard clicks. Static, because only one needed. 62 static long keySignal; //!< A keySignal that handles keyboard clicks. Static, because only one needed. 58 63 public: 59 64 Player(char* player); -
orxonox/trunk/gui/orxonox_gui_video.cc
r2739 r3187 27 27 #include "orxonox_gui_video.h" 28 28 29 29 /** 30 \brief Creates the Video-Option-Frame 31 */ 30 32 OrxonoxGuiVideo::OrxonoxGuiVideo () 31 33 { … … 47 49 48 50 /** 49 \brief Return the Frame50 51 \return Returns the Video-frame 51 52 */ -
orxonox/trunk/gui/orxonox_gui_video.h
r2595 r3187 12 12 { 13 13 private: 14 Frame* videoFrame; 15 Box* videoBox; 16 CheckButton* fullscreen; 17 CheckButton* wireframe; 14 Frame* videoFrame; //!< The Frame that holds the video options. 15 Box* videoBox; //!< The Box that holds the video options. 16 CheckButton* fullscreen; //!< CheckButton for fullscreen-mode 17 CheckButton* wireframe; //!< CheckButton for wireframe Mode. 18 18 public: 19 19 OrxonoxGuiVideo ();
Note: See TracChangeset
for help on using the changeset viewer.