2002-11-08 16:33:00 +00:00
|
|
|
// new_gui.hxx - XML-configurable GUI subsystem.
|
|
|
|
|
2002-11-07 16:27:47 +00:00
|
|
|
#ifndef __NEW_GUI_HXX
|
|
|
|
#define __NEW_GUI_HXX 1
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
# error This library requires C++
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <plib/pu.h>
|
|
|
|
|
|
|
|
#include <simgear/compiler.h> // for SG_USING_STD
|
|
|
|
#include <simgear/misc/props.hxx>
|
|
|
|
|
2002-11-07 22:59:46 +00:00
|
|
|
#include <vector>
|
|
|
|
SG_USING_STD(vector);
|
|
|
|
|
2002-11-07 16:27:47 +00:00
|
|
|
#include <map>
|
|
|
|
SG_USING_STD(map);
|
|
|
|
|
|
|
|
#include <Main/fgfs.hxx>
|
2002-12-22 19:52:26 +00:00
|
|
|
#include <Main/fg_props.hxx>
|
2002-11-07 16:27:47 +00:00
|
|
|
|
2003-01-16 18:06:27 +00:00
|
|
|
class FGMenuBar;
|
2003-01-18 15:16:34 +00:00
|
|
|
class FGDialog;
|
|
|
|
class FGBinding;
|
2002-11-07 16:27:47 +00:00
|
|
|
|
2002-11-08 15:24:14 +00:00
|
|
|
|
|
|
|
class NewGUI : public FGSubsystem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
NewGUI ();
|
|
|
|
virtual ~NewGUI ();
|
|
|
|
virtual void init ();
|
2003-01-18 21:11:51 +00:00
|
|
|
virtual void bind ();
|
|
|
|
virtual void unbind ();
|
2002-11-08 15:24:14 +00:00
|
|
|
virtual void update (double delta_time_sec);
|
|
|
|
virtual void display (const string &name);
|
|
|
|
|
2003-01-18 15:16:34 +00:00
|
|
|
virtual void setCurrentWidget (FGDialog * widget);
|
|
|
|
virtual FGDialog * getCurrentWidget ();
|
2002-12-22 19:52:26 +00:00
|
|
|
|
2003-01-16 18:06:27 +00:00
|
|
|
virtual FGMenuBar * getMenuBar ();
|
|
|
|
|
2003-01-18 21:11:51 +00:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool getMenuBarVisible () const;
|
|
|
|
virtual void setMenuBarVisible (bool visible);
|
|
|
|
|
2002-12-22 19:52:26 +00:00
|
|
|
|
2002-11-08 15:24:14 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
void readDir (const char * path);
|
|
|
|
|
2003-01-16 18:06:27 +00:00
|
|
|
FGMenuBar * _menubar;
|
2003-01-18 15:16:34 +00:00
|
|
|
FGDialog * _current_widget;
|
2002-11-08 15:24:14 +00:00
|
|
|
map<string,SGPropertyNode_ptr> _widgets;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2002-12-22 19:52:26 +00:00
|
|
|
|
2002-11-07 16:27:47 +00:00
|
|
|
#endif // __NEW_GUI_HXX
|
2002-11-08 16:33:00 +00:00
|
|
|
|
|
|
|
// end of new_gui.hxx
|