Changeset 3304 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
- Timestamp:
- Dec 28, 2004, 9:46:54 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
r3300 r3304 955 955 } 956 956 957 #ifdef HAVE_GTK2 958 /** 959 \brief Signal OptionChange writes the Value from the Slider to its Object-Database. 960 \param widget The widget(Slider) that has a changed Value 961 \param slider the Slider-Object that should receive the change. 962 */ 963 gint Option::OptionChange (GtkWidget *widget, Widget* option) 964 { 965 static_cast<Option*>(option)->changeOption(); 966 flags->setTextFromFlags(orxonoxGUI); //// must be different !!! 967 } 968 #endif /* HAVE_GTK2 */ 969 970 957 971 /* BUTTON */ 958 972 … … 1021 1035 not implemented yet 1022 1036 */ 1023 void Button::redraw () 1024 { 1037 void Button::redraw (void) 1038 { 1039 } 1040 1041 /** 1042 \brief Button can not be changed, optionChange is empty) 1043 */ 1044 void Button::changeOption(void) 1045 { 1046 1025 1047 } 1026 1048 … … 1098 1120 } 1099 1121 1100 #ifdef HAVE_GTK2 1101 /** 1102 \brief Signal OptionChange writes the Value from the CheckButton to its Object-Database. 1103 \param widget The widget(CheckButton) that has a changed Value 1104 \param checkbutton the CheckButton-Object that should receive the change. 1105 */ 1106 gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton) 1107 { 1108 static_cast<CheckButton*>(checkbutton)->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ((CheckButton*)checkbutton->widget)); 1109 flags->setTextFromFlags(orxonoxGUI); ////// must be different!!! 1110 cout << static_cast<CheckButton*>(checkbutton)->title << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl; 1111 } 1112 #endif /* HAVE_GTK2 */ 1122 /** 1123 \brief Changed the Option, call this Function 1124 */ 1125 void CheckButton::changeOption() 1126 { 1127 #ifdef HAVE_GTK2 1128 this->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (this->widget)); 1129 #endif /* HAVE_GTK2 */ 1130 cout << this->title << " set to: " << this->value << endl; 1131 } 1132 1113 1133 1114 1134 /** … … 1210 1230 } 1211 1231 1212 #ifdef HAVE_GTK2 1213 /** 1214 \brief Signal OptionChange writes the Value from the Slider to its Object-Database. 1215 \param widget The widget(Slider) that has a changed Value 1216 \param slider the Slider-Object that should receive the change. 1217 */ 1218 gint Slider::OptionChange (GtkWidget *widget, Widget* slider) 1219 { 1220 static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE ((Slider*)slider->widget)); 1221 flags->setTextFromFlags(orxonoxGUI); //// must be different !!! 1222 cout << static_cast<Slider*>(slider)->title << " set to: "<< static_cast<Slider*>(slider)->value << endl; 1223 } 1224 #endif /* HAVE_GTK2 */ 1225 1232 /** 1233 \brief Changed the Option, call this Function 1234 */ 1235 void Slider::changeOption() 1236 { 1237 #ifdef HAVE_GTK2 1238 this->value = (int)gtk_range_get_value(GTK_RANGE(this->widget)); 1239 #endif /* HAVE_GTK2 */ 1240 cout << this->title << " set to: " << this->value << endl; 1241 } 1226 1242 1227 1243 /* MENU */ … … 1329 1345 } 1330 1346 1331 #ifdef HAVE_GTK2 1332 /** 1333 \brief Signal OptionChange writes the Value from the Menu to its Object-Database. 1334 \param widget The widget(Menu) that has a changed Value 1335 \param menu the Menu-Object that should receive the change. 1336 */ 1337 gint Menu::OptionChange (GtkWidget *widget, Widget* menu) 1338 { 1339 static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget)); 1340 flags->setTextFromFlags(orxonoxGUI); //// must be different !!! 1341 cout << static_cast<Menu*>(menu)->title << " changed to : " << static_cast<Menu*>(menu)->value << endl; 1342 } 1343 #endif /* HAVE_GTK2 */ 1347 /** 1348 \brief Changed the Option, call this Function 1349 */ 1350 void Menu::changeOption() 1351 { 1352 #ifdef HAVE_GTK2 1353 this->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (this->widget)); 1354 #endif /* HAVE_GTK2 */ 1355 cout << this->title << " set to: " << this->value << endl; 1356 } 1344 1357 1345 1358 /* OPTION LABEL */ … … 1421 1434 strcpy(this->title, title); 1422 1435 #ifdef HAVE_GTK2 1423 gtk_label_set_text (GTK_LABEL 1436 gtk_label_set_text (GTK_LABEL(widget), title); 1424 1437 #endif /* HAVE_GTK2 */ 1425 1438 } … … 1432 1445 1433 1446 } 1447 1448 /** 1449 \brief Changed the Option, call this Function 1450 */ 1451 void OptionLabel::changeOption() 1452 { 1453 #ifdef HAVE_GTK2 1454 this->cValue = (char*)gtk_label_get_text (GTK_LABEL(this->widget)); 1455 #endif /* HAVE_GTK2 */ 1456 cout << this->title << " set to: " << this->cValue << endl; 1457 } 1458 1434 1459 1435 1460 /**
Note: See TracChangeset
for help on using the changeset viewer.