Changeset 3292 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
- Timestamp:
- Dec 26, 2004, 5:56:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
r3291 r3292 155 155 \param function must be of type void and takes a Widget* as an Input. 156 156 */ 157 void Widget::walkThrough (void (*function)(Widget*) )157 void Widget::walkThrough (void (*function)(Widget*), unsigned int depth) 158 158 { 159 159 function(this); 160 160 if (this->isOption < 0) 161 161 { 162 static_cast<Packer*>(this)->down->walkThrough (function );162 static_cast<Packer*>(this)->down->walkThrough (function, depth+1); 163 163 } 164 164 165 if (this->next != NULL) 166 this->next->walkThrough(function); 165 if (this->next && depth != 0) 166 this->next->walkThrough(function, depth); 167 } 168 169 /** 170 \brief Moves through all the Widgets downwards from this and executes the function on them. 171 \param function must be of type void and takes a Widget* as an Input. 172 \param data Additional Data you want to pass to the function. 173 */ 174 void Widget::walkThrough (void (*function)(Widget*, void*), void* data, unsigned int depth) 175 { 176 function(this, data); 177 if (this->isOption < 0) 178 { 179 static_cast<Packer*>(this)->down->walkThrough(function, data, depth+1); 180 } 181 if (this->next && depth != 0) 182 this->next->walkThrough(function, data, depth); 167 183 } 168 184 … … 188 204 { 189 205 if (widget->isOption >= 1) 190 static_cast<Option*>(widget)->redraw(); // <<" is : " << static_cast<Option*>(this)->value <<endl;206 static_cast<Option*>(widget)->redraw(); 191 207 } 192 208 … … 635 651 636 652 /** 637 \ destructs an EventBox.653 \brief destructs an EventBox. 638 654 */ 639 655 EventBox::~EventBox(void) … … 703 719 704 720 /** 705 \ destructs a Box.721 \brief destructs a Box. 706 722 */ 707 723 Box::~Box(void) … … 890 906 891 907 /** 892 \ destructs a Button.908 \brief destructs a Button. 893 909 */ 894 910 Button::~Button(void) … … 964 980 965 981 /** 966 \ destructs a CheckButton.982 \brief destructs a CheckButton. 967 983 */ 968 984 CheckButton::~CheckButton(void) … … 1064 1080 1065 1081 /** 1066 \ destructs a Slider.1082 \brief destructs a Slider. 1067 1083 */ 1068 1084 Slider::~Slider(void) … … 1178 1194 1179 1195 /** 1180 \ destructs a Menu.1196 \brief destructs a Menu. 1181 1197 */ 1182 1198 Menu::~Menu(void) … … 1280 1296 1281 1297 /** 1282 \ destructs an OptionLabel.1298 \brief destructs an OptionLabel. 1283 1299 */ 1284 1300 OptionLabel::~OptionLabel(void) … … 1375 1391 1376 1392 /** 1377 \ destructs a Label.1393 \brief destructs a Label. 1378 1394 */ 1379 1395 Label::~Label(void) … … 1553 1569 1554 1570 /** 1555 \ destructs an Image.1571 \brief destructs an Image. 1556 1572 */ 1557 1573 Image::~Image(void)
Note: See TracChangeset
for help on using the changeset viewer.