2 #define __NEW_GUI_HXX 1
5 # error This library requires C++
10 #include <simgear/compiler.h> // for SG_USING_STD
11 #include <simgear/misc/props.hxx>
19 #include <Main/fgfs.hxx>
25 GUIWidget (SGPropertyNode_ptr props);
26 virtual ~GUIWidget ();
28 virtual void updateProperties ();
29 virtual void applyProperties ();
33 void display (SGPropertyNode_ptr props);
35 GUIWidget (const GUIWidget &); // just for safety
37 puObject * makeObject (SGPropertyNode * props,
38 int parentWidth, int parentHeight);
40 void setupObject (puObject * object, SGPropertyNode * props);
42 void setupGroup (puGroup * group, SGPropertyNode * props,
43 int width, int height, bool makeFrame = false);
47 struct PropertyObject {
48 PropertyObject (puObject * object, SGPropertyNode_ptr node);
50 SGPropertyNode_ptr node;
53 vector<PropertyObject> _propertyObjects;
58 class NewGUI : public FGSubsystem
65 virtual void update (double delta_time_sec);
66 virtual void display (const string &name);
70 void readDir (const char * path);
72 map<string,SGPropertyNode_ptr> _widgets;
76 #endif // __NEW_GUI_HXX