Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3289 in orxonox.OLD for orxonox/branches/updater/src/gui


Ignore:
Timestamp:
Dec 26, 2004, 3:44:44 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: updated gui, so now it deletes itself when closing the app.

Location:
orxonox/branches/updater/src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.cc

    r3288 r3289  
    6464  gtk_main();
    6565  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//////////////////////////////
    6874
    6975/* WIDGET */
     
    7581Widget::~Widget()
    7682{
    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();
    9084}
    9185
     
    10296
    10397/**
     98   \brief Destroys a Widget
     99*/
     100void 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/**
    104121   \brief makes the widget visible.
    105122*/
     
    132149#endif /* HAVE_GTK2 */
    133150}
    134 
    135 #ifdef HAVE_GTK2
    136 /**
    137     \brief Connect any signal to any given Sub-widget
    138 */
    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 Object
    146 */
    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 Object
    154 */
    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 Object
    162 */
    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 */
    173151
    174152/**
     
    213191
    214192#ifdef HAVE_GTK2
     193/**
     194    \brief Connect any signal to any given Sub-widget
     195*/
     196gulong 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*/
     204gulong 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*/
     212gulong 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*/
     220gulong 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
     225void Widget::disconnectSignal (gulong signalID)
     226{
     227  g_signal_handler_disconnect (G_OBJECT (this->widget), signalID);
     228}
    215229
    216230/**
     
    246260
    247261/**
     262   \brief Destroys a Packer.
     263*/
     264void 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/**
    248280   \brief Sets the group name under which all the lower widgets of this will be saved.
    249281   \param name The name of the group.
     
    283315
    284316/**
     317   \brief Destroys a Container.
     318*/
     319void Container::destroy(void)
     320{
     321  PRINTF(4)("deleting the Container part.\n");
     322
     323  static_cast<Packer*>(this)->destroy();
     324}
     325
     326/**
    285327   \briefFills a Container with lowerWidget.
    286328   \param lowerWidget the Widget that should be filled into the Container.
     
    298340    }
    299341  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");
    301343}
    302344
     
    329371     
    330372
    331 
    332373/**
    333374   \brief Creating a new Window without a Name
     
    342383   \param windowName the name the window should get.
    343384*/
     385
    344386Window::Window (char* windowName)
    345387{
    346388  this->init();
    347389  this->setTitle (windowName);
     390}
     391
     392/**
     393   \brief Destructs a Window.
     394*/
     395Window::~Window(void)
     396{
     397  this->destroy();
    348398}
    349399
     
    368418  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
    369419#endif /* HAVE_GTK2 */
     420}
     421
     422/**
     423   \brief Destroys a Window.
     424*/
     425void 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 
    370434}
    371435
     
    499563}
    500564
     565/**
     566   \brief destrcucts a Frame
     567*/
     568Frame::~Frame()
     569{
     570  this->destroy();
     571}
     572
    501573/**
    502574    \brief Initializes a new Frame with default settings
     
    510582  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
    511583#endif /* HAVE_GTK2 */
     584}
     585
     586/**
     587   \brief Destroys a Frame.
     588*/
     589void 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();
    512597}
    513598
     
    532617   \brief Creates a new EventBox with default settings.
    533618*/
    534 EventBox::EventBox ()
     619EventBox::EventBox (void)
    535620{
    536621  this->init();
     
    548633
    549634/**
     635   \destructs an EventBox.
     636*/
     637EventBox::~EventBox(void)
     638{
     639  this->destroy();
     640
     641}
     642
     643/**
    550644   \brief Initializes a new EventBox
    551645*/
     
    560654  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
    561655#endif /* HAVE_GTK2 */
     656}
     657
     658/**
     659   \brief Destroys an EventBox.
     660*/
     661void 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();
    562669}
    563670
     
    591698{
    592699  this->init(boxtype);
     700}
     701
     702/**
     703   \destructs a Box.
     704*/
     705Box::~Box(void)
     706{
     707  this->destroy();
    593708}
    594709
     
    612727    }
    613728#endif /* HAVE_GTK2 */
     729}
     730
     731/**
     732   \brief Destroys a Box.
     733*/
     734void 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();
    614742}
    615743
     
    641769/**
    642770   \brief Sets the Title of a Box.
    643    \title the new Title to set.
     771   \param title the new Title to set.
    644772*/
    645773void Box::setTitle(char* title)
     
    668796
    669797  return;
     798}
     799
     800/**
     801   \brief Destroys an Option.
     802*/
     803void 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();
    670812}
    671813
     
    746888
    747889/**
     890   \destructs a Button.
     891*/
     892Button::~Button(void)
     893{
     894  this->destroy();
     895}
     896
     897/**
    748898   \brief Initializes a new Button
    749899*/
     
    757907  widget = gtk_button_new_with_label ("");
    758908#endif /* HAVE_GTK2 */
     909}
     910
     911/**
     912   \brief Destroys a Button.
     913*/
     914void 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();
    759922}
    760923
     
    799962
    800963/**
     964   \destructs a CheckButton.
     965*/
     966CheckButton::~CheckButton(void)
     967{
     968  this->destroy();
     969}
     970
     971/**
    801972   \brief Initialize a new CheckButton with default settings
    802973*/
     
    810981  widget = gtk_check_button_new_with_label ("");
    811982#endif /* HAVE_GTK2 */
     983}
     984
     985/**
     986   \brief Destroys a CheckButton.
     987*/
     988void 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();
    812996}
    813997
     
    8781062
    8791063/**
     1064   \destructs a Slider.
     1065*/
     1066Slider::~Slider(void)
     1067{
     1068  this->destroy();
     1069}
     1070
     1071/**
    8801072   \brief Initializes a Slider with start and end Values
    8811073   params: see Slider::Slider (char* slidername, int start, int end)
     
    8901082 widget = gtk_hscale_new_with_range (start, end, 5);
    8911083#endif /* HAVE_GTK2 */
     1084}
     1085
     1086/**
     1087   \brief Destroys a Slider.
     1088*/
     1089void 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
    8921098}
    8931099
     
    9111117{
    9121118  this->value = value;
     1119}
     1120
     1121/**
     1122   \brief Redraws the widget
     1123   Example: see void CheckButton::redraw ()
     1124*/
     1125void Slider::redraw ()
     1126{
     1127#ifdef HAVE_GTK2
     1128  gtk_range_set_value (GTK_RANGE (widget), value);
     1129#endif /* HAVE_GTK2 */
    9131130}
    9141131
     
    9271144#endif /* HAVE_GTK2 */
    9281145
    929 /**
    930    \brief Redraws the widget
    931    Example: see void CheckButton::redraw ()
    932 */
    933 void Slider::redraw ()
    934 {
    935 #ifdef HAVE_GTK2
    936   gtk_range_set_value (GTK_RANGE (widget), value);
    937 #endif /* HAVE_GTK2 */
    938 }
    9391146
    9401147/* MENU */
     
    9691176
    9701177/**
     1178   \destructs a Menu.
     1179*/
     1180Menu::~Menu(void)
     1181{
     1182  this->destroy();
     1183}
     1184
     1185/**
    9711186   \brief Initializes a new Menu with no items
    9721187*/
     
    9831198
    9841199}
     1200
     1201/**
     1202   \brief Destroys a Menu.
     1203*/
     1204void 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
    9851215
    9861216/**
     
    10051235  item = gtk_menu_item_new_with_label (itemName);
    10061236  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*/
     1244void Menu::redraw ()
     1245{
     1246#ifdef HAVE_GTK2
     1247 gtk_option_menu_set_history (GTK_OPTION_MENU (widget), value);
    10071248#endif /* HAVE_GTK2 */
    10081249}
     
    10221263#endif /* HAVE_GTK2 */
    10231264
    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 */
    10341266
    10351267/**
     
    10461278
    10471279/**
     1280   \destructs an OptionLabel.
     1281*/
     1282OptionLabel::~OptionLabel(void)
     1283{
     1284  this->destroy();
     1285}
     1286
     1287/**
    10481288   \brief Initializes an OptionLabel
    10491289*/
     
    10581298#endif /* HAVE_GTK2 */
    10591299}
     1300
     1301/**
     1302   \brief Destroys a OptionLabel.
     1303*/
     1304void 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
    10601316
    10611317/**
     
    11171373
    11181374/**
     1375   \destructs a Label.
     1376*/
     1377Label::~Label(void)
     1378{
     1379  this->destroy();
     1380}
     1381
     1382/**
    11191383   \brief initializes a new Label
    11201384*/
     
    11291393  gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
    11301394#endif /* HAVE_GTK2 */
     1395}
     1396
     1397/**
     1398   \brief Destroys a Label.
     1399*/
     1400void 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();
    11311408}
    11321409
     
    11781455ProgressBar::~ProgressBar ()
    11791456{
     1457  this->destroy();
    11801458}
    11811459
     
    11971475
    11981476/**
     1477   \brief Destroys a ProgressBar.
     1478*/
     1479void 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/**
    11991490   \brief Sets a ned Title to the ProgressBar.
    12001491   \param title The now title of the ProgressBar.
     
    12591550}
    12601551
     1552/**
     1553   \destructs an Image.
     1554*/
     1555Image::~Image(void)
     1556{
     1557  this->destroy();
     1558}
     1559
    12611560/**
    12621561    \brief Initializes a new Image
     
    12671566
    12681567  static_cast<Widget*>(this)->init();
     1568}
     1569
     1570/**
     1571   \brief Destroys a Image.
     1572*/
     1573void 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();
    12691581}
    12701582
  • orxonox/branches/updater/src/gui/orxonox_gui_gtk.h

    r3288 r3289  
    4444
    4545 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
    6062  gulong connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void* ));
    6163  gulong connectSignal (char* event, gint (*signal)(GtkWidget*, Widget* ));
     
    6365  gulong connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEventKey*, void* ));
    6466  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
    7669  static gint doNothingSignal (GtkWidget* widget, GdkEvent* event, void* nothing);
    7770#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;
    7881};
    7982
     
    8689
    8790  void init(void);
     91  void destroy(void);
     92
    8893  void setGroupName (char* name);
    8994  char* getGroupName (void);
    9095
    91   virtual void fill (Widget* lowerWidget) = 0;
     96  virtual void fill (Widget* lowerWidget) = 0; //!< An abstract function, that fills Packers.
    9297};
    9398
     
    106111 public:
    107112  void init(void);
     113  void destroy(void);
     114
    108115  //  void setBorderWidth (int borderwidth);
    109116  //  virtual void setTitle (char* title) = 0;
     
    119126{
    120127 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.
    124131  static void addWindow(Window* windowToAdd);
    125132
    126133  Window(void);
    127134  Window(char* windowName);
     135  ~Window(void);
    128136  void init();
     137  void destroy(void);
    129138 
    130139  void setTitle(char* title);
     
    134143
    135144#ifdef HAVE_GTK2
     145  // Signals
    136146  static gint windowOpen(GtkWidget* widget, GdkEvent* event, void* window);
    137147  static gint windowClose(GtkWidget* widget, GdkEvent* event, void* window);
     
    148158{
    149159 public:
     160  Frame(void);
    150161  Frame (char* frameName);
    151   Frame (void);
    152   void init(void);
     162  ~Frame(void);
     163  void init(void);
     164  void destroy(void);
    153165 
    154166  void setTitle(char* title);
     
    162174{
    163175 public:
     176  EventBox (void);
    164177  EventBox (char* eventBoxName);
    165   EventBox (void);
    166   void init(void);
     178  ~EventBox(void);
     179  void init(void);
     180  void destroy(void);
    167181 
    168182  void setTitle(char* title);
     
    180194  Box (void);
    181195  Box (char boxtype);
     196  ~Box(void);
    182197  void init(char boxtype);
     198  void destroy(void);
    183199 
    184200  void fill (Widget* lowerWidget);
     
    199215  //virtual gint OptionChange (GtkWidget* widget, GdkEvent* event, gpointer data);
    200216  void init(void);
     217  void destroy(void);
    201218
    202219  int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume
     
    221238 public:
    222239  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);
    227245  void redraw();
    228246};
     
    235253 public:
    236254  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);
    244260  bool isActive();           //!< a Bool value to see, if this CheckButton is active.
    245261  void redraw ();
     262
     263#ifdef HAVE_GTK2
     264  // Signals
     265  static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
     266#endif /* HAVE_GTK2 */
    246267};
    247268
     
    253274{
    254275 public:
    255   Slider (char* slidername,int start, int end);
     276  Slider(char* slidername,int start, int end);
     277  ~Slider(void);
    256278  void init(int start, int end);
     279  void destroy(void);
    257280
    258281  void setTitle(char* title);
    259282  void setValue(int value);
    260 
    261 #ifdef HAVE_GTK2
     283  void redraw();
     284
     285#ifdef HAVE_GTK2
     286  // Signals
    262287  static gint OptionChange (GtkWidget* widget, Widget* slider);
    263288#endif /* HAVE_GTK2 */
    264   void redraw();
    265289};
    266290
     
    270294 private:
    271295#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.
    276300 
    277301 public:
    278302  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);
    283308  void addItem(char* itemName);
    284309#ifdef HAVE_GTK2
     
    291316class OptionLabel : public Option
    292317{
     318 private:
     319
    293320 public:
    294321  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 
    298326 
    299327  void setValue(char* newValue);
    300328  void setTitle(char* title);
    301329  void redraw();
     330
     331  char* cValue;                          //!< The Value the Label will have. \todo make private
     332
    302333};
    303334
     
    306337{
    307338 public:
    308   Label ();
     339  Label (void);
    309340  Label (char* text);
    310   void init(void);
     341  ~Label(void);
     342  void init(void);
     343  void destroy(void);
    311344 
    312345  void setTitle(char* text);
     
    320353  ProgressBar (void);
    321354  ProgressBar (char* label);
    322   ~ProgressBar ();
    323   void init (void);
    324 
    325   void setTitle(char* title);
    326 
     355  ~ProgressBar (void);
     356  void init(void);
     357  void destroy(void);
     358
     359  void setTitle(char* title);
    327360  void setProgress (double progress);
    328361  void setTotalSize (double totalSize);
     
    346379 public:
    347380  Image (char* imgaename);
    348   void init(void);
     381  ~Image(void);
     382  void init(void);
     383  void destroy(void);
    349384
    350385  void setTitle(char* title);
Note: See TracChangeset for help on using the changeset viewer.