Changeset 2623 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Oct 22, 2004, 11:39:24 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui.cc
r2622 r2623 51 51 52 52 /** 53 *Initializes the Gui53 \brief Initializes the Gui 54 54 */ 55 55 OrxonoxGui::OrxonoxGui (int argc, char *argv[]) … … 106 106 107 107 /** 108 \brief deletes any given Widget109 This is still pretty crappy.108 \brief deletes any given Widget 109 This is still pretty crappy. 110 110 */ 111 111 Widget::~Widget() … … 127 127 128 128 /** 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 */ 132 132 void Widget::init() 133 133 { … … 138 138 139 139 /** 140 *makes the widget visible.141 140 \brief makes the widget visible. 141 */ 142 142 void Widget::show() 143 143 { … … 146 146 147 147 /** 148 *hides the widget.149 148 \brief hides the widget. 149 */ 150 150 void Widget::hide() 151 151 { … … 154 154 155 155 /** 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. 159 159 */ 160 160 void Widget::setSize(int width, int height) … … 164 164 165 165 /** 166 *Connect any signal to any given Sub-widget167 166 \brief Connect any signal to any given Sub-widget 167 */ 168 168 void Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *)) 169 169 { … … 172 172 173 173 /** 174 *Connect a signal with additionally passing the whole Object175 174 \brief Connect a signal with additionally passing the whole Object 175 */ 176 176 void Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *)) 177 177 { … … 180 180 181 181 /** 182 *Connect a signal with additionally passing a whole external Object183 182 \brief Connect a signal with additionally passing a whole external Object 183 */ 184 184 void Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *)) 185 185 { … … 188 188 189 189 /** 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 */ 194 193 void Widget::walkThrough (void (*function)(Widget*)) 195 194 { … … 205 204 206 205 /** 207 *This is for listing the option of "widget"208 \param widget specifies the widget that should be listed206 \brief This is for listing the option of "widget" 207 \param widget specifies the widget that should be listed 209 208 */ 210 209 void Widget::listOptions (Widget* widget) … … 215 214 216 215 /** 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. 219 218 */ 220 219 void Widget::setOptions (Widget* widget) … … 230 229 231 230 /** 232 *Initializes a Packer.233 * nothing to do here234 231 \brief Initializes a Packer. 232 Sets the down-pinter to NULL and other PackerSpecific-values to their defaults. 233 */ 235 234 void Packer::init (void) 236 235 { … … 264 263 265 264 /** 266 *Initializes a Container.267 * nothing to do here268 265 \brief Initializes a Container. 266 sets the Container-Specific defaults. 267 */ 269 268 void Container::init (void) 270 269 { … … 272 271 273 272 static_cast<Packer*>(this)->init(); 273 274 274 return; 275 275 } 276 276 277 277 /** 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. 281 281 */ 282 282 void Container::fill (Widget *lowerWidget) … … 295 295 /* WINDOW */ 296 296 297 298 *Creating a new Window without a Name299 297 /** 298 \brief Creating a new Window without a Name 299 */ 300 300 Window::Window (void) 301 301 { … … 304 304 305 305 /** 306 *Creating a Window with a name307 \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 */ 309 309 Window::Window (char* windowName) 310 310 { … … 314 314 315 315 /** 316 *initializes a new Window317 316 \brief initializes a new Window 317 */ 318 318 void Window::init() 319 319 { … … 331 331 332 332 /** 333 *Shows all Widgets that are included within this->widget.334 333 \brief Shows all Widgets that are included within this->widget. 334 */ 335 335 void Window::showall () 336 336 { … … 340 340 341 341 /** 342 *Set The Window-title to title343 \param title title the Window should get.342 \brief Set The Window-title to title 343 \param title title the Window should get. 344 344 */ 345 345 void Window::setTitle (char* title) … … 369 369 370 370 /** 371 *Creates a new Frame without a name372 371 \brief Creates a new Frame without a name 372 */ 373 373 Frame::Frame (void) 374 374 { … … 377 377 378 378 /** 379 *Creates a new Frame with name title380 379 \brief Creates a new Frame with name title 380 */ 381 381 Frame::Frame (char* title) 382 382 { … … 386 386 387 387 /** 388 *Initializes a new Frame with default settings389 388 \brief Initializes a new Frame with default settings 389 */ 390 390 void Frame::init() 391 391 { … … 397 397 398 398 /** 399 *Sets the Frames name to title400 \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 */ 402 402 void Frame::setTitle (char* title) 403 403 { … … 409 409 410 410 /** 411 *Creates a new EventBox with default settings.412 411 \brief Creates a new EventBox with default settings. 412 */ 413 413 EventBox::EventBox () 414 414 { … … 416 416 } 417 417 /** 418 *Creates a new EventBox with name title419 \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) 420 420 */ 421 421 EventBox::EventBox (char* title) … … 427 427 428 428 /** 429 *Initializes a new EventBox430 429 \brief Initializes a new EventBox 430 */ 431 431 void EventBox::init(void) 432 432 { … … 441 441 442 442 /** 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). 445 445 */ 446 446 void EventBox::setTitle (char* title) … … 452 452 453 453 /** 454 *Creates a new horizontal Box455 454 \brief Creates a new horizontal Box 455 */ 456 456 Box::Box (void) 457 457 { … … 460 460 461 461 /** 462 *Creates a new Box of type boxtype463 \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally464 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 */ 465 465 Box::Box (char boxtype) 466 466 { … … 469 469 470 470 /** 471 *Initializes a new Box with type boxtype472 \param boxtype see Box(char boxtype)471 \brief Initializes a new Box with type boxtype 472 \param boxtype see Box(char boxtype) 473 473 */ 474 474 void Box::init(char boxtype) … … 488 488 489 489 /** 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 Next492 \param lowerWidget the next Widget that should be appendet to this Box493 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 */ 494 494 void Box::fill (Widget *lowerWidget) 495 495 { 496 /**497 * Fill a Box with its lowerwidgets498 */499 496 gtk_box_pack_start (GTK_BOX (this->widget), lowerWidget->widget, TRUE, TRUE, 0); 500 497 if (this->down == NULL) … … 515 512 516 513 /** 517 *Creates a new Image518 \param imagename the location of the Image on the Hard Disc514 \brief Creates a new Image 515 \param imagename the location of the Image on the Hard Disc 519 516 */ 520 517 Image::Image (char* imagename) … … 526 523 527 524 /** 528 *Initializes a new Image529 525 \brief Initializes a new Image 526 */ 530 527 void Image::init() 531 528 { … … 539 536 540 537 /** 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 */ 543 541 void Option::init() 544 542 { … … 554 552 555 553 /** 556 *This sets The FlagName of an Option and defines its default Values557 !! Options will be saved if flagname is different from "" !!558 \param flagname the Name that will be displayed in the output559 \param defaultvalue the default Value for this Option (see definition of defaultvalue554 \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 560 558 */ 561 559 void Option::setFlagName (char* flagname, int defaultvalue) … … 567 565 568 566 /** 569 *see Option::setFlagName (char* flagname, int defaultvalue)570 \param flagname the Name that will be displayed in the output571 \param defaultvalue the default Value for this Option (see definition of defaultvalue572 \param flagnameshort a short flagname to be displayed in the output567 \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 573 571 */ 574 572 void Option::setFlagName (char* flagname, char* flagnameshort, int defaultvalue) … … 584 582 585 583 /** 586 *Creates a new Button with a buttonname587 \param buttonname sets the Name of the Button584 \brief Creates a new Button with a buttonname 585 \param buttonname sets the Name of the Button 588 586 */ 589 587 Button::Button(char* buttonname) … … 594 592 595 593 /** 596 *Initializes a new Button597 594 \brief Initializes a new Button 595 */ 598 596 void Button::init(void) 599 597 { … … 606 604 607 605 /** 608 *Sets a new name to the Button609 \param title The name the Button should get606 \brief Sets a new name to the Button 607 \param title The name the Button should get 610 608 */ 611 609 void Button::setTitle (char *title) … … 616 614 617 615 /** 618 *redraws the Button619 *not implemented yet620 616 \brief redraws the Button 617 not implemented yet 618 */ 621 619 void Button::redraw () 622 620 { … … 626 624 627 625 /** 628 *Creates a new CheckButton with an ame629 \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 */ 631 629 CheckButton::CheckButton (char* buttonname) 632 630 { … … 638 636 639 637 /** 640 * Initialia new CheckButton with default settings641 638 \brief Initialize a new CheckButton with default settings 639 */ 642 640 void CheckButton::init(void) 643 641 { … … 650 648 651 649 /** 652 *Sets a new Title to a CheckButton653 \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. 654 652 */ 655 653 void CheckButton::setTitle(char* title) … … 661 659 662 660 /** 663 *Signal OptionChange writes the Value from the CheckButton to its Object-Database.664 \param widget The widget(CheckButton) that has a changed Value665 \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 */ 667 665 gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton) 668 666 { … … 673 671 674 672 /** 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 Change677 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 */ 678 676 void CheckButton::redraw () 679 677 { … … 684 682 685 683 /** 686 *Creates a new Slider687 \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. 690 688 */ 691 689 Slider::Slider (char* slidername, int start, int end) … … 698 696 699 697 /** 700 *Initializes a Slider with start and end Values701 *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 */ 703 701 void Slider::init(int start, int end) 704 702 { … … 711 709 712 710 /** 713 *Sets a new Title to the Slider714 \param title The new Name of the slider711 \brief Sets a new Title to the Slider 712 \param title The new Name of the slider 715 713 */ 716 714 void Slider::setTitle(char* title) … … 720 718 721 719 /** 722 *Setting a new value to the Slider.723 *Maybe you also require a Slider::redraw() for this to display724 720 \brief Setting a new value to the Slider. 721 Maybe you also require a Slider::redraw() for this to display 722 */ 725 723 void Slider::setValue(int value) 726 724 { … … 729 727 730 728 /** 731 *Signal OptionChange writes the Value from the Slider to its Object-Database.732 \param widget The widget(Slider) that has a changed Value733 \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 */ 735 733 gint Slider::OptionChange (GtkWidget *widget, Widget* slider) 736 734 { … … 741 739 742 740 /** 743 *Redraws the widget744 *Example: see void CheckButton::redraw ()745 741 \brief Redraws the widget 742 Example: see void CheckButton::redraw () 743 */ 746 744 void Slider::redraw () 747 745 { … … 752 750 753 751 /** 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 Menu757 \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 */ 759 757 Menu::Menu (char* menuname, ...) 760 758 { … … 776 774 777 775 /** 778 *Initializes a new Menu with no items779 776 \brief Initializes a new Menu with no items 777 */ 780 778 void Menu::init(void) 781 779 { … … 799 797 800 798 /** 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. 803 801 */ 804 802 void Menu::addItem (char* itemName) … … 809 807 810 808 /** 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 */ 813 gint Menu::OptionChange (GtkWidget *widget, Widget* menu) 815 814 { 816 815 static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget)); … … 820 819 821 820 /** 822 *Redraws the widget823 *Example: see void CheckButton::redraw ()821 \brief Redraws the widget 822 Example: see void CheckButton::redraw () 824 823 */ 825 824 void Menu::redraw () … … 829 828 830 829 /** 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 */ 834 833 Label:: Label () 835 834 { … … 838 837 839 838 /** 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. 842 841 */ 843 842 Label:: Label (char* text) … … 848 847 849 848 /** 850 *initializes a new Label851 849 \brief initializes a new Label 850 */ 852 851 void Label::init(void) 853 852 { … … 861 860 862 861 /** 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 */ 866 865 void Label::setText (char * text) 867 866 { … … 871 870 872 871 /** 873 *get the Text of a Label874 \return The Text the Label holds.872 \brief get the Text of a Label 873 \return The Text the Label holds. 875 874 */ 876 875 char* Label::getText ()
Note: See TracChangeset
for help on using the changeset viewer.