Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2623 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Oct 22, 2004, 11:39:24 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: better comments

File:
1 edited

Legend:

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

    r2622 r2623  
    5151
    5252/**
    53  * Initializes the Gui
     53   \brief Initializes the Gui
    5454*/
    5555OrxonoxGui::OrxonoxGui (int argc, char *argv[])
     
    106106
    107107/**
    108  \brief deletes any given Widget
    109  This is still pretty crappy.
     108   \brief deletes any given Widget
     109   This is still pretty crappy.
    110110*/
    111111Widget::~Widget()
     
    127127
    128128/**
    129  * Initializes a widget.
    130  * Nothing to do here.
    131  */
     129   \brief Initializes a widget.
     130   Initializes the next Pointer and the other Widget-specific Defaults.
     131*/
    132132void Widget::init()
    133133{
     
    138138
    139139/**
    140  * makes the widget visible.
    141  */
     140   \brief makes the widget visible.
     141*/
    142142void Widget::show()
    143143{
     
    146146
    147147/**
    148  * hides the widget.
    149  */
     148   \brief hides the widget.
     149*/
    150150void Widget::hide()
    151151{
     
    154154
    155155/**
    156  \brief Sets the resolution of a specific widget to the given size.
    157  \param width the width of the widget to set.
    158  \param height the height of the widget to set.
     156   \brief Sets the resolution of a specific widget to the given size.
     157   \param width the width of the widget to set.
     158   \param height the height of the widget to set.
    159159*/
    160160void Widget::setSize(int width, int height)
     
    164164
    165165/**
    166  * Connect any signal to any given Sub-widget
    167  */
     166    \brief Connect any signal to any given Sub-widget
     167*/
    168168void Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *))
    169169{
     
    172172
    173173/**
    174  * Connect a signal with additionally passing the whole Object
    175  */
     174   \brief Connect a signal with additionally passing the whole Object
     175*/
    176176void Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *))
    177177{
     
    180180
    181181/**
    182  * Connect a signal with additionally passing a whole external Object
    183  */
     182   \brief Connect a signal with additionally passing a whole external Object
     183*/
    184184void Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *))
    185185{
     
    188188
    189189/**
    190  * Moves through all the Widgets downwards from this and executes the function on them.
    191  \param function must be of type void and takes a Widget* as an Input.
    192 
    193  */
     190   \brief Moves through all the Widgets downwards from this and executes the function on them.
     191   \param function must be of type void and takes a Widget* as an Input.
     192*/
    194193void Widget::walkThrough (void (*function)(Widget*))
    195194{
     
    205204
    206205/**
    207  * This is for listing the option of "widget"
    208  \param widget specifies the widget that should be listed
     206    \brief This is for listing the option of "widget"
     207    \param widget specifies the widget that should be listed
    209208*/
    210209void Widget::listOptions (Widget* widget)
     
    215214
    216215/**
    217  * This is for setting the option of "widget"
    218  \param widget specifies the widget that should be set.
     216    \brief This is for setting the option of "widget"
     217    \param widget specifies the widget that should be set.
    219218*/
    220219void Widget::setOptions (Widget* widget)
     
    230229
    231230/**
    232  * Initializes a Packer.
    233  * nothing to do here
    234  */
     231   \brief Initializes a Packer.
     232   Sets the down-pinter to NULL and other PackerSpecific-values to their defaults.
     233*/
    235234void Packer::init (void)
    236235{
     
    264263
    265264/**
    266  * Initializes a Container.
    267  * nothing to do here
    268  */
     265   \brief Initializes a Container.
     266   sets the Container-Specific defaults.
     267*/
    269268void Container::init (void)
    270269{
     
    272271
    273272  static_cast<Packer*>(this)->init();
     273
    274274  return;
    275275}
    276276
    277277/**
    278  * Fills a Container with lowerWidget.
    279  * It does this by filling up the down pointer only if down points to NULL.
    280  \param lowerWidget the Widget that should be filled into the Container.
     278   \briefFills a Container with lowerWidget.
     279   It does this by filling up the down pointer only if down points to NULL.
     280   \param lowerWidget the Widget that should be filled into the Container.
    281281*/
    282282void Container::fill (Widget *lowerWidget)
     
    295295/* WINDOW */
    296296
    297   /**
    298    * Creating a new Window without a Name
    299    */
     297/**
     298   \brief Creating a new Window without a Name
     299*/
    300300Window::Window (void)
    301301{
     
    304304
    305305/**
    306  * Creating a Window with a name
    307  \param windowName the name the window should get.
    308  */
     306   \brief Creating a Window with a name
     307   \param windowName the name the window should get.
     308*/
    309309Window::Window (char* windowName)
    310310{
     
    314314
    315315/**
    316  *initializes a new Window
    317  */
     316   \brief initializes a new Window
     317*/
    318318void Window::init()
    319319{
     
    331331
    332332/**
    333  * Shows all Widgets that are included within this->widget.
    334  */
     333   \brief Shows all Widgets that are included within this->widget.
     334*/
    335335void Window::showall ()
    336336{
     
    340340
    341341/**
    342  * Set The Window-title to title
    343  \param title title the Window should get.
     342   \brief Set The Window-title to title
     343   \param title title the Window should get.
    344344*/
    345345void Window::setTitle (char* title)
     
    369369
    370370/**
    371  * Creates a new Frame without a name
    372  */
     371    \brief Creates a new Frame without a name
     372*/
    373373Frame::Frame (void)
    374374{
     
    377377
    378378/**
    379  * Creates a new Frame with name title
    380  */
     379   \brief Creates a new Frame with name title
     380*/
    381381Frame::Frame (char* title)
    382382{
     
    386386
    387387/**
    388  * Initializes a new Frame with default settings
    389  */
     388    \brief Initializes a new Frame with default settings
     389*/
    390390void Frame::init()
    391391{
     
    397397
    398398/**
    399  * Sets the Frames name to title
    400  \param title The title the Frame should get.
    401  */
     399   \brief Sets the Frames name to title
     400   \param title The title the Frame should get.
     401*/
    402402void Frame::setTitle (char* title)
    403403{
     
    409409
    410410/**
    411  * Creates a new EventBox with default settings.
    412  */
     411   \brief Creates a new EventBox with default settings.
     412*/
    413413EventBox::EventBox ()
    414414{
     
    416416}
    417417/**
    418  * Creates a new EventBox with name title
    419  \param title title the Eventbox should get (only data-structure-internal)
     418   \brief Creates a new EventBox with name title
     419   \param title title the Eventbox should get (only data-structure-internal)
    420420*/
    421421EventBox::EventBox (char* title)
     
    427427
    428428/**
    429  * Initializes a new EventBox
    430  */
     429   \brief Initializes a new EventBox
     430*/
    431431void EventBox::init(void)
    432432{
     
    441441
    442442/**
    443  * Sets the Title of the EventBox (not implemented)
    444  \param title Name the EventBox should get (only datastructure-internal).
     443   \brief Sets the Title of the EventBox (not implemented)
     444   \param title Name the EventBox should get (only datastructure-internal).
    445445*/
    446446void EventBox::setTitle (char* title)
     
    452452
    453453/**
    454  * Creates a new horizontal Box
    455  */
     454   \brief Creates a new horizontal Box
     455*/
    456456Box::Box (void)
    457457{
     
    460460
    461461/**
    462  * Creates a new Box of type boxtype
    463  \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
    464  */
     462   \brief Creates a new Box of type boxtype
     463   \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
     464*/
    465465Box::Box (char boxtype)
    466466{
     
    469469
    470470/**
    471  * Initializes a new Box with type boxtype
    472  \param boxtype see Box(char boxtype)
     471   \brief Initializes a new Box with type boxtype
     472   \param boxtype see Box(char boxtype)
    473473*/
    474474void Box::init(char boxtype)
     
    488488
    489489/**
    490  * Fills a box with a given Widget.
    491  * 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
    492  \param lowerWidget the next Widget that should be appendet to this Box
    493  */
     490    \brief Fills a box with a given Widget.
     491   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
     492    \param lowerWidget the next Widget that should be appendet to this Box
     493*/
    494494void Box::fill (Widget *lowerWidget)
    495495{
    496   /**
    497    * Fill a Box with its lowerwidgets
    498    */
    499496  gtk_box_pack_start (GTK_BOX (this->widget), lowerWidget->widget, TRUE, TRUE, 0);
    500497  if (this->down == NULL)
     
    515512
    516513/**
    517  * Creates a new Image
    518  \param imagename the location of the Image on the Hard Disc
     514   \brief Creates a new Image
     515   \param imagename the location of the Image on the Hard Disc
    519516*/
    520517Image::Image (char* imagename)
     
    526523
    527524/**
    528  * Initializes a new Image
    529  */
     525    \brief Initializes a new Image
     526*/
    530527void Image::init()
    531528{
     
    539536
    540537/**
    541  * Initializes a new Option: nothing to do here
    542  */
     538   \brief Initializes a new Option.
     539   sets all Option-Specific-Values to their defaults.
     540*/
    543541void Option::init()
    544542{
     
    554552
    555553/**
    556  * This sets The FlagName of an Option and defines its default Values
    557  !! Options will be saved if flagname is different from "" !!
    558 \param flagname the Name that will be displayed in the output
    559 \param defaultvalue the default Value for this Option (see definition of defaultvalue
     554   \brief This sets The FlagName of an Option and defines its default Values
     555   !! Options will be saved if flagname is different from "" !!
     556   \param flagname the Name that will be displayed in the output
     557   \param defaultvalue the default Value for this Option (see definition of defaultvalue
    560558*/
    561559void Option::setFlagName (char* flagname, int defaultvalue)
     
    567565
    568566/**
    569  * see Option::setFlagName (char* flagname, int defaultvalue)
    570  \param flagname the Name that will be displayed in the output
    571  \param defaultvalue the default Value for this Option (see definition of defaultvalue
    572  \param flagnameshort a short flagname to be displayed in the output
     567    \brief see Option::setFlagName (char* flagname, int defaultvalue)
     568    \param flagname the Name that will be displayed in the output
     569    \param defaultvalue the default Value for this Option (see definition of defaultvalue
     570    \param flagnameshort a short flagname to be displayed in the output
    573571*/
    574572void Option::setFlagName (char* flagname, char* flagnameshort,  int defaultvalue)
     
    584582
    585583/**
    586  * Creates a new Button with a buttonname
    587  \param buttonname sets the Name of the Button
     584   \brief Creates a new Button with a buttonname
     585   \param buttonname sets the Name of the Button
    588586*/
    589587Button::Button(char* buttonname)
     
    594592
    595593/**
    596  * Initializes a new Button
    597  */
     594   \brief Initializes a new Button
     595*/
    598596void Button::init(void)
    599597{
     
    606604
    607605/**
    608  * Sets a new name to the Button
    609 \param title The name the Button should get
     606   \brief Sets a new name to the Button
     607   \param title The name the Button should get
    610608*/
    611609void Button::setTitle (char *title)
     
    616614
    617615/**
    618  * redraws the Button
    619  * not implemented yet
    620  */
     616   \brief redraws the Button
     617   not implemented yet
     618*/
    621619void Button::redraw ()
    622620{
     
    626624
    627625/**
    628  * Creates a new CheckButton with an ame
    629  \param buttonname The name the CheckButton should display.
    630  */
     626   \brief Creates a new CheckButton with an ame
     627   \param buttonname The name the CheckButton should display.
     628*/
    631629CheckButton::CheckButton (char* buttonname)
    632630{
     
    638636
    639637/**
    640  * Initiali a new CheckButton with default settings
    641  */
     638   \brief Initialize a new CheckButton with default settings
     639*/
    642640void CheckButton::init(void)
    643641{
     
    650648
    651649/**
    652  * Sets a new Title to a CheckButton
    653  \param title The new Name the CheckButton should display.
     650   \brief Sets a new Title to a CheckButton
     651   \param title The new Name the CheckButton should display.
    654652*/
    655653void CheckButton::setTitle(char* title)
     
    661659
    662660/**
    663  * Signal OptionChange writes the Value from the CheckButton to its Object-Database.
    664  \param widget The widget(CheckButton) that has a changed Value
    665  \param checkbutton the CheckButton-Object that should receive the change.
    666  */
     661    \brief Signal OptionChange writes the Value from the CheckButton to its Object-Database.
     662    \param widget The widget(CheckButton) that has a changed Value
     663    \param checkbutton the CheckButton-Object that should receive the change.
     664*/
    667665gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton)
    668666{
     
    673671
    674672/**
    675  * Redraws the CheckButton (if option has changed).
    676  * Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
    677  */
     673   \brief Redraws the CheckButton (if option has changed).
     674   Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
     675*/
    678676void CheckButton::redraw ()
    679677{
     
    684682
    685683/**
    686  * Creates a new Slider
    687  \param slidername The data-structure-name of the slider.
    688  \param start The minimal Value of the slider.
    689  \param end The maximal Value of the slider.
     684   \brief Creates a new Slider
     685   \param slidername The data-structure-name of the slider.
     686   \param start The minimal Value of the slider.
     687   \param end The maximal Value of the slider.
    690688*/
    691689Slider::Slider (char* slidername, int start, int end)
     
    698696
    699697/**
    700  * Initializes a Slider with start and end Values
    701  * params: see Slider::Slider (char* slidername, int start, int end)
    702  */
     698   \brief Initializes a Slider with start and end Values
     699   params: see Slider::Slider (char* slidername, int start, int end)
     700*/
    703701void Slider::init(int start, int end)
    704702{
     
    711709
    712710/**
    713  * Sets a new Title to the Slider
    714  \param title The new Name of the slider
     711   \brief Sets a new Title to the Slider
     712   \param title The new Name of the slider
    715713*/
    716714void Slider::setTitle(char* title)
     
    720718
    721719/**
    722  * Setting a new value to the Slider.
    723  * Maybe you also require a Slider::redraw() for this to display
    724  */
     720   \brief Setting a new value to the Slider.
     721   Maybe you also require a Slider::redraw() for this to display
     722*/
    725723void Slider::setValue(int value)
    726724{
     
    729727
    730728/**
    731  * Signal OptionChange writes the Value from the Slider to its Object-Database.
    732  \param widget The widget(Slider) that has a changed Value
    733  \param slider the Slider-Object that should receive the change.
    734  */
     729    \brief Signal OptionChange writes the Value from the Slider to its Object-Database.
     730    \param widget The widget(Slider) that has a changed Value
     731    \param slider the Slider-Object that should receive the change.
     732*/
    735733gint Slider::OptionChange (GtkWidget *widget, Widget* slider)
    736734{
     
    741739
    742740/**
    743  * Redraws the widget
    744  * Example: see void CheckButton::redraw ()
    745  */
     741   \brief Redraws the widget
     742   Example: see void CheckButton::redraw ()
     743*/
    746744void Slider::redraw ()
    747745{
     
    752750
    753751/**
    754  * Creates a Menu-Item-list out of multiple input.
    755  * !! Consider, that the last input argument has to be "lastItem" for this to work!!
    756  \param menuname The Database-Name of this Menu
    757  \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
    758  */
     752    \brief Creates a Menu-Item-list out of multiple input.
     753   !! Consider, that the last input argument has to be "lastItem" for this to work!!
     754    \param menuname The Database-Name of this Menu
     755    \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
     756*/
    759757Menu::Menu (char* menuname, ...)
    760758{
     
    776774
    777775/**
    778  * Initializes a new Menu with no items
    779  */
     776   \brief Initializes a new Menu with no items
     777*/
    780778void Menu::init(void)
    781779{
     
    799797
    800798/**
    801  * appends a new Item to the Menu-List.
    802  \param itemName the itemName to be appendet.
     799   \brief appends a new Item to the Menu-List.
     800   \param itemName the itemName to be appendet.
    803801*/
    804802void Menu::addItem (char* itemName)
     
    809807
    810808/**
    811  * Signal OptionChange writes the Value from the Menu to its Object-Database.
    812  \param widget The widget(Menu) that has a changed Value
    813  \param menu the Menu-Object that should receive the change.
    814  */gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
     809    \brief Signal OptionChange writes the Value from the Menu to its Object-Database.
     810    \param widget The widget(Menu) that has a changed Value
     811    \param menu the Menu-Object that should receive the change.
     812*/
     813gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
    815814{
    816815  static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget));
     
    820819
    821820/**
    822  * Redraws the widget
    823  * Example: see void CheckButton::redraw ()
     821   \brief Redraws the widget
     822   Example: see void CheckButton::redraw ()
    824823 */
    825824void Menu::redraw ()
     
    829828
    830829/**
    831  * Creates a new default Label with no Text.
    832  * You migth consider adding Label::setTitle with this.
    833  */
     830   \brief Creates a new default Label with no Text.
     831   You migth consider adding Label::setTitle with this.
     832*/
    834833Label:: Label ()
    835834{
     
    838837
    839838/**
    840  * Creates a new Label with a Text.
    841  \param text The text to be displayed.
     839   \brief Creates a new Label with a Text.
     840   \param text The text to be displayed.
    842841*/
    843842Label:: Label (char* text)
     
    848847
    849848/**
    850  * initializes a new Label
    851  */
     849   \brief initializes a new Label
     850*/
    852851void Label::init(void)
    853852{
     
    861860
    862861/**
    863  * Sets a new Text to a Label.
    864  \param text The text to be inserted into the Label.
    865  */
     862   \brief Sets a new Text to a Label.
     863   \param text The text to be inserted into the Label.
     864*/
    866865void Label::setText (char * text)
    867866{
     
    871870
    872871/**
    873  * get the Text of a Label
    874  \return The Text the Label holds.
     872   \brief get the Text of a Label
     873   \return The Text the Label holds.
    875874*/
    876875char* Label::getText ()
Note: See TracChangeset for help on using the changeset viewer.