Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2588 in orxonox.OLD


Ignore:
Timestamp:
Oct 17, 2004, 5:18:58 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: doxygen orxodox created for all h-files, classes and functions.

Location:
orxonox/trunk/gui
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/gui/orxonox_gui.cc

    r2587 r2588  
    4848/* ORXONOXGUI */
    4949
     50/**
     51 * Initializes the Gui
     52*/
    5053OrxonoxGui::OrxonoxGui (int argc, char *argv[])
    5154{
    52   /**
    53    * Initializes the Gui
    54    */
    5555  gtk_init (&argc, &argv);
    5656  gtk_rc_parse( "rc" );
     
    9999
    100100/* WIDGET */
    101 
     101/**
     102 * Initializes a widget.
     103 * Nothing to do here.
     104 */
    102105void Widget::init()
    103106{
     
    105108}
    106109
     110/**
     111 * Connect any signal to any given Sub-widget
     112 */
    107113void Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *))
    108114{
    109   /**
    110    * Connect any signal to any given Sub-widget
    111    */
    112115  g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), NULL);
    113116}
    114117
     118/**
     119 * Connect a signal with additionally passing the whole Object
     120 */
    115121void Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *))
    116122{
    117   /**
    118    * Connect a signal with additionally passing the whole Object
    119    */
    120123g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this);
    121124}
    122125
     126/**
     127 * Connect a signal with additionally passing a whole external Object
     128 */
    123129void Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *))
    124130{
    125   /**
    126    * Connect a signal with additionally passing a whole external Object
    127    */
    128131  g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj);
    129132}
     133
     134
     135/**
     136 * Function to Shows a specific widget.
     137 */
    130138void Widget::show()
    131139{
    132   /**
    133    * Function to Show any Widget
    134    */
    135   gtk_widget_show (widget);
    136 }
    137 
     140  gtk_widget_show (this->widget);
     141}
     142
     143/**
     144 * Moves through all the Widgets downwards from this and executes the function on them.
     145 \param function must be of type void and takes a Widget* as an Input.
     146
     147 */
    138148void Widget::walkThrough (void (*function)(Widget*))
    139149{
    140   /**
    141    * Moves Through all the Widgets downwards from this and executes the function on them.
    142    * function must be of type void and takes a Widget* as an Input.
    143    */
    144150  function(this);
    145151  switch (this->is_option)
     
    158164
    159165
     166/**
     167 * This is for listing the option of "widget"
     168 \param widget specifies the widget that should be listed
     169*/
    160170void Widget::listOptions (Widget* widget)
    161171{
    162   /**
    163    * This is for listing the option of "widget"
    164    */
    165172  if (widget->is_option >= 1)
    166173    cout << static_cast<Option*>(widget)->option_name <<" is : " << static_cast<Option*>(widget)->value <<endl;
    167174}
    168175
     176/**
     177 * This is for setting the option of "widget"
     178 \param widget specifies the widget that should be set.
     179*/
    169180void Widget::setOptions (Widget* widget)
    170181{
    171   /**
    172    * This is for setting the option of "widget"
    173    */
    174182  if (widget->is_option >= 1)
    175183    static_cast<Option*>(widget)->redraw();// <<" is : " << static_cast<Option*>(this)->value <<endl;
     
    177185
    178186/* CONTAINERS*/
     187
     188/**
     189 * Initializes a Container.
     190 * nothing to do here
     191 */
    179192void Container::init (void)
    180193{
    181194  return;
    182195}
     196
     197/**
     198 * Fills a Container with lowerWidget.
     199 * It does this by filling up the down pointer only if down points to NULL.
     200 \param lowerWidget the Widget that should be filled into the Container.
     201*/
    183202void Container::fill (Widget *lowerWidget)
    184203{
    185   /**
    186    * fills any given Container with a lowerwidet
    187    */
    188204  if (this->down == NULL)
    189205    {
     
    199215/* WINDOW */
    200216
     217  /**
     218   * Creating a new Window without a Name
     219   */
    201220Window::Window (void)
    202221{
    203   /**
    204    * Creating a Window
    205    */
    206   this->init();
    207 }
    208 
     222  this->init();
     223}
     224
     225/**
     226 * Creating a Window with a name
     227 \param windowName the name the window should get.
     228 */
    209229Window::Window (char* windowName)
    210230{
    211   /**
    212    * Creating a Window with passing a name
    213    */
    214231  this->init();
    215232  this->setTitle (windowName);
    216233}
    217234
     235/**
     236 * Destoying a Window (very BAD implemented).
     237 * For now it just hides the window.
     238 */
    218239Window::~Window ()
    219240{
    220   /**
    221    * Destoying a Window (very BAD implemented)
    222    */
    223241  gtk_widget_hide (widget);
    224  
    225 }
    226 
     242}
     243
     244/**
     245 *initializes a new Window
     246 */
    227247void Window::init()
    228248{
    229   /**
    230   *initializes a new Window
    231   */
    232249  is_option = -1;
    233250  next = NULL;
     
    241258}
    242259
     260/**
     261 * Shows all Widgets that are included within this->widget.
     262 */
    243263void Window::showall ()
    244264{
    245   /**
    246    * Shows all Widgets that are included within this Widget
    247    */
    248265  gtk_widget_show_all  (widget);
    249266}
    250267
     268/**
     269 * Set The Window-title to title
     270 \param title title the Window should get.
     271*/
    251272void Window::setTitle (char* title)
    252273{
    253   /**
    254    * Set The Window title to title
    255    */
    256274  gtk_window_set_title (GTK_WINDOW (widget), title);
    257275}
    258276
    259 
     277/**
     278 * Quits the orxonox_GUI.
     279 * This can be called as a Signal and is therefor static
     280 \param widget The widget that called this function
     281 \param event the event that happened to execute this function
     282 \param data some data passed with the Signal
     283 */
    260284gint Window::orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data)
    261285{
    262   /**
    263    * Quits the orxonox_GUI
    264    */
    265286  if (exec->shouldsave())
    266287    exec->writeToFile (orxonoxGUI);
     
    273294/* FRAME */
    274295
     296/**
     297 * Creates a new Frame without a name
     298 */
    275299Frame::Frame (void)
    276300{
    277   /**
    278    * Creates a new Frame without a name
    279    */
    280   this->init();
    281 }
     301  this->init();
     302}
     303
     304/**
     305 * Creates a new Frame with name title
     306 */
    282307Frame::Frame (char* title)
    283308{
    284   /**
    285    * Creates a new Frame with name title
    286    */
    287309  this->init();
    288310  this->setTitle(title);
    289311}
     312
     313/**
     314 * Destroys given Frame (not implemented yet)
     315 */
    290316Frame::~Frame ()
    291317{
    292   /**
    293    * Destroys given Frame (not implemented yet)
    294    */
    295 }
    296 
     318}
     319
     320/**
     321 * Initializes a new Frame with default settings
     322 */
    297323void Frame::init()
    298324{
     
    304330}
    305331
     332/**
     333 * Sets the Frames name to title
     334 \param title The title the Frame should get.
     335 */
    306336void Frame::setTitle (char* title)
    307337{
    308   /**
    309    * Sets the Frames name to title
    310    */
    311338  gtk_frame_set_label (GTK_FRAME (widget), title);
    312339}
    313340
    314341// EVENTBOX //
     342
     343/**
     344 * Creates a new EventBox with default settings.
     345 */
    315346EventBox::EventBox ()
    316347{
    317348  this->init();
    318349}
    319 
     350/**
     351 * Creates a new EventBox with name title
     352 \param title title the Eventbox should get (only data-structure-internal)
     353*/
    320354EventBox::EventBox (char* title)
    321355{
    322   /**
    323    * Creates a new EventBox with name title
    324    */
    325356  this->init();
    326357  this->setTitle(title);
    327358
    328359}
     360
     361/**
     362 * Initializes a new EventBox
     363 */
    329364void EventBox::init(void)
    330365{
     
    337372}
    338373
    339 
     374/**
     375 * Sets the Title of the EventBox (not implemented)
     376 \param title Name the EventBox should get (only datastructure-internal).
     377*/
    340378void EventBox::setTitle (char* title)
    341379{
    342   /**
    343    * Sets the EventBoxes name to title
    344    */
    345   //  gtk_frame_set_label (GTK_FRAME (widget), title);
    346 }
     380
     381}
     382
     383/**
     384 * Destructs an EventBox (not Implemented)
     385 */
    347386EventBox::~EventBox ()
    348387{
     
    352391/* BOX */
    353392
     393/**
     394 * Creates a new horizontal Box
     395 */
    354396Box::Box (void)
    355397{
    356   /**
    357    * Creates a new horizontal Box
    358    */
    359398  this->init('h');
    360399}
     400
     401/**
     402 * Creates a new Box of type boxtype
     403 \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
     404 */
    361405Box::Box (char boxtype)
    362406{
    363   /**
    364    * Creates a new Box if boxtype is 'v' it will be vertically, if 'h' it will be horizontally
    365    */
    366407  this->init(boxtype);
    367408}
     409
     410/**
     411 * Destroys given Box (not implemented yet)
     412 */
    368413Box::~Box ()
    369414{
    370   /**
    371    * Destroys given Frame (not implemented yet)
    372    */
    373 }
    374 
     415}
     416
     417/**
     418 * Initializes a new Box with type boxtype
     419 \param boxtype see Box(char boxtype)
     420*/
    375421void Box::init(char boxtype)
    376422{
     
    388434}
    389435
    390 
     436/**
     437 * Fills a box with a given Widget.
     438 * 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
     439 \param lowerWidget the next Widget that should be appendet to this Box
     440 */
    391441void Box::fill (Widget *lowerWidget)
    392442{
     
    411461/* IMAGE */
    412462
     463/**
     464 * Creates a new Image
     465 \param imagename the location of the Image on the Hard Disc
     466*/
    413467Image::Image (char* imagename)
    414468{
     469  this->init();
     470  widget = gtk_image_new_from_file (imagename);
     471}
     472
     473/**
     474 * Initializes a new Image
     475 */
     476void Image::init()
     477{
    415478  is_option = 0;
    416479  next = NULL;
    417   widget = gtk_image_new_from_file (imagename);
    418 }
    419 void Image::init()
    420 {
    421  
    422480}
    423481
    424482
    425483/* OPTION */
     484
     485/**
     486 * Initializes a new Option: nothing to do here
     487 */
    426488void Option::init()
    427489{
    428490  return;
    429491}
     492
     493/**
     494 * This sets The FlagName of an Option and defines its default Values
     495 !! Options will be saved if flagname is different from "" !!
     496\param flagname the Name that will be displayed in the output
     497\param defaultvalue the default Value for this Option (see definition of defaultvalue
     498*/
    430499void Option::setFlagName (char* flagname, int defaultvalue)
    431500{
     
    435504}
    436505
     506/**
     507 * see Option::setFlagName (char* flagname, int defaultvalue)
     508 \param flagname the Name that will be displayed in the output
     509 \param defaultvalue the default Value for this Option (see definition of defaultvalue
     510 \param flagnameshort a short flagname to be displayed in the output
     511*/
    437512void Option::setFlagName (char* flagname, char* flagnameshort,  int defaultvalue)
    438513{
    439   /**
    440    * \brief Sets the Flagname of an Option. If it is set different then "" this Option will be saved to the Configurationfile
    441    */
    442514  flag_name = flagname;
    443515  flag_name_short = flagnameshort;
     
    448520
    449521/* BUTTON */
     522
     523/**
     524 * Creates a new Button with a buttonname
     525 \param buttonname sets the Name of the Button
     526*/
    450527Button::Button(char* buttonname)
    451528{
    452   /**
    453    * Creates a new Button with name buttonname
    454    */
    455529  this->init();
    456530  this->setTitle(buttonname);
    457531}
    458532
     533/**
     534 * Initializes a new Button
     535 */
    459536void Button::init(void)
    460537{
     
    469546}
    470547
     548/**
     549 * Sets a new name to the Button
     550\param title The name the Button should get
     551*/
    471552void Button::setTitle (char *title)
    472553{
     
    475556}
    476557
     558/**
     559 * redraws the Button
     560 * not implemented yet
     561 */
    477562void Button::redraw ()
    478563{
     
    480565
    481566/* CHECKBUTTON */
     567
     568/**
     569 * Creates a new CheckButton with an ame
     570 \param buttonname The name the CheckButton should display.
     571 */
    482572CheckButton::CheckButton (char* buttonname)
    483573{
    484   /**
    485    * Creates a new CheckButton with name buttonname
    486    */
    487574  this->init();
    488575  this->setTitle(buttonname);
     
    490577  this->connectSignal ("clicked", this->OptionChange);
    491578}
     579
     580/**
     581 * Destructs a CheckButton (not Implemented yet).
     582 */
    492583CheckButton::~CheckButton()
    493584{
    494585}
    495586
     587/**
     588 * Initiali a new CheckButton with default settings
     589 */
    496590void CheckButton::init(void)
    497591{
     
    505599  widget = gtk_check_button_new_with_label ("");
    506600}
     601
     602/**
     603 * Sets a new Title to a CheckButton
     604 \param title The new Name the CheckButton should display.
     605*/
    507606void CheckButton::setTitle(char* title)
    508607{
     
    511610}
    512611
     612
     613/**
     614 * Signal OptionChange writes the Value from the CheckButton to its Object-Database.
     615 \param widget The widget(CheckButton) that has a changed Value
     616 \param checkbutton the CheckButton-Object that should receive the change.
     617 */
    513618gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton)
    514619{
    515   /**
    516    * Writes value, if changed on the checkbutton, to the object.
    517    */
    518620  static_cast<CheckButton*>(checkbutton)->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ((CheckButton*)checkbutton->widget));
    519621  flags->setTextFromFlags(orxonoxGUI);
     
    521623}
    522624
     625/**
     626 * Redraws the CheckButton (if option has changed).
     627 * Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
     628 */
    523629void CheckButton::redraw ()
    524630{
     
    527633
    528634/* SLIDER */
     635
     636/**
     637 * Creates a new Slider
     638 \param slidername The data-structure-name of the slider.
     639 \param start The minimal Value of the slider.
     640 \param end The maximal Value of the slider.
     641*/
    529642Slider::Slider (char* slidername, int start, int end)
    530643{
    531   /**
    532    * Creates a new Slider with name slidername a beginning value of start and an end value of end.
    533    */
    534644  this->init(start, end);
    535645  this->setValue(start);
     
    538648}
    539649
     650/**
     651 * Destructs a Slider (not implemented yet)
     652 */
    540653Slider::~Slider()
    541654{
    542655}
    543656
     657/**
     658 * Initializes a Slider with start and end Values
     659 * params: see Slider::Slider (char* slidername, int start, int end)
     660 */
    544661void Slider::init(int start, int end)
    545662{
     
    553670  widget = gtk_hscale_new_with_range (start, end, 5);
    554671}
     672
     673/**
     674 * Sets a new Title to the Slider
     675 \param title The new Name of the slider
     676*/
    555677void Slider::setTitle(char* title)
    556678{
    557679  option_name = title;
    558680}
     681
     682/**
     683 * Setting a new value to the Slider.
     684 * Maybe you also require a Slider::redraw() for this to display
     685 */
    559686void Slider::setValue(int value)
    560687{
     
    562689}
    563690
     691/**
     692 * Signal OptionChange writes the Value from the Slider to its Object-Database.
     693 \param widget The widget(Slider) that has a changed Value
     694 \param slider the Slider-Object that should receive the change.
     695 */
    564696gint Slider::OptionChange (GtkWidget *widget, Widget* slider)
    565697{
    566   /**
    567    * Writes value, if changed on the slider, to the object.
    568    */
    569698  static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE ((Slider*)slider->widget));
    570699  flags->setTextFromFlags(orxonoxGUI);
     
    572701}
    573702
     703/**
     704 * Redraws the widget
     705 * Example: see void CheckButton::redraw ()
     706 */
    574707void Slider::redraw ()
    575708{
     
    577710}
    578711
     712/* MENU */
     713
     714/**
     715 * Creates a Menu-Item-list out of multiple input.
     716 * !! Consider, that the last input argument has to be "lastItem" for this to work!!
     717 \param menuname The Database-Name of this Menu
     718 \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
     719 */
    579720Menu::Menu (char* menuname, ...)
    580721{
    581   /**
    582    * Creates an Menu-Item-list out of multiple input. Consider, that the last input argument has to be "lastItem" for this to work.
    583    */
    584722  this->init();
    585723  this->setTitle(menuname);
     
    598736}
    599737
     738/**
     739 * Initializes a new Menu with no items
     740 */
    600741void Menu::init(void)
    601742{
     
    611752}
    612753
     754/**
     755 * Sets the Database-Name of this Menu
     756 \param title Database-Name to be set.
     757*/
    613758void Menu::setTitle(char* title)
    614759{
     
    616761}
    617762
     763/**
     764 * appends a new Item to the Menu-List.
     765 \param itemName the itemName to be appendet.
     766*/
    618767void Menu::addItem (char* itemName)
    619768{
     
    622771}
    623772
    624 gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
    625 {
    626   /**
    627    * Writes value, if changed on the Menu, to the object.
    628    */
     773/**
     774 * Signal OptionChange writes the Value from the Menu to its Object-Database.
     775 \param widget The widget(Menu) that has a changed Value
     776 \param menu the Menu-Object that should receive the change.
     777 */gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
     778{
    629779  static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget));
    630780  flags->setTextFromFlags(orxonoxGUI);
     
    632782}
    633783
     784/**
     785 * Redraws the widget
     786 * Example: see void CheckButton::redraw ()
     787 */
    634788void Menu::redraw ()
    635789{
     
    637791}
    638792
     793/**
     794 * Creates a new default Label with no Text.
     795 * You migth consider adding Label::setTitle with this.
     796 */
    639797Label:: Label ()
    640798{
     
    642800}
    643801
     802/**
     803 * Creates a new Label with a Text.
     804 \param text The text to be displayed.
     805*/
    644806Label:: Label (char* text)
    645807{
     
    650812}
    651813
     814/**
     815 * Destructs a Label
     816 */
    652817Label::~Label ()
    653818{}
    654819
     820/**
     821 * initializes a new Label
     822 */
    655823void Label::init(void)
    656824{
     
    661829  gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
    662830}
    663  
     831
     832/**
     833 * Sets a new Text to a Label.
     834 \param text The text to be inserted into the Label.
     835 */
    664836void Label::setText (char * text)
    665837{
     
    667839}
    668840
     841/**
     842 * get the Text of a Label
     843 \return The Text the Label holds.
     844*/
    669845char* Label::getText ()
    670846{
  • 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
    16#ifndef _ORXONOX_GUI_H
    27#define _ORXONOX_GUI_H
     
    1924#include <gtk/gtkeventbox.h>
    2025
     26//! Class that creates the OrxonoxGui
    2127class OrxonoxGui
    2228{
     
    2733};
    2834
     35//! This is the topmost object that can be displayed all others are derived from it.
     36
    2937class Widget
    3038{
    3139 private:
    3240 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.
    3543  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
    3745
    3846  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
     
    4856
    4957
    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*/
    5164class Container : public Widget
    5265{
     
    5871 public:
    5972  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;
    6376  void fill (Widget *lowerWidget);
    6477};
    6578
     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 */
    6684class Window : public Container
    6785{
     
    7391 
    7492  void setTitle (char* title);
    75   void showall ();
     93  void showall (); 
    7694  static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
    7795};
    7896
     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 */
    79102class Frame :public Container
    80103{
     
    88111};
    89112
     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 */
    90117class EventBox : public Container
    91118{
     
    99126};
    100127
     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 */
    101134class Box : public Widget
    102135{
     
    107140  void init(char boxtype);
    108141
    109   Widget* down;
     142  Widget* down; //!< the Lower Widget of a Box.
    110143  void fill (Widget* lowerWidget);
    111144
    112145};
    113146
     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 */
    114152class Image : public Widget
    115153{
     
    120158};
    121159
     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 */
    122164class Option : public Widget
    123165{
     
    126168  void init(void);
    127169
    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)
    133175
    134176  void setFlagName (char* flagname, int defaultvalue);
    135177  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 */
    139185class Button : public Option
    140186{
     
    149195};
    150196
     197//! CheckButtons are a key in configuring bool Variables
     198/** CheckButtons can configure bool Variables like wireframe on/off, enable_sound etc.
     199 */
    151200class CheckButton : public Option
    152201{
     
    162211};
    163212
     213//! Sliders are Options that can be modified in their value
     214/**
     215 * good for volume, brightness, etc.
     216 */
    164217class Slider : public Option
    165218{
     
    176229};
    177230
     231//! A Menu is an Option that has a dropdown menu, where you can chose between different Items
    178232class Menu : public Option
    179233{
     
    195249};
    196250
     251//! A label is a Widget, that displays a text
    197252class Label : public Widget
    198253{
  • orxonox/trunk/gui/orxonox_gui_audio.cc

    r2581 r2588  
    2626#include "orxonox_gui_audio.h"
    2727
     28/**
     29   \brief Creates an Audio-Frame
     30*/
    2831OrxonoxGuiAudio::OrxonoxGuiAudio ()
    2932{
     
    4851}
    4952
     53/**
     54   \brief Return the Frame
     55   \return Returns the Audio-frame
     56*/
    5057Frame* OrxonoxGuiAudio::getFrame ()
    5158{
  • orxonox/trunk/gui/orxonox_gui_audio.h

    r2018 r2588  
     1/*!
     2  \file orxonox_gui_audio.h
     3  \brief File that holds the class that creates the Audio-Options.
     4*/
     5
    16#ifndef _ORXONOX_GUI_AUDIO_H
    27#define _ORXONOX_GUI_AUDIO_H
     
    49#include "orxonox_gui.h"
    510
     11//! Class that creates the Audio-Options.
    612class OrxonoxGuiAudio
    713{
  • orxonox/trunk/gui/orxonox_gui_banner.cc

    r2581 r2588  
    2727#include <iostream.h>
    2828
     29/**
     30   \brief Creates a new BannerEventBox and its content.
     31*/
    2932OrxonoxGuiBanner::OrxonoxGuiBanner ()
    3033{
     
    3639}
    3740
     41/**
     42   \brief Destructs it.
     43*/
    3844OrxonoxGuiBanner::~OrxonoxGuiBanner ()
    3945{
    4046}
    4147
     48/**
     49    \brief Opens up our LOGO-Window.\n
     50    it creates a new one if it has not yet been opened.\n
     51    it shows it if it has been created
     52*/
    4253void OrxonoxGuiBanner::logoWindowNew()
    4354{
     
    6576    }
    6677}
     78
     79/**
     80   \brief Hides Window through ~Window();
     81*/
    6782void OrxonoxGuiBanner::logoWindowClose()
    6883{
     
    7186}
    7287
    73 
    74 
     88/**
     89   \brief Returns an EventBox
     90   \return The EventBox, that holds the Banner.
     91*/
    7592EventBox* OrxonoxGuiBanner::getEventBox ()
    7693{
     
    7895}
    7996
     97/**
     98   \brief opens up the banner-window.\n
     99   this is the Signal that does it. !!SIGNALS ARE STATIC!!
     100   \param widget the widget that did it!
     101   \param event the event that did it!
     102   \param banner the Object that holds the banner-logo-window
     103*/
    80104gint LogoWindowOpen (GtkWidget* widget, GdkEvent* event, void* banner)
    81105{
    82   //cout << data->is_option<<"\n";
    83106  static_cast<OrxonoxGuiBanner*>(banner)->logoWindowNew();
    84107}
    85108
     109/**
     110   \brief closes the banner-window.\n
     111   this is the Signal that does it. !!SIGNALS ARE STATIC!!
     112   \param widget the widget that did it!
     113   \param event the event that did it!
     114   \param banner the Object that holds the banner-logo-window
     115*/
    86116gint LogoWindowClose (GtkWidget *widget, GdkEvent* event, void* banner)
    87117{
  • orxonox/trunk/gui/orxonox_gui_banner.h

    r2581 r2588  
     1/*!
     2  \file orxonox_gui_banner.h
     3  \brief  File that holds the class that creates the Banner-Image.\n
     4  This is Commercial :-)
     5*/
     6
    17#ifndef _ORXONOX_GUI_BANNER_H
    28#define _ORXONOX_GUI_BANNER_H
     
    410#include "orxonox_gui.h"
    511
     12//! Class that creates the Banner-Image
    613class OrxonoxGuiBanner
    714{
     
    916  Frame* bannerFrame;
    1017  Box* bannerBox;
    11   EventBox* bannerEventBox;
     18  EventBox* bannerEventBox; //!< an Image needs an EventBox to catch klicks
    1219  Image* bannerImage;
    1320  Label* bannerLabel;
     
    2532  EventBox* getEventBox ();
    2633};
     34
    2735gint LogoWindowOpen (GtkWidget *widget, GdkEvent* event, void* banner);
    2836gint LogoWindowClose (GtkWidget *widget, GdkEvent* event, void* banner);
  • orxonox/trunk/gui/orxonox_gui_exec.cc

    r2584 r2588  
    2828#include <string>
    2929
     30/**
     31    \brief Creates the Exec-Frame
     32    \param orxonoxGUI ExecFrame needs to know where to get the Options from
     33*/
    3034OrxonoxGuiExec::OrxonoxGuiExec (Window* orxonoxGUI)
    3135{
     
    5458}
    5559
     60/**
     61   \brief Return the Frame
     62   \return Returns the Exec-frame
     63*/
    5664Frame* OrxonoxGuiExec::getFrame ()
    5765{
     
    6169/* FILE HANDLING */
    6270
     71/**
     72   \brief Sets the location of the configuration File.\n
     73   * The name will be parsed from ~/ to /home/[username] on unix and c:/Documents and Settings/username/Settings/ on Windows
     74   \param filename the location of the configFile
     75*/
    6376void OrxonoxGuiExec::setFilename (char* filename)
    6477{
     
    7891}
    7992
     93/**
     94   \brief checks if a option should be saved.
     95   \return 1 if it should 0 if not/
     96*/
    8097int OrxonoxGuiExec::shouldsave ()
    8198{
     
    83100}
    84101
     102/**
     103    \brief Saves the configuration-file to the Disk.\n
     104    this Function only opens and closes the file, in between OrxonoxGuiExec::writeFileText (Widget* widget) will execute the real writing process.
     105    \param widget from which Widget on should be saved.
     106*/
    85107void OrxonoxGuiExec::writeToFile (Widget* widget)
    86108{
     
    91113}
    92114
     115/**
     116   \brief Actually writes into the configuration file to the disk.
     117   \param widget from which Widget on should be saved.
     118*/
    93119void OrxonoxGuiExec::writeFileText (Widget* widget)
    94120{
     
    121147}
    122148
     149/**
     150   \brief Reads in Configuration Data.
     151   \param widget from which Widget on should be saved.
     152*/
    123153void OrxonoxGuiExec::readFromFile (Widget* widget)
    124154{
     
    150180}
    151181
     182/**
     183   \brief Maps Confugurations to the Options.
     184   \param widget which widget downwards
     185   \param variableName the name of the Variable that should be set up.
     186   \param variableValue the Value of the Variable that should be set up
     187*/
    152188void OrxonoxGuiExec::readFileText (Widget* widget, char* variableName, int variableValue)
    153189{
     
    170206}
    171207
    172 
     208/**
     209   \brief Starts ORXONOX. (not really implemented yet, but the function is there.\n
     210   This is a Signal and can be executed through Widget::signal_connect
     211   \param widget the widget that executed the start command
     212   \param data additional data
     213*/
    173214gint startOrxonox (GtkWidget *widget, Widget* data)
    174215{
    175   /**
    176    * Starts Orxonox.
    177    */
    178216  cout << "Starting Orxonox" <<endl;
    179217}
  • orxonox/trunk/gui/orxonox_gui_exec.h

    r2053 r2588  
     1/*!
     2  \file orxonox_gui_exec.h
     3  \brief File that holds the class that creates the execute-Options.
     4*/
     5
    16#ifndef _ORXONOX_GUI_EXEC_H
    27#define _ORXONOX_GUI_EXEC_H
     
    611using namespace std;
    712
     13//! Class that creates the execute-Options.
    814class OrxonoxGuiExec
    915{
  • orxonox/trunk/gui/orxonox_gui_flags.cc

    r2581 r2588  
    2727#include <iostream.h>
    2828
    29 
     29/**
     30   \brief Creates the Flags-Frame
     31   \param widget The Widget from which the data will be parsed
     32*/
    3033OrxonoxGuiFlags::OrxonoxGuiFlags (Widget* widget)
    3134{
     
    4346}
    4447
     48/**
     49   \brief Function to return the Frame that holds the Flagtext.
     50   \returns Frame that holds the Flagtext.
     51*/
    4552Frame* OrxonoxGuiFlags::getFrame ()
    4653{
     
    4855}
    4956
     57/**
     58   \brief Sets the Flags from widget downwards.
     59   \param widget the Widget from which on to scan for deeper Options and their settings.
     60*/
    5061void OrxonoxGuiFlags::setTextFromFlags (Widget* widget)
    5162{
     
    5667}
    5768
     69/**
     70    \brief this actually sets the flagtext, and appends it to flagText
     71    \param widget like OrxonoxGuiFlags::setTextFromFlags(widget)
     72*/
    5873void OrxonoxGuiFlags::FlagsText(Widget* widget)
    5974{
     
    89104    FlagsText (widget->next);
    90105}
    91 
    92 
  • orxonox/trunk/gui/orxonox_gui_flags.h

    r2018 r2588  
     1/*!
     2  \file orxonox_gui_flags.h
     3  \brief File that holds the class that creates the flags-Text.
     4*/
     5
    16#ifndef _ORXONOX_GUI_FLAGS_H
    27#define _ORXONOX_GUI_FLAGS_H
     
    49#include "orxonox_gui.h"
    510
     11//! Class that creates the flags-Text.
    612class OrxonoxGuiFlags
    713{
  • orxonox/trunk/gui/orxonox_gui_video.cc

    r2581 r2588  
    2828
    2929
    30 
    3130OrxonoxGuiVideo::OrxonoxGuiVideo ()
    3231{
     
    4443}
    4544
     45/**
     46   \brief Return the Frame
     47   \return Returns the Video-frame
     48*/
    4649Frame* OrxonoxGuiVideo::getFrame ()
    4750{
  • orxonox/trunk/gui/orxonox_gui_video.h

    r2018 r2588  
     1/*!
     2  \file orxonox_gui_video.h
     3  \brief File that holds the class that creates the Video-Options.
     4*/
    15#ifndef _ORXONOX_GUI_VIDEO_H
    26#define _ORXONOX_GUI_VIDEO_H
     
    48#include "orxonox_gui.h"
    59
     10//! Class that creates the Video-Options.
    611class OrxonoxGuiVideo
    712{
Note: See TracChangeset for help on using the changeset viewer.