Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/gui/guicc/orxonox_gui.h @ 1993

Last change on this file since 1993 was 1993, checked in by bensch, 20 years ago

orxonox/branches/gui: removed segmentation fault created by not putting a NULL to Window::down

File size: 2.5 KB
Line 
1#ifndef _ORXONOX_GUI_H
2#define _ORXONOX_GUI_H
3
4#include <stdlib.h>
5#include <string.h>
6#include <gtk/gtkmain.h>
7#include <gtk/gtkwindow.h>
8#include <gtk/gtkframe.h>
9#include <gtk/gtkhbox.h>
10#include <gtk/gtkvbox.h>
11#include <gtk/gtkbutton.h>
12#include <gtk/gtkcheckbutton.h>
13#include <gtk/gtkhscale.h>
14#include <gtk/gtkoptionmenu.h>
15#include <gtk/gtkmenu.h>
16#include <gtk/gtkmenuitem.h>
17
18
19class OrxonoxGui
20{
21 public:
22  OrxonoxGui (int argc, char *argv[]);
23  ~OrxonoxGui ();
24};
25
26class Widget
27{
28 public:
29  Widget* next;
30  GtkWidget* widget;
31  int is_option;
32
33  //virtual void create ();
34  //  void addWidget ();
35  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
36  void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
37  void show ();
38  void listOptions ();
39
40};
41
42
43
44class Container : public Widget
45{
46 private:
47  int borderwidth;
48  int policy;
49  char* label;
50 
51 public:
52  Widget* down;
53  void setBorderWidth (int borderwidth);
54  virtual void setTitle (char* title) = 0;
55  void fill (Widget *lowerWidget);
56};
57
58class Window : public Container
59{
60 public:
61  Window (char* windowName);
62  Window (void);
63  ~Window ();
64 
65  void setTitle (char* title);
66  void showall ();
67  static gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
68};
69
70class Frame :public Container
71{
72 public:
73  Frame (char* frameName);
74  Frame (void);
75  ~Frame ();
76 
77  void setTitle (char* title);
78};
79
80class Box : public Widget
81{
82 public:
83  Box (void);
84  Box (char boxtype);
85  ~Box (void);
86
87  Widget* down;
88  void fill (Widget* lowerWidget);
89
90};
91
92class Option : public Widget
93{
94 public:
95  //virtual gint OptionChange (GtkWidget *widget, GdkEvent *event, gpointer data);
96 
97  int value;
98  char* option_name;
99  char* flag_name;
100  char* flag_name_short;
101  int default_value;
102
103  void setFlagName (char* flagname);
104};
105
106class Button : public Option
107{
108 public:
109  Button (char* buttonname);
110  ~Button (void);
111};
112
113class CheckButton : public Option
114{
115 public:
116  CheckButton (char* buttonname);
117  ~CheckButton (void);
118  static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
119};
120
121class Slider : public Option
122{
123 public:
124  Slider (char* slidername,int start, int end);
125  ~Slider ();
126  int i;
127  static gint OptionChange (GtkWidget* widget, Widget* slider);
128};
129
130class Menu : public Option
131{
132 public:
133  Menu (char* menuname, ...);
134  ~Menu ();
135
136  static gint OptionChange (GtkWidget* widget, Widget* menu);
137};
138   
139//gint orxonox_gui_quit (GtkWidget *widget, GdkEvent *event, gpointer data);
140
141#endif /* _ORXONOX_GUI_H */
Note: See TracBrowser for help on using the repository browser.