9#include <simgear/props/props.hxx>
10#include <simgear/structure/subsystem_mgr.hxx>
11#include <simgear/misc/sg_path.hxx>
51 void update(
double delta_time_sec)
override;
72 virtual void newDialog (SGPropertyNode* node);
152 _citt_t it = _colors.find(
name);
153 return (it != _colors.end()) ? it->second : NULL;
156 _citt_t it = _colors.find(
name.c_str());
157 return (it != _colors.end()) ? it->second : NULL;
184 virtual void reset (
bool reload);
190 void createMenuBarImplementation();
192 void setDialogMetadata(
const std::string&
name,
const SGPath& xmlFilepath,
193 const std::string& translationDomain =
"core");
195 typedef std::map<std::string, FGColor*> ColourDict;
197 typedef ColourDict::iterator _itt_t;
198 typedef ColourDict::const_iterator _citt_t;
203 void readDir(
const SGPath& path,
const std::string& translationDomain);
205 std::unique_ptr<FGMenuBar> _menubar;
209 typedef std::map<std::string, FGDialogRef> DialogDict;
210 DialogDict _active_dialogs;
212 struct DialogMetadata {
213 DialogMetadata(
const SGPath& xmlFilePath,
214 const std::string& translationDomain);
217 std::string translationDomain;
220 typedef std::map<std::string, DialogMetadata> DialogMetadataDict;
224 DialogMetadataDict _dialog_metadata;
227 typedef std::map<std::string,SGPropertyNode_ptr> NameDialogDict;
228 NameDialogDict _dialog_props;
An XML-configured dialog box.
virtual SGPropertyNode_ptr getDialogProperties(const std::string &name)
Get dialog property tree's root node.
virtual bool closeDialog(const std::string &name)
Close a named dialog, if it is open.
static const char * staticSubsystemClassId()
SGSharedPtr< FGDialog > FGDialogRef
virtual void setMenuBarVisible(bool visible)
Show or hide the menubar.
void setMenuBarOverlapHide(bool hide)
virtual FGDialogRef getActiveDialog()
Get the dialog currently active, if any.
virtual void reset(bool reload)
Used by reinit() and redraw() to close all dialogs and to apply current GUI colors.
void update(double delta_time_sec) override
virtual bool showDialog(const std::string &name)
Display a dialog box.
virtual bool toggleDialog(const std::string &name)
Toggle display of a dialog box.
virtual void redraw()
Redraw the GUI picking up new GUI colors.
virtual FGMenuBar * getMenuBar()
Return a pointer to the current menubar.
virtual bool getMenuBarVisible() const
Test if the menubar is visible.
virtual ~NewGUI()
Destructor.
virtual FGColor * getColor(const char *name) const
virtual FGColor * getColor(const std::string &name) const
virtual void setActiveDialog(FGDialog *dialog)
Ignore this method.
virtual bool closeActiveDialog()
Close the currenty active dialog.
bool getMenuBarOverlapHide() const
virtual void newDialog(SGPropertyNode *node)
Creates a new dialog box, using the same property format as the gui/dialogs configuration files.
virtual FGDialogRef getDialog(const std::string &name)
Get the named dialog if active.