Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/gui/orxonox_gui_gtk.cc @ 3157

Last change on this file since 3157 was 3157, checked in by bensch, 19 years ago

orxonox/trunk/gui: better signal-handling

File size: 20.5 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this program; if not, write to the Free Software Foundation,
18   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
19
20
21   ### File Specific:
22   main-programmer: Benjamin Grauer
23
24*/
25
26
27#include <iostream>
28
29#include "orxonox_gui_gtk.h"
30
31
32using namespace std;
33
34// temporarily.
35#include "orxonox_gui_flags.h"
36#include "orxonox_gui_exec.h"
37extern Window* orxonoxGUI;
38extern OrxonoxGuiFlags* flags;
39extern OrxonoxGuiExec* exec;
40
41/* WIDGET */
42
43/**
44   \brief deletes any given Widget
45   This is still pretty crappy.
46*/
47Widget::~Widget()
48{
49  //  cout << "hiding: " <<this->label <<"\n";
50  this->hide();
51  //  cout << "check if Packer: "<<this->label <<"\n";
52  if (this->isOption < 0)
53    {
54      //  cout << "get Down "<<this->label <<"\n";
55      static_cast<Packer*>(this)->down->~Widget();
56    }
57  //  cout << "next != NULL?: " <<this->label <<"\n";
58  if (this->next != NULL)
59    this->next->~Widget();
60  cout << "delete Widget: " <<this->label <<"\n";
61  //  delete widget;
62}
63
64/**
65   \brief Initializes a widget.
66   Initializes the next Pointer and the other Widget-specific Defaults.
67*/
68void Widget::init()
69{
70  next = NULL;
71  label = "";
72  return;
73}
74
75/**
76   \brief makes the widget visible.
77*/
78void Widget::show()
79{
80  gtk_widget_show (this->widget);
81}
82
83/**
84   \brief hides the widget.
85*/
86void Widget::hide()
87{
88  gtk_widget_hide (this->widget);
89}
90
91/**
92   \brief Sets the resolution of a specific widget to the given size.
93   \param width the width of the widget to set.
94   \param height the height of the widget to set.
95*/
96void Widget::setSize(int width, int height)
97{
98  gtk_widget_set_usize (this->widget, width, height);
99}
100
101/**
102    \brief Connect any signal to any given Sub-widget
103*/
104gulong Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *))
105{
106  return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), NULL);
107}
108
109/**
110   \brief Connect a signal with additionally passing the whole Object
111*/
112gulong Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *))
113{
114  return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this);
115}
116
117/**
118   \brief Connect a signal with additionally passing a whole external Object
119*/
120gulong Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *))
121{
122  return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj);
123}
124
125/**
126   \brief Connect a signal with additionally passing a whole external Object
127*/
128gulong Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEventKey*, void *))
129{
130  return g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj);
131}
132
133void Widget::disconnectSignal (gulong signalID)
134{
135  g_signal_handler_disconnect (G_OBJECT (this->widget), signalID);
136}
137
138/**
139   \brief Moves through all the Widgets downwards from this and executes the function on them.
140   \param function must be of type void and takes a Widget* as an Input.
141*/
142void Widget::walkThrough (void (*function)(Widget*))
143{
144  function(this);
145  if (this->isOption < 0)
146    {
147      static_cast<Packer*>(this)->down->walkThrough (function);
148    } 
149
150  if (this->next != NULL)
151    this->next->walkThrough(function);
152}
153
154/**
155    \brief This is for listing the option of "widget"
156    \param widget specifies the widget that should be listed
157*/
158void Widget::listOptions (Widget* widget)
159{
160  if (widget->isOption >= 1)
161    cout << static_cast<Option*>(widget)->label <<" is : " << static_cast<Option*>(widget)->value <<endl;
162}
163
164/**
165    \brief This is for setting the option of "widget"
166    \param widget specifies the widget that should be set.
167*/
168void Widget::setOptions (Widget* widget)
169{
170  if (widget->isOption >= 1)
171    static_cast<Option*>(widget)->redraw();// <<" is : " << static_cast<Option*>(this)->value <<endl;
172}
173
174gint Widget::doNothingSignal (GtkWidget *widget, GdkEvent* event, void* nothing)
175{
176}
177
178//void deleteWidget(Widget* lastWidget)
179
180
181/* PACKERS */
182
183/**
184   \brief Initializes a Packer.
185   Sets the down-pinter to NULL and other PackerSpecific-values to their defaults.
186*/
187void Packer::init (void)
188{
189  down = NULL;
190  this->setGroupName ("");
191
192
193  static_cast<Widget*>(this)->init();
194  return;
195}
196
197/**
198   \brief Sets the group name under which all the lower widgets of this will be saved.
199   \param name The name of the group.
200*/
201void Packer::setGroupName (char* name)
202{
203  groupName = name;
204}
205
206/**
207   \brief Retrieves the group name under which all the lower widgets of this will be saved.
208   \returns name The name of the group.
209*/
210char* Packer::getGroupName (void)
211{
212  return groupName;
213}
214
215/* CONTAINERS */
216
217/**
218   \brief Initializes a Container.
219   sets the Container-Specific defaults.
220*/
221void Container::init (void)
222{
223  isOption = -1;
224
225  static_cast<Packer*>(this)->init();
226
227  return;
228}
229
230/**
231   \briefFills a Container with lowerWidget.
232   It does this by filling up the down pointer only if down points to NULL.
233   \param lowerWidget the Widget that should be filled into the Container.
234*/
235void Container::fill (Widget *lowerWidget)
236{
237  if (this->down == NULL)
238    {
239      gtk_container_add (GTK_CONTAINER (this->widget), lowerWidget->widget);
240      this->down = lowerWidget;
241    }
242  else
243    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;
244}
245
246// gtk_container_set_border_width (GTK_CONTAINER (widget), 5);
247
248/* WINDOW */
249
250Window* Window::mainWindow = NULL;
251
252void Window::addWindow(Window* windowToAdd)
253{
254  if (!mainWindow)
255    {
256      mainWindow = windowToAdd;
257      return;
258    }
259
260  Widget* tmpWindow = mainWindow;
261  while (tmpWindow->next)
262    tmpWindow = tmpWindow->next;
263  tmpWindow->next = windowToAdd;
264 
265  return;
266}
267     
268
269
270/**
271   \brief Creating a new Window without a Name
272*/
273Window::Window (void)
274{
275  this->init();
276}
277
278/**
279   \brief Creating a Window with a name
280   \param windowName the name the window should get.
281*/
282Window::Window (char* windowName)
283{
284  this->init();
285  this->setTitle (windowName);
286}
287
288/**
289   \brief initializes a new Window
290*/
291void Window::init()
292{
293  if (!mainWindow)
294    mainWindow = this;
295 
296  isOpen = false;
297
298  static_cast<Container*>(this)->init();
299
300  widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
301  gtk_window_set_policy (GTK_WINDOW(widget), TRUE, TRUE, TRUE);
302#if !defined(__WIN32__)
303  //  gtk_window_set_decorated (GTK_WINDOW (widget), FALSE);
304#endif
305  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
306
307}
308
309/**
310   \brief Shows all Widgets that are included within this->widget.
311*/
312void Window::showall ()
313{
314  if (!isOpen)
315    {
316      printf ("showall\n");
317      gtk_widget_show_all  (widget);
318      isOpen = true;
319    }
320  else
321    {
322      printf ("showone\n");
323      gtk_widget_show (widget);
324    }
325}
326
327/**
328   \brief Set The Window-title to title
329   \param title title the Window should get.
330*/
331void Window::setTitle (char* title)
332{
333  label=title;
334  gtk_window_set_title (GTK_WINDOW (widget), title);
335}
336
337/**
338   \brief opens up a Window and fixes the Focus to it
339*/
340void Window::open()
341{
342  if (this != mainWindow)
343    {
344      isOpen = true;
345      gtk_widget_show_all(widget);
346      gtk_grab_add(widget);
347    }
348}
349
350/**
351   \brief closes up a Window and removes the Focus from it
352*/
353void Window::close()
354{
355  if (this != mainWindow)
356    {
357      isOpen = false;
358      gtk_grab_remove(widget);
359      gtk_widget_hide (widget);
360    }
361}
362
363/**
364   \brief opens up a window (not topmost Window).
365   this is the Signal that does it. !!SIGNALS ARE STATIC!!
366   \param widget the widget that did it!
367   \param event the event that did it!
368   \param window the Window that should be opened
369*/
370gint Window::windowOpen (GtkWidget *widget, GdkEvent* event, void* window)
371{
372  static_cast<Window*>(window)->open();
373}
374
375/**
376   \brief closes a window (not topmost Window).
377   this is the Signal that does it. !!SIGNALS ARE STATIC!!
378   \param widget the widget that did it!
379   \param event the event that did it!
380   \param window the Window that should be closed
381*/
382gint Window::windowClose (GtkWidget *widget, GdkEvent* event, void* window)
383{
384  static_cast<Window*>(window)->close();
385}
386
387/**
388 * Quits the orxonox_GUI.
389 * This can be called as a Signal and is therefor static
390 \param widget The widget that called this function
391 \param event the event that happened to execute this function
392 \param data some data passed with the Signal
393 */
394gint Window::orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data)
395{
396  if (exec->shouldsave())
397    exec->writeToFile (orxonoxGUI);
398
399  gtk_main_quit();
400  return FALSE;
401}
402
403
404/* FRAME */
405
406/**
407    \brief Creates a new Frame without a name
408*/
409Frame::Frame (void)
410{
411  this->init();
412}
413
414/**
415   \brief Creates a new Frame with name title
416*/
417Frame::Frame (char* title)
418{
419  this->init();
420  this->setTitle(title);
421}
422
423/**
424    \brief Initializes a new Frame with default settings
425*/
426void Frame::init()
427{
428  static_cast<Container*>(this)->init();
429 
430  widget = gtk_frame_new ("");
431  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
432}
433
434/**
435   \brief Sets the Frames name to title
436   \param title The title the Frame should get.
437*/
438void Frame::setTitle (char* title)
439{
440  label = title;
441  gtk_frame_set_label (GTK_FRAME (widget), title);
442}
443
444// EVENTBOX //
445
446/**
447   \brief Creates a new EventBox with default settings.
448*/
449EventBox::EventBox ()
450{
451  this->init();
452}
453/**
454   \brief Creates a new EventBox with name title
455   \param title title the Eventbox should get (only data-structure-internal)
456*/
457EventBox::EventBox (char* title)
458{
459  this->init();
460  this->setTitle(title);
461}
462
463/**
464   \brief Initializes a new EventBox
465*/
466void EventBox::init(void)
467{
468  isOption = -1;
469
470  static_cast<Container*>(this)->init();
471
472  widget = gtk_event_box_new ();
473  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
474 
475}
476
477/**
478   \brief Sets the Title of the EventBox (not implemented)
479   \param title Name the EventBox should get (only datastructure-internal).
480*/
481void EventBox::setTitle (char* title)
482{
483  label = title;
484}
485
486/* BOX */
487
488/**
489   \brief Creates a new horizontal Box
490*/
491Box::Box (void)
492{
493  this->init('h');
494}
495
496/**
497   \brief Creates a new Box of type boxtype
498   \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
499*/
500Box::Box (char boxtype)
501{
502  this->init(boxtype);
503}
504
505/**
506   \brief Initializes a new Box with type boxtype
507   \param boxtype see Box(char boxtype)
508*/
509void Box::init(char boxtype)
510{
511  isOption = -2;
512
513  static_cast<Packer*>(this)->init();
514  if (boxtype == 'v')
515    {
516      widget = gtk_vbox_new (FALSE, 0);
517    }
518  else
519    {
520      widget = gtk_hbox_new (FALSE, 0);
521    }
522}
523
524/**
525    \brief Fills a box with a given Widget.
526    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
527    \param lowerWidget the next Widget that should be appendet to this Box
528*/
529void Box::fill (Widget *lowerWidget)
530{
531  gtk_box_pack_start (GTK_BOX (this->widget), lowerWidget->widget, TRUE, TRUE, 0);
532  if (this->down == NULL)
533    this->down = lowerWidget;
534  else
535    {
536      Widget* tmp;
537      tmp = this->down;
538      while (tmp->next != NULL)
539        {
540          tmp = tmp->next;
541        }
542      tmp->next = lowerWidget;
543    }
544}
545
546/* IMAGE */
547
548/**
549   \brief Creates a new Image
550   \param imagename the location of the Image on the Hard Disc
551*/
552Image::Image (char* imagename)
553{
554  this->init();
555  widget = gtk_image_new_from_file (imagename);
556  label = imagename;
557}
558
559/**
560    \brief Initializes a new Image
561*/
562void Image::init()
563{
564  isOption = 0;
565
566  static_cast<Widget*>(this)->init();
567}
568
569
570/* OPTION */
571
572/**
573   \brief Initializes a new Option.
574   sets all Option-Specific-Values to their defaults.
575*/
576void Option::init()
577{
578  value = 0;
579  flag_name = "";
580  flag_name_short = "";
581  saveable = false;
582  default_value = 0;
583
584  static_cast<Widget*>(this)->init();
585
586  return;
587}
588
589/**
590   \brief This sets The FlagName of an Option and defines its default Values
591   !! Options will be saved if flagname is different from "" !!
592   \param flagname the Name that will be displayed in the output
593   \param defaultvalue the default Value for this Option (see definition of defaultvalue
594*/
595void Option::setFlagName (char* flagname, int defaultvalue)
596{
597  flag_name = flagname;
598  default_value = defaultvalue;
599  cout << "Set Flagname of " << label << " to " << flagname << endl;
600}
601
602/**
603    \brief see Option::setFlagName (char* flagname, int defaultvalue)
604    \param flagname the Name that will be displayed in the output
605    \param defaultvalue the default Value for this Option (see definition of defaultvalue
606    \param flagnameshort a short flagname to be displayed in the output
607*/
608void Option::setFlagName (char* flagname, char* flagnameshort,  int defaultvalue)
609{
610  flag_name = flagname;
611  flag_name_short = flagnameshort;
612  default_value = defaultvalue;
613  cout << "Set Flagname of " << label << " to " << flagname << endl;
614}
615
616
617/* BUTTON */
618
619/**
620   \brief Creates a new Button with a buttonname
621   \param buttonname sets the Name of the Button
622*/
623Button::Button(char* buttonname)
624{
625  this->init();
626  this->setTitle(buttonname);
627}
628
629/**
630   \brief Initializes a new Button
631*/
632void Button::init(void)
633{
634  isOption = 0;
635
636  static_cast<Option*>(this)->init();
637
638  widget = gtk_button_new_with_label ("");
639}
640
641/**
642   \brief Sets a new name to the Button
643   \param title The name the Button should get
644*/
645void Button::setTitle (char *title)
646{
647  label = title;
648  gtk_button_set_label (GTK_BUTTON(widget), title);
649}
650
651/**
652   \brief redraws the Button
653   not implemented yet
654*/
655void Button::redraw ()
656{
657}
658
659/* CHECKBUTTON */
660
661/**
662   \brief Creates a new CheckButton with an ame
663   \param buttonname The name the CheckButton should display.
664*/
665CheckButton::CheckButton (char* buttonname)
666{
667  this->init();
668  this->setTitle(buttonname);
669
670  this->connectSignal ("clicked", this->OptionChange);
671}
672
673/**
674   \brief Initialize a new CheckButton with default settings
675*/
676void CheckButton::init(void)
677{
678  isOption = 1;
679
680  static_cast<Option*>(this)->init();
681
682  widget = gtk_check_button_new_with_label ("");
683}
684
685/**
686   \brief Sets a new Title to a CheckButton
687   \param title The new Name the CheckButton should display.
688*/
689void CheckButton::setTitle(char* title)
690{
691  label = title;
692  gtk_button_set_label(GTK_BUTTON(widget), title);
693}
694
695bool CheckButton::isActive()
696{
697  return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
698}
699
700/**
701    \brief Signal OptionChange writes the Value from the CheckButton to its Object-Database.
702    \param widget The widget(CheckButton) that has a changed Value
703    \param checkbutton the CheckButton-Object that should receive the change.
704*/
705gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton)
706{
707  static_cast<CheckButton*>(checkbutton)->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ((CheckButton*)checkbutton->widget));
708  flags->setTextFromFlags(orxonoxGUI);   ////// must be different!!!
709  cout << static_cast<CheckButton*>(checkbutton)->label << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl;
710}
711
712/**
713   \brief Redraws the CheckButton (if option has changed).
714   Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
715*/
716void CheckButton::redraw ()
717{
718  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value);
719}
720
721/* SLIDER */
722
723/**
724   \brief Creates a new Slider
725   \param slidername The data-structure-name of the slider.
726   \param start The minimal Value of the slider.
727   \param end The maximal Value of the slider.
728*/
729Slider::Slider (char* slidername, int start, int end)
730{
731  this->init(start, end);
732  this->setValue(start);
733  this->setTitle(slidername);
734  this->connectSignal ("value_changed", this->OptionChange);
735}
736
737/**
738   \brief Initializes a Slider with start and end Values
739   params: see Slider::Slider (char* slidername, int start, int end)
740*/
741void Slider::init(int start, int end)
742{
743  isOption = 2;
744
745  static_cast<Option*>(this)->init();
746
747  widget = gtk_hscale_new_with_range (start, end, 5);
748}
749
750/**
751   \brief Sets a new Title to the Slider
752   \param title The new Name of the slider
753*/
754void Slider::setTitle(char* title)
755{
756  label = title;
757}
758
759/**
760   \brief Setting a new value to the Slider.
761   Maybe you also require a Slider::redraw() for this to display
762*/
763void Slider::setValue(int value)
764{
765  this->value = value;
766}
767
768/**
769    \brief Signal OptionChange writes the Value from the Slider to its Object-Database.
770    \param widget The widget(Slider) that has a changed Value
771    \param slider the Slider-Object that should receive the change.
772*/
773gint Slider::OptionChange (GtkWidget *widget, Widget* slider)
774{
775  static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE ((Slider*)slider->widget));
776  flags->setTextFromFlags(orxonoxGUI);  //// must be different !!!
777  cout << static_cast<Slider*>(slider)->label << " set to: "<< static_cast<Slider*>(slider)->value << endl;
778}
779
780/**
781   \brief Redraws the widget
782   Example: see void CheckButton::redraw ()
783*/
784void Slider::redraw ()
785{
786  gtk_range_set_value (GTK_RANGE (widget), value);
787}
788
789/* MENU */
790
791/**
792    \brief Creates a Menu-Item-list out of multiple input.
793    !! Consider, that the last input argument has to be "lastItem" for this to work!!
794    \param menuname The Database-Name of this Menu
795    \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
796*/
797Menu::Menu (char* menuname, ...)
798{
799  this->init();
800  this->setTitle(menuname);
801   
802  char *itemName;
803 
804  va_start (itemlist, menuname);
805  while (strcmp (itemName = va_arg (itemlist, char*), "lastItem"))
806    {
807      this->addItem(itemName);
808    }
809  va_end(itemlist);
810
811  gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu);
812  this->connectSignal ("changed", this->OptionChange);
813}
814
815/**
816   \brief Initializes a new Menu with no items
817*/
818void Menu::init(void)
819{
820  isOption = 2;
821
822  static_cast<Option*>(this)->init();
823
824  widget = gtk_option_menu_new ();
825  menu = gtk_menu_new ();
826
827}
828
829/**
830 * Sets the Database-Name of this Menu
831 \param title Database-Name to be set.
832*/
833void Menu::setTitle(char* title)
834{
835  label = title;
836}
837
838/**
839   \brief appends a new Item to the Menu-List.
840   \param itemName the itemName to be appendet.
841*/
842void Menu::addItem (char* itemName)
843{
844  item = gtk_menu_item_new_with_label (itemName);
845  gtk_menu_shell_append(GTK_MENU_SHELL (menu), item);
846}
847
848/**
849    \brief Signal OptionChange writes the Value from the Menu to its Object-Database.
850    \param widget The widget(Menu) that has a changed Value
851    \param menu the Menu-Object that should receive the change.
852*/
853gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
854{
855  static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget));
856  flags->setTextFromFlags(orxonoxGUI); //// must be different !!!
857  cout << static_cast<Menu*>(menu)->label << " changed to : " << static_cast<Menu*>(menu)->value << endl;
858}
859
860/**
861   \brief Redraws the widget
862   Example: see void CheckButton::redraw ()
863*/
864void Menu::redraw ()
865{
866  gtk_option_menu_set_history (GTK_OPTION_MENU (widget), value);
867}
868
869OptionLabel::OptionLabel(char* text)
870{
871  init();
872  setTitle(text);
873}
874
875void OptionLabel::init(void)
876{
877  isOption = 4;
878
879  static_cast<Option*>(this)->init();
880
881  widget = gtk_label_new ("");
882}
883
884void OptionLabel::setTitle(char* title)
885{
886  gtk_label_set_text (GTK_LABEL (widget), title);
887}
888
889void OptionLabel::redraw(void)
890{
891 
892}
893
894/**
895   \brief Creates a new default Label with no Text.
896   You migth consider adding Label::setTitle with this.
897*/
898Label::Label ()
899{
900  this->init();
901}
902
903/**
904   \brief Creates a new Label with a Text.
905   \param text The text to be displayed.
906*/
907Label:: Label (char* text)
908{
909  this->init();
910  this->setText(text);
911}
912
913/**
914   \brief initializes a new Label
915*/
916void Label::init(void)
917{
918  isOption = 0;
919
920  static_cast<Widget*>(this)->init();
921
922  widget = gtk_label_new ("");
923  gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
924}
925
926/**
927   \brief Sets a new Text to a Label.
928   \param text The text to be inserted into the Label.
929*/
930void Label::setText (char* text)
931{
932  label = text;
933  gtk_label_set_text (GTK_LABEL (this->widget), text);
934}
935
936/**
937   \brief get the Text of a Label
938   \return The Text the Label holds.
939*/
940char* Label::getText ()
941{
942  return ((char*)gtk_label_get_text (GTK_LABEL (this->widget)));
943}
Note: See TracBrowser for help on using the repository browser.