Changeset 3289 in orxonox.OLD for orxonox/branches/updater/src/gui
- Timestamp:
- Dec 26, 2004, 3:44:44 PM (20 years ago)
- Location:
- orxonox/branches/updater/src/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc
r3288 r3289 64 64 gtk_main(); 65 65 gdk_threads_leave(); 66 } 67 #endif /* HAVE_GTK2 */ 66 delete Window::mainWindow; 67 } 68 #endif /* HAVE_GTK2 */ 69 70 71 ////////////////////////////// 72 /// DEFINING WIDGET-CLASES /// 73 ////////////////////////////// 68 74 69 75 /* WIDGET */ … … 75 81 Widget::~Widget() 76 82 { 77 // cout << "hiding: " <<this->label <<"\n"; 78 this->hide(); 79 // cout << "check if Packer: "<<this->label <<"\n"; 80 if (this->isOption < 0) 81 { 82 // cout << "get Down "<<this->label <<"\n"; 83 static_cast<Packer*>(this)->down->~Widget(); 84 } 85 // cout << "next != NULL?: " <<this->label <<"\n"; 86 if (this->next != NULL) 87 this->next->~Widget(); 88 cout << "delete Widget: " <<this->label <<"\n"; 89 // delete widget; 83 this->destroy(); 90 84 } 91 85 … … 102 96 103 97 /** 98 \brief Destroys a Widget 99 */ 100 void Widget::destroy(void) 101 { 102 if (label) 103 { 104 delete []label; 105 } 106 107 PRINTF(4)("deleting the Widget part.\n"); 108 109 PRINTF(4)("deleting recursively\n"); 110 111 // deleting next item if existent 112 if (this->next) 113 delete this->next; 114 this->next = NULL; 115 116 //! \todo not hiding widget, deleting. 117 // this->hide(); 118 } 119 120 /** 104 121 \brief makes the widget visible. 105 122 */ … … 132 149 #endif /* HAVE_GTK2 */ 133 150 } 134 135 #ifdef HAVE_GTK2136 /**137 \brief Connect any signal to any given Sub-widget138 */139 gulong Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *))140 {141 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), NULL);142 }143 144 /**145 \brief Connect a signal with additionally passing the whole Object146 */147 gulong Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *))148 {149 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this);150 }151 152 /**153 \brief Connect a signal with additionally passing a whole external Object154 */155 gulong Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *))156 {157 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj);158 }159 160 /**161 \brief Connect a signal with additionally passing a whole external Object162 */163 gulong Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEventKey*, void *))164 {165 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj);166 }167 168 void Widget::disconnectSignal (gulong signalID)169 {170 g_signal_handler_disconnect (G_OBJECT (this->widget), signalID);171 }172 #endif /* HAVE_GTK2 */173 151 174 152 /** … … 213 191 214 192 #ifdef HAVE_GTK2 193 /** 194 \brief Connect any signal to any given Sub-widget 195 */ 196 gulong Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *)) 197 { 198 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), NULL); 199 } 200 201 /** 202 \brief Connect a signal with additionally passing the whole Object 203 */ 204 gulong Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *)) 205 { 206 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this); 207 } 208 209 /** 210 \brief Connect a signal with additionally passing a whole external Object 211 */ 212 gulong Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *)) 213 { 214 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj); 215 } 216 217 /** 218 \brief Connect a signal with additionally passing a whole external Object 219 */ 220 gulong Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEventKey*, void *)) 221 { 222 return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj); 223 } 224 225 void Widget::disconnectSignal (gulong signalID) 226 { 227 g_signal_handler_disconnect (G_OBJECT (this->widget), signalID); 228 } 215 229 216 230 /** … … 246 260 247 261 /** 262 \brief Destroys a Packer. 263 */ 264 void Packer::destroy(void) 265 { 266 PRINTF(4)("deleting the Packer part.\n"); 267 268 if (groupName) 269 delete []groupName; 270 271 //deleting recursively. 272 if (this->down) 273 delete this->down; 274 this->down = NULL; 275 276 static_cast<Widget*>(this)->destroy(); 277 } 278 279 /** 248 280 \brief Sets the group name under which all the lower widgets of this will be saved. 249 281 \param name The name of the group. … … 283 315 284 316 /** 317 \brief Destroys a Container. 318 */ 319 void Container::destroy(void) 320 { 321 PRINTF(4)("deleting the Container part.\n"); 322 323 static_cast<Packer*>(this)->destroy(); 324 } 325 326 /** 285 327 \briefFills a Container with lowerWidget. 286 328 \param lowerWidget the Widget that should be filled into the Container. … … 298 340 } 299 341 else 300 cout << "!!error!! You try to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n"<<endl;342 PRINTF(1)("!!error!! You try to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n"); 301 343 } 302 344 … … 329 371 330 372 331 332 373 /** 333 374 \brief Creating a new Window without a Name … … 342 383 \param windowName the name the window should get. 343 384 */ 385 344 386 Window::Window (char* windowName) 345 387 { 346 388 this->init(); 347 389 this->setTitle (windowName); 390 } 391 392 /** 393 \brief Destructs a Window. 394 */ 395 Window::~Window(void) 396 { 397 this->destroy(); 348 398 } 349 399 … … 368 418 gtk_container_set_border_width (GTK_CONTAINER (widget), 3); 369 419 #endif /* HAVE_GTK2 */ 420 } 421 422 /** 423 \brief Destroys a Window. 424 */ 425 void Window::destroy(void) 426 { 427 if (label) 428 PRINTF(3)("deleting the Window: %s\n", label); 429 else 430 PRINTF(3)("deleting the Window.\n"); 431 432 static_cast<Container*>(this)->destroy(); 433 370 434 } 371 435 … … 499 563 } 500 564 565 /** 566 \brief destrcucts a Frame 567 */ 568 Frame::~Frame() 569 { 570 this->destroy(); 571 } 572 501 573 /** 502 574 \brief Initializes a new Frame with default settings … … 510 582 gtk_container_set_border_width (GTK_CONTAINER (widget), 3); 511 583 #endif /* HAVE_GTK2 */ 584 } 585 586 /** 587 \brief Destroys a Frame. 588 */ 589 void Frame::destroy(void) 590 { 591 if (label) 592 PRINTF(3)("deleting the Frame: %s\n", label); 593 else 594 PRINTF(3)("deleting the Frame.\n"); 595 596 static_cast<Container*>(this)->destroy(); 512 597 } 513 598 … … 532 617 \brief Creates a new EventBox with default settings. 533 618 */ 534 EventBox::EventBox ( )619 EventBox::EventBox (void) 535 620 { 536 621 this->init(); … … 548 633 549 634 /** 635 \destructs an EventBox. 636 */ 637 EventBox::~EventBox(void) 638 { 639 this->destroy(); 640 641 } 642 643 /** 550 644 \brief Initializes a new EventBox 551 645 */ … … 560 654 gtk_container_set_border_width (GTK_CONTAINER (widget), 3); 561 655 #endif /* HAVE_GTK2 */ 656 } 657 658 /** 659 \brief Destroys an EventBox. 660 */ 661 void EventBox::destroy(void) 662 { 663 if (label) 664 PRINTF(3)("deleting the EventBox: %s\n", label); 665 else 666 PRINTF(3)("deleting the EventBox.\n"); 667 668 static_cast<Container*>(this)->destroy(); 562 669 } 563 670 … … 591 698 { 592 699 this->init(boxtype); 700 } 701 702 /** 703 \destructs a Box. 704 */ 705 Box::~Box(void) 706 { 707 this->destroy(); 593 708 } 594 709 … … 612 727 } 613 728 #endif /* HAVE_GTK2 */ 729 } 730 731 /** 732 \brief Destroys a Box. 733 */ 734 void Box::destroy(void) 735 { 736 if (label) 737 PRINTF(3)("deleting the Box: %s\n", label); 738 else 739 PRINTF(3)("deleting the Box.\n"); 740 741 static_cast<Packer*>(this)->destroy(); 614 742 } 615 743 … … 641 769 /** 642 770 \brief Sets the Title of a Box. 643 \ title the new Title to set.771 \param title the new Title to set. 644 772 */ 645 773 void Box::setTitle(char* title) … … 668 796 669 797 return; 798 } 799 800 /** 801 \brief Destroys an Option. 802 */ 803 void Option::destroy(void) 804 { 805 PRINTF(4)("deleting the Option Part.\n"); 806 if (flagName) 807 delete []flagName; 808 if (flagNameShort) 809 delete []flagNameShort; 810 811 static_cast<Widget*>(this)->destroy(); 670 812 } 671 813 … … 746 888 747 889 /** 890 \destructs a Button. 891 */ 892 Button::~Button(void) 893 { 894 this->destroy(); 895 } 896 897 /** 748 898 \brief Initializes a new Button 749 899 */ … … 757 907 widget = gtk_button_new_with_label (""); 758 908 #endif /* HAVE_GTK2 */ 909 } 910 911 /** 912 \brief Destroys a Button. 913 */ 914 void Button::destroy(void) 915 { 916 if (label) 917 PRINTF(3)("deleting the Label: %s\n", label); 918 else 919 PRINTF(3)("deleting the Label.\n"); 920 921 static_cast<Option*>(this)->destroy(); 759 922 } 760 923 … … 799 962 800 963 /** 964 \destructs a CheckButton. 965 */ 966 CheckButton::~CheckButton(void) 967 { 968 this->destroy(); 969 } 970 971 /** 801 972 \brief Initialize a new CheckButton with default settings 802 973 */ … … 810 981 widget = gtk_check_button_new_with_label (""); 811 982 #endif /* HAVE_GTK2 */ 983 } 984 985 /** 986 \brief Destroys a CheckButton. 987 */ 988 void CheckButton::destroy(void) 989 { 990 if (label) 991 PRINTF(3)("deleting the CheckButton: %s\n", label); 992 else 993 PRINTF(3)("deleting the CheckButton.\n"); 994 995 static_cast<Option*>(this)->destroy(); 812 996 } 813 997 … … 878 1062 879 1063 /** 1064 \destructs a Slider. 1065 */ 1066 Slider::~Slider(void) 1067 { 1068 this->destroy(); 1069 } 1070 1071 /** 880 1072 \brief Initializes a Slider with start and end Values 881 1073 params: see Slider::Slider (char* slidername, int start, int end) … … 890 1082 widget = gtk_hscale_new_with_range (start, end, 5); 891 1083 #endif /* HAVE_GTK2 */ 1084 } 1085 1086 /** 1087 \brief Destroys a Slider. 1088 */ 1089 void Slider::destroy(void) 1090 { 1091 if (label) 1092 PRINTF(3)("deleting the Slider: %s\n", label); 1093 else 1094 PRINTF(3)("deleting the Slider.\n"); 1095 1096 static_cast<Option*>(this)->destroy(); 1097 892 1098 } 893 1099 … … 911 1117 { 912 1118 this->value = value; 1119 } 1120 1121 /** 1122 \brief Redraws the widget 1123 Example: see void CheckButton::redraw () 1124 */ 1125 void Slider::redraw () 1126 { 1127 #ifdef HAVE_GTK2 1128 gtk_range_set_value (GTK_RANGE (widget), value); 1129 #endif /* HAVE_GTK2 */ 913 1130 } 914 1131 … … 927 1144 #endif /* HAVE_GTK2 */ 928 1145 929 /**930 \brief Redraws the widget931 Example: see void CheckButton::redraw ()932 */933 void Slider::redraw ()934 {935 #ifdef HAVE_GTK2936 gtk_range_set_value (GTK_RANGE (widget), value);937 #endif /* HAVE_GTK2 */938 }939 1146 940 1147 /* MENU */ … … 969 1176 970 1177 /** 1178 \destructs a Menu. 1179 */ 1180 Menu::~Menu(void) 1181 { 1182 this->destroy(); 1183 } 1184 1185 /** 971 1186 \brief Initializes a new Menu with no items 972 1187 */ … … 983 1198 984 1199 } 1200 1201 /** 1202 \brief Destroys a Menu. 1203 */ 1204 void Menu::destroy(void) 1205 { 1206 if (label) 1207 PRINTF(3)("deleting the Menu: %s\n", label); 1208 else 1209 PRINTF(3)("deleting the Menu.\n"); 1210 //! \todo destroy menu 1211 1212 static_cast<Option*>(this)->destroy(); 1213 } 1214 985 1215 986 1216 /** … … 1005 1235 item = gtk_menu_item_new_with_label (itemName); 1006 1236 gtk_menu_shell_append(GTK_MENU_SHELL (menu), item); 1237 #endif /* HAVE_GTK2 */ 1238 } 1239 1240 /** 1241 \brief Redraws the widget 1242 Example: see void CheckButton::redraw () 1243 */ 1244 void Menu::redraw () 1245 { 1246 #ifdef HAVE_GTK2 1247 gtk_option_menu_set_history (GTK_OPTION_MENU (widget), value); 1007 1248 #endif /* HAVE_GTK2 */ 1008 1249 } … … 1022 1263 #endif /* HAVE_GTK2 */ 1023 1264 1024 /** 1025 \brief Redraws the widget 1026 Example: see void CheckButton::redraw () 1027 */ 1028 void Menu::redraw () 1029 { 1030 #ifdef HAVE_GTK2 1031 gtk_option_menu_set_history (GTK_OPTION_MENU (widget), value); 1032 #endif /* HAVE_GTK2 */ 1033 } 1265 /* OPTION LABEL */ 1034 1266 1035 1267 /** … … 1046 1278 1047 1279 /** 1280 \destructs an OptionLabel. 1281 */ 1282 OptionLabel::~OptionLabel(void) 1283 { 1284 this->destroy(); 1285 } 1286 1287 /** 1048 1288 \brief Initializes an OptionLabel 1049 1289 */ … … 1058 1298 #endif /* HAVE_GTK2 */ 1059 1299 } 1300 1301 /** 1302 \brief Destroys a OptionLabel. 1303 */ 1304 void OptionLabel::destroy(void) 1305 { 1306 if (label) 1307 PRINTF(3)("deleting the OptionLabel: %s\n", label); 1308 else 1309 PRINTF(3)("deleting the OptionLabel.\n"); 1310 if (cValue) 1311 delete []cValue; 1312 1313 static_cast<Option*>(this)->destroy(); 1314 } 1315 1060 1316 1061 1317 /** … … 1117 1373 1118 1374 /** 1375 \destructs a Label. 1376 */ 1377 Label::~Label(void) 1378 { 1379 this->destroy(); 1380 } 1381 1382 /** 1119 1383 \brief initializes a new Label 1120 1384 */ … … 1129 1393 gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE); 1130 1394 #endif /* HAVE_GTK2 */ 1395 } 1396 1397 /** 1398 \brief Destroys a Label. 1399 */ 1400 void Label::destroy(void) 1401 { 1402 if (label) 1403 PRINTF(3)("deleting the Label: %s\n", label); 1404 else 1405 PRINTF(3)("deleting the Label.\n"); 1406 1407 static_cast<Widget*>(this)->destroy(); 1131 1408 } 1132 1409 … … 1178 1455 ProgressBar::~ProgressBar () 1179 1456 { 1457 this->destroy(); 1180 1458 } 1181 1459 … … 1197 1475 1198 1476 /** 1477 \brief Destroys a ProgressBar. 1478 */ 1479 void ProgressBar::destroy(void) 1480 { 1481 if (label) 1482 PRINTF(3)("deleting the ProgressBar: %s\n", label); 1483 else 1484 PRINTF(3)("deleting the ProgressBar.\n"); 1485 1486 static_cast<Widget*>(this)->destroy(); 1487 } 1488 1489 /** 1199 1490 \brief Sets a ned Title to the ProgressBar. 1200 1491 \param title The now title of the ProgressBar. … … 1259 1550 } 1260 1551 1552 /** 1553 \destructs an Image. 1554 */ 1555 Image::~Image(void) 1556 { 1557 this->destroy(); 1558 } 1559 1261 1560 /** 1262 1561 \brief Initializes a new Image … … 1267 1566 1268 1567 static_cast<Widget*>(this)->init(); 1568 } 1569 1570 /** 1571 \brief Destroys a Image. 1572 */ 1573 void Image::destroy(void) 1574 { 1575 if (label) 1576 PRINTF(3)("deleting the Image: %s\n", label); 1577 else 1578 PRINTF(3)("deleting the Image.\n"); 1579 1580 static_cast<Widget*>(this)->destroy(); 1269 1581 } 1270 1582 -
orxonox/branches/updater/src/gui/orxonox_gui_gtk.h
r3288 r3289 44 44 45 45 public: 46 ~Widget (); 47 48 Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next 49 #ifdef HAVE_GTK2 50 GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains. 51 #endif /* HAVE_GTK2 */ 52 void init(void); 53 int isOption; //!< with this Paramenter one can set the option-type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option, 3: float option, 4:char option, 5: char* option 54 /** 55 \briefdefines isOption states 56 */ 57 enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; 58 char* label; //!< The name of the Widget. Some do display it, Options need it to save; 59 #ifdef HAVE_GTK2 46 virtual ~Widget (); 47 void init(void); 48 void destroy(void); 49 50 void show (); 51 void hide (); 52 void setSize(int width, int height); 53 virtual void setTitle(char* title) = 0; //!< An abstract Function, that sets the title of Widgets. 54 55 void walkThrough (void (*function)(Widget*)); 56 static void listOptions (Widget* widget); 57 static void setOptions (Widget* widget); 58 59 #ifdef HAVE_GTK2 60 // Connection - Functions 61 60 62 gulong connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void* )); 61 63 gulong connectSignal (char* event, gint (*signal)(GtkWidget*, Widget* )); … … 63 65 gulong connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEventKey*, void* )); 64 66 void disconnectSignal (gulong signalID); 65 #endif /* HAVE_GTK2 */ 66 void show (); 67 void hide (); 68 void setSize(int width, int height); 69 virtual void setTitle(char* title) = 0; 70 71 void walkThrough (void (*function)(Widget*)); 72 static void listOptions (Widget* widget); 73 static void setOptions (Widget* widget); 74 75 #ifdef HAVE_GTK2 67 68 // Signals 76 69 static gint doNothingSignal (GtkWidget* widget, GdkEvent* event, void* nothing); 77 70 #endif /* HAVE_GTK2 */ 71 72 Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next 73 #ifdef HAVE_GTK2 74 GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains. 75 #endif /* HAVE_GTK2 */ 76 int isOption; //!< with this Paramenter one can set the option-type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option, 3: float option, 4:char option, 5: char* option 77 78 //! defines isOption states 79 enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; 80 char* label; //!< The name of the Widget. Some do display it, Options need it to save; 78 81 }; 79 82 … … 86 89 87 90 void init(void); 91 void destroy(void); 92 88 93 void setGroupName (char* name); 89 94 char* getGroupName (void); 90 95 91 virtual void fill (Widget* lowerWidget) = 0; 96 virtual void fill (Widget* lowerWidget) = 0; //!< An abstract function, that fills Packers. 92 97 }; 93 98 … … 106 111 public: 107 112 void init(void); 113 void destroy(void); 114 108 115 // void setBorderWidth (int borderwidth); 109 116 // virtual void setTitle (char* title) = 0; … … 119 126 { 120 127 private: 121 bool isOpen; //!< A bool Variable that checks if a Window is already open.122 public: 123 static Window* mainWindow; //!< Pointer to the First Window that was opened. By default this should be the GUI's main-Window.128 bool isOpen; //!< A bool Variable that checks if a Window is already open. 129 public: 130 static Window* mainWindow; //!< Pointer to the First Window that was opened. By default this should be the GUI's main-Window. 124 131 static void addWindow(Window* windowToAdd); 125 132 126 133 Window(void); 127 134 Window(char* windowName); 135 ~Window(void); 128 136 void init(); 137 void destroy(void); 129 138 130 139 void setTitle(char* title); … … 134 143 135 144 #ifdef HAVE_GTK2 145 // Signals 136 146 static gint windowOpen(GtkWidget* widget, GdkEvent* event, void* window); 137 147 static gint windowClose(GtkWidget* widget, GdkEvent* event, void* window); … … 148 158 { 149 159 public: 160 Frame(void); 150 161 Frame (char* frameName); 151 Frame (void); 152 void init(void); 162 ~Frame(void); 163 void init(void); 164 void destroy(void); 153 165 154 166 void setTitle(char* title); … … 162 174 { 163 175 public: 176 EventBox (void); 164 177 EventBox (char* eventBoxName); 165 EventBox (void); 166 void init(void); 178 ~EventBox(void); 179 void init(void); 180 void destroy(void); 167 181 168 182 void setTitle(char* title); … … 180 194 Box (void); 181 195 Box (char boxtype); 196 ~Box(void); 182 197 void init(char boxtype); 198 void destroy(void); 183 199 184 200 void fill (Widget* lowerWidget); … … 199 215 //virtual gint OptionChange (GtkWidget* widget, GdkEvent* event, gpointer data); 200 216 void init(void); 217 void destroy(void); 201 218 202 219 int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume … … 221 238 public: 222 239 Button (char* buttonname); 223 void init(void); 224 225 void setTitle(char* title); 226 240 ~Button(void); 241 void init(void); 242 void destroy(void); 243 244 void setTitle(char* title); 227 245 void redraw(); 228 246 }; … … 235 253 public: 236 254 CheckButton (char* buttonname); 237 #ifdef HAVE_GTK2 238 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 239 #endif /* HAVE_GTK2 */ 240 241 void init(void); 242 void setTitle(char* title); 243 255 ~CheckButton(void); 256 void init(void); 257 void destroy(void); 258 259 void setTitle(char* title); 244 260 bool isActive(); //!< a Bool value to see, if this CheckButton is active. 245 261 void redraw (); 262 263 #ifdef HAVE_GTK2 264 // Signals 265 static gint OptionChange (GtkWidget* widget, Widget* checkbutton); 266 #endif /* HAVE_GTK2 */ 246 267 }; 247 268 … … 253 274 { 254 275 public: 255 Slider (char* slidername,int start, int end); 276 Slider(char* slidername,int start, int end); 277 ~Slider(void); 256 278 void init(int start, int end); 279 void destroy(void); 257 280 258 281 void setTitle(char* title); 259 282 void setValue(int value); 260 261 #ifdef HAVE_GTK2 283 void redraw(); 284 285 #ifdef HAVE_GTK2 286 // Signals 262 287 static gint OptionChange (GtkWidget* widget, Widget* slider); 263 288 #endif /* HAVE_GTK2 */ 264 void redraw();265 289 }; 266 290 … … 270 294 private: 271 295 #ifdef HAVE_GTK2 272 GtkWidget* menu; //!< The menu That will hold the Options.273 GtkWidget* item; //!< One Item From a Menu.274 #endif /* HAVE_GTK2 */ 275 va_list itemlist; //!< The list to readin multiple Options.296 GtkWidget* menu; //!< The menu That will hold the Options. 297 GtkWidget* item; //!< One Item From a Menu. 298 #endif /* HAVE_GTK2 */ 299 va_list itemlist; //!< The list to readin multiple Options. 276 300 277 301 public: 278 302 Menu (char* menuname, ...); 279 void init(void); 280 281 void setTitle(char* title); 282 303 ~Menu(void); 304 void init(void); 305 void destroy(void); 306 307 void setTitle(char* title); 283 308 void addItem(char* itemName); 284 309 #ifdef HAVE_GTK2 … … 291 316 class OptionLabel : public Option 292 317 { 318 private: 319 293 320 public: 294 321 OptionLabel(char* label, char* value); 295 void init(void); 296 297 char* cValue; //!< The Value the Label will have. 322 ~OptionLabel(void); 323 void init(void); 324 void destroy(void); 325 298 326 299 327 void setValue(char* newValue); 300 328 void setTitle(char* title); 301 329 void redraw(); 330 331 char* cValue; //!< The Value the Label will have. \todo make private 332 302 333 }; 303 334 … … 306 337 { 307 338 public: 308 Label ( );339 Label (void); 309 340 Label (char* text); 310 void init(void); 341 ~Label(void); 342 void init(void); 343 void destroy(void); 311 344 312 345 void setTitle(char* text); … … 320 353 ProgressBar (void); 321 354 ProgressBar (char* label); 322 ~ProgressBar ( );323 void init 324 325 void setTitle(char* title); 326 355 ~ProgressBar (void); 356 void init(void); 357 void destroy(void); 358 359 void setTitle(char* title); 327 360 void setProgress (double progress); 328 361 void setTotalSize (double totalSize); … … 346 379 public: 347 380 Image (char* imgaename); 348 void init(void); 381 ~Image(void); 382 void init(void); 383 void destroy(void); 349 384 350 385 void setTitle(char* title);
Note: See TracChangeset
for help on using the changeset viewer.