Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1895 in orxonox.OLD for orxonox/branches/gui


Ignore:
Timestamp:
May 19, 2004, 12:12:33 AM (21 years ago)
Author:
bensch
Message:

orxonox/branches/gui/guicc: added Box-support, casting

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

Legend:

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

    r1894 r1895  
    99
    1010    Frame* Frametest = new Frame ("Test");
    11     orxonoxGUI->fill(Frametest);
    12     //Frame test = orxonoxGUI->down;
    13     //test.setTitle("shit");
     11    orxonoxGUI->fill((Frame*) Frametest);
     12    Frame* test = (Frame*) orxonoxGUI->down;
     13    test->setTitle("shit");
    1414    orxonoxGUI->showall ();
    1515
     
    6969
    7070
    71 
    7271gint Window::orxonox_gui_quit ( GtkWidget *widget, GdkEvent *event, gpointer data)
    7372{
     
    9493  gtk_frame_set_label (GTK_FRAME (widget), title);
    9594}
     95
     96
     97
     98 /* BOX */
     99
     100Box::Box (void)
     101{
     102  widget = gtk_hbox_new(FALSE, 0);
     103}
     104Box::Box (char boxtype)
     105{
     106  if (boxtype == 'v')
     107    {
     108      widget = gtk_vbox_new(FALSE, 0);
     109    }
     110  else
     111    {
     112      widget = gtk_hbox_new(FALSE, 0);
     113    }
     114}
     115
     116Box::~Box ()
     117{}
     118
     119void Box::fill (Widget *lowerWidget)
     120{
     121  gtk_box_pack_start (GTK_BOX(this->widget), lowerWidget->widget, TRUE, TRUE, 0);
     122}
  • orxonox/branches/gui/guicc/orxonox_gui.h

    r1894 r1895  
    88#include <gtk/gtkwindow.h>
    99#include <gtk/gtkframe.h>
     10#include <gtk/gtkhbox.h>
     11#include <gtk/gtkvbox.h>
    1012
    1113
     
    1416 private:
    1517
     18 protected:
    1619  Widget* next;
    17  protected:
    1820
    1921 public:
     
    5355  Window (void);
    5456  ~Window ();
     57 
    5558  void setTitle (char* title);
    5659  void showall ();
     
    6770  Frame (void);
    6871  ~Frame ();
     72 
    6973  void setTitle (char* title);
    7074
     
    7377class Box : public Widget
    7478{
     79 public:
     80  Box (void);
     81  Box (char boxtype);
     82  ~Box (void);
     83
     84  void fill (Widget *lowerWidget);
    7585
    7686};
Note: See TracChangeset for help on using the changeset viewer.