Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1962 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Jun 17, 2004, 12:52:36 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/gui/guicc: added option-classes, typo, code-design. Framework is still far from being finished

Location:
orxonox/branches/gui/guicc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/gui/guicc/orxonox_gui.cc

    r1895 r1962  
    1010    Frame* Frametest = new Frame ("Test");
    1111    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
    1421    orxonoxGUI->showall ();
    1522
     
    3037}
    3138
    32  /* CONTAINERS*/
     39/* CONTAINERS*/
    3340
    3441void Container::fill (Widget *lowerWidget)
     
    4047// gtk_container_set_border_width (GTK_CONTAINER (widget), 5);
    4148
    42   /* WINDOW */
     49/* WINDOW */
    4350
    4451Window::Window (void)
     
    7683
    7784
    78    /* FRAME */
     85/* FRAME */
    7986
    8087Frame::Frame (void)
     
    96103
    97104
    98  /* BOX */
     105/* BOX */
    99106
    100107Box::Box (void)
     
    121128  gtk_box_pack_start (GTK_BOX(this->widget), lowerWidget->widget, TRUE, TRUE, 0);
    122129}
     130
     131
     132/* OPTION */
     133
     134/* BUTTON */
     135Button::Button(char* buttonname)
     136{
     137  widget = gtk_button_new_with_label(buttonname);
     138}
     139
     140/* CHECKBUTTON */
     141CheckButton::CheckButton(char* buttonname)
     142{
     143  widget = gtk_check_button_new_with_label(buttonname);
     144}
     145
     146/* SLIDER */
     147Slider::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  
    1010#include <gtk/gtkhbox.h>
    1111#include <gtk/gtkvbox.h>
     12#include <gtk/gtkbutton.h>
     13#include <gtk/gtkcheckbutton.h>
     14#include <gtk/gtkhscale.h>
     15
    1216
    1317
    1418class Widget
    1519{
    16  private:
    17 
    18  protected:
     20 public:
    1921  Widget* next;
    20 
    21  public:
    2222  GtkWidget* widget; 
    2323
     
    3636  int policy;
    3737  char* label;
    38 
    3938 
    4039 public:
     
    4746class Window : public Container
    4847{
    49  private:
    50 
    51  
    52 
    5348 public:
    5449  Window (char* windowName);
     
    5954  void showall ();
    6055  static gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data);
    61 
    6256};
    6357
    6458class Frame :public Container
    6559{
    66  private:
    67 
    6860 public:
    6961  Frame (char* frameName);
     
    7264 
    7365  void setTitle (char* title);
    74 
    7566};
    7667
     
    8677};
    8778
     79class Option : public Widget
     80{
     81};
     82
     83class Button : public Option
     84{
     85 public:
     86  Button (char* buttonname);
     87  ~Button (void);
     88};
     89
     90class CheckButton : public Option
     91{
     92 public:
     93  CheckButton (char* buttonname);
     94  ~CheckButton (void);
     95};
     96
     97class Slider : public Option
     98{
     99 public:
     100  Slider (char * slidername,int start, int end);
     101  ~Slider();
     102};
    88103//gint orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data);
    89104
Note: See TracChangeset for help on using the changeset viewer.