Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2605 in orxonox.OLD for orxonox/trunk/gui/orxonox_gui.h


Ignore:
Timestamp:
Oct 19, 2004, 10:39:44 PM (21 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: generalized: destructor, added label to class Widget, down is now a method of Packer, isOpen added for Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/gui/orxonox_gui.h

    r2595 r2605  
    3939 private:
    4040 public:
     41  ~Widget ();
     42
    4143  Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next
    4244  GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains.
    4345  virtual void init(void);
    4446  int is_option; //!< with this Paramenter one can set the IsOption type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option
    45   enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; //!< defines is_option states
     47  /**
     48     \briefdefines is_option states
     49  */
     50  enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2};
     51  char* label; //!< The name of the Widget. Some do display it, Options need it to save;
    4652  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    4753  void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
    4854  void connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    4955  void show ();
     56  void hide ();
     57  void setSize(int width, int height);
    5058
    5159  void walkThrough (void (*function)(Widget*));
     
    5563};
    5664
     65//! This is a Packer Object, which has the ability to Pack other Widgets into itself.
     66class Packer : public Widget
     67{
     68 public:
     69  Widget* down; //!< this points to the Widget below this.
     70
     71  void init(void);
     72};
    5773
    5874//! This is a Container Class, it can contain one sub-Widget: down.
     
    6278 * The derived classes of Container can be displayed
    6379*/
    64 class Container : public Widget
     80class Container : public Packer
    6581{
    6682 private:
    6783  int borderwidth;
    6884  int policy;
    69   char* label;
    70  
    71  public:
    72   void init(void);
    73   Widget* down; //!< this points to the Widget below this.
     85 
     86 public:
     87  void init(void);
    7488  //  void setBorderWidth (int borderwidth);
    7589  //  virtual void setTitle (char* title) = 0;
     
    8498class Window : public Container
    8599{
     100 private:
     101  bool isOpen;
    86102 public:
    87103  Window (char* windowName);
    88104  Window (void);
    89   ~Window ();
    90105  void init ();
    91106 
     
    105120  Frame (char* frameName);
    106121  Frame (void);
    107   ~Frame ();
    108122  void init(void);
    109123 
     
    120134  EventBox (char* eventBoxName);
    121135  EventBox (void);
    122   ~EventBox ();
    123136  void init(void);
    124137 
     
    132145 * A Box is always filled left->right (horizontally) or up->down (vertically)
    133146 */
    134 class Box : public Widget
     147class Box : public Packer
    135148{
    136149 public:
    137150  Box (void);
    138151  Box (char boxtype);
    139   ~Box (void);
    140152  void init(char boxtype);
    141153
    142   Widget* down; //!< the Lower Widget of a Box.
    143154  void fill (Widget* lowerWidget);
    144155
     
    154165 public:
    155166  Image (char* imgaename);
    156   ~Image ();
    157167  void init(void);
    158168};
     
    169179
    170180  int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume
    171   char* option_name; //!< options have a name, that can be displayed around them
    172181  char* flag_name; //!< options have a flag name that will be appendet if you start the Program from the GUI.
    173182  char* flag_name_short; //!< like flag_name but shorter
     
    187196 public:
    188197  Button (char* buttonname);
    189   ~Button (void);
    190198  void init(void);
    191199
     
    202210 public:
    203211  CheckButton (char* buttonname);
    204   ~CheckButton (void);
    205212  static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
    206213 
     
    219226 public:
    220227  Slider (char* slidername,int start, int end);
    221   ~Slider ();
    222228  void init(int start, int end);
    223229
     
    239245 public:
    240246  Menu (char* menuname, ...);
    241   ~Menu ();
    242247  void init(void);
    243248
     
    255260  Label ();
    256261  Label (char* text);
    257   ~Label ();
    258262  void init(void);
    259263 
Note: See TracChangeset for help on using the changeset viewer.