Changeset 1962 in orxonox.OLD for orxonox/branches
- Timestamp:
- Jun 17, 2004, 12:52:36 AM (21 years ago)
- Location:
- orxonox/branches/gui/guicc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/gui/guicc/orxonox_gui.cc
r1895 r1962 10 10 Frame* Frametest = new Frame ("Test"); 11 11 orxonoxGUI->fill((Frame*) Frametest); 12 Frame* test = (Frame*) orxonoxGUI->down; 13 test->setTitle("shit"); 12 Box* box = new Box ('v'); 13 Frametest->fill(box); 14 15 CheckButton* button = new CheckButton("test"); 16 button->connectSignal ("clicked", orxonoxGUI->orxonox_gui_quit); 17 box->fill(button); 18 Slider* slider = new Slider("testslider", 0, 100); 19 box->fill(slider); 20 14 21 orxonoxGUI->showall (); 15 22 … … 30 37 } 31 38 32 39 /* CONTAINERS*/ 33 40 34 41 void Container::fill (Widget *lowerWidget) … … 40 47 // gtk_container_set_border_width (GTK_CONTAINER (widget), 5); 41 48 42 49 /* WINDOW */ 43 50 44 51 Window::Window (void) … … 76 83 77 84 78 85 /* FRAME */ 79 86 80 87 Frame::Frame (void) … … 96 103 97 104 98 105 /* BOX */ 99 106 100 107 Box::Box (void) … … 121 128 gtk_box_pack_start (GTK_BOX(this->widget), lowerWidget->widget, TRUE, TRUE, 0); 122 129 } 130 131 132 /* OPTION */ 133 134 /* BUTTON */ 135 Button::Button(char* buttonname) 136 { 137 widget = gtk_button_new_with_label(buttonname); 138 } 139 140 /* CHECKBUTTON */ 141 CheckButton::CheckButton(char* buttonname) 142 { 143 widget = gtk_check_button_new_with_label(buttonname); 144 } 145 146 /* SLIDER */ 147 Slider::Slider (char * slidername,int start, int end) 148 { 149 widget = gtk_hscale_new_with_range (start, end, 5); 150 } -
orxonox/branches/gui/guicc/orxonox_gui.h
r1895 r1962 10 10 #include <gtk/gtkhbox.h> 11 11 #include <gtk/gtkvbox.h> 12 #include <gtk/gtkbutton.h> 13 #include <gtk/gtkcheckbutton.h> 14 #include <gtk/gtkhscale.h> 15 12 16 13 17 14 18 class Widget 15 19 { 16 private: 17 18 protected: 20 public: 19 21 Widget* next; 20 21 public:22 22 GtkWidget* widget; 23 23 … … 36 36 int policy; 37 37 char* label; 38 39 38 40 39 public: … … 47 46 class Window : public Container 48 47 { 49 private:50 51 52 53 48 public: 54 49 Window (char* windowName); … … 59 54 void showall (); 60 55 static gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data); 61 62 56 }; 63 57 64 58 class Frame :public Container 65 59 { 66 private:67 68 60 public: 69 61 Frame (char* frameName); … … 72 64 73 65 void setTitle (char* title); 74 75 66 }; 76 67 … … 86 77 }; 87 78 79 class Option : public Widget 80 { 81 }; 82 83 class Button : public Option 84 { 85 public: 86 Button (char* buttonname); 87 ~Button (void); 88 }; 89 90 class CheckButton : public Option 91 { 92 public: 93 CheckButton (char* buttonname); 94 ~CheckButton (void); 95 }; 96 97 class Slider : public Option 98 { 99 public: 100 Slider (char * slidername,int start, int end); 101 ~Slider(); 102 }; 88 103 //gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data); 89 104
Note: See TracChangeset
for help on using the changeset viewer.