Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2707 in orxonox.OLD for orxonox/branches/buerli/gui/orxonox_gui.h


Ignore:
Timestamp:
Nov 3, 2004, 12:29:03 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/buerli: merged back from trunk, with new configure makefile and so forth.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/buerli/gui/orxonox_gui.h

    r2595 r2707  
    77#define _ORXONOX_GUI_H
    88
     9#if HAVE_CONFIG_H
     10#include <config.h>
     11#endif
     12
    913#include <stdlib.h>
    10 #include <string.h>
    1114#include <gtk/gtkmain.h>
    1215#include <gtk/gtkwindow.h>
     
    3437
    3538//! This is the topmost object that can be displayed all others are derived from it.
    36 
    3739class Widget
    3840{
    3941 private:
    4042 public:
     43  ~Widget ();
     44
    4145  Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next
    4246  GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains.
    43   virtual void init(void);
     47  void init(void);
    4448  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
     49  /**
     50     \briefdefines is_option states
     51  */
     52  enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2};
     53  char* label; //!< The name of the Widget. Some do display it, Options need it to save;
    4654  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    4755  void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
    4856  void connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    4957  void show ();
     58  void hide ();
     59  void setSize(int width, int height);
    5060
    5161  void walkThrough (void (*function)(Widget*));
     
    5565};
    5666
     67//! This is a Packer Object, which has the ability to Pack other Widgets into itself.
     68class Packer : public Widget
     69{
     70 public:
     71  Widget* down; //!< this points to the Widget below this.
     72  char* groupName; //!< For each Packer you can specify a Groupname under which the lowerWidgets will be saved.
     73
     74  void init(void);
     75  void setGroupName (char* name);
     76  char* getGroupName (void);
     77};
    5778
    5879//! This is a Container Class, it can contain one sub-Widget: down.
     
    6283 * The derived classes of Container can be displayed
    6384*/
    64 class Container : public Widget
     85class Container : public Packer
    6586{
    6687 private:
    6788  int borderwidth;
    6889  int policy;
    69   char* label;
    70  
    71  public:
    72   void init(void);
    73   Widget* down; //!< this points to the Widget below this.
     90 
     91 public:
     92  void init(void);
    7493  //  void setBorderWidth (int borderwidth);
    7594  //  virtual void setTitle (char* title) = 0;
     
    84103class Window : public Container
    85104{
     105 private:
     106  bool isOpen;
    86107 public:
    87108  Window (char* windowName);
    88109  Window (void);
    89   ~Window ();
    90110  void init ();
    91111 
     
    105125  Frame (char* frameName);
    106126  Frame (void);
    107   ~Frame ();
    108127  void init(void);
    109128 
     
    120139  EventBox (char* eventBoxName);
    121140  EventBox (void);
    122   ~EventBox ();
    123141  void init(void);
    124142 
     
    132150 * A Box is always filled left->right (horizontally) or up->down (vertically)
    133151 */
    134 class Box : public Widget
     152class Box : public Packer
    135153{
    136154 public:
    137155  Box (void);
    138156  Box (char boxtype);
    139   ~Box (void);
    140157  void init(char boxtype);
    141158
    142   Widget* down; //!< the Lower Widget of a Box.
    143159  void fill (Widget* lowerWidget);
    144160
     
    154170 public:
    155171  Image (char* imgaename);
    156   ~Image ();
    157172  void init(void);
    158173};
     
    169184
    170185  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
    172186  char* flag_name; //!< options have a flag name that will be appendet if you start the Program from the GUI.
    173187  char* flag_name_short; //!< like flag_name but shorter
     
    187201 public:
    188202  Button (char* buttonname);
    189   ~Button (void);
    190203  void init(void);
    191204
     
    202215 public:
    203216  CheckButton (char* buttonname);
    204   ~CheckButton (void);
    205217  static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
    206218 
     
    219231 public:
    220232  Slider (char* slidername,int start, int end);
    221   ~Slider ();
    222233  void init(int start, int end);
    223234
     
    239250 public:
    240251  Menu (char* menuname, ...);
    241   ~Menu ();
    242252  void init(void);
    243253
     
    255265  Label ();
    256266  Label (char* text);
    257   ~Label ();
    258267  void init(void);
    259268 
Note: See TracChangeset for help on using the changeset viewer.