X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FGUI%2Fnew_gui.hxx;h=a0e4e69af6b963fddd6b03ff6f8074085bf6f8c8;hb=4befe0e6ea6b5f21119364f1175a0b6c8e97395c;hp=422503a1a1d98b923f9f04f3b21134c5fdb83d96;hpb=a05ea36acb143e1d50c70f5af444e3ffe50b5222;p=flightgear.git diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index 422503a1a..a0e4e69af 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -7,11 +7,10 @@ #include #include -#include #include #include - -class SGBinding; +#include // for auto_ptr on some systems +#include // for strcmp in lstr() (in this header, alas) class FGMenuBar; class FGDialog; @@ -47,6 +46,8 @@ public: */ virtual void init (); + virtual void shutdown (); + /** * Reinitialize the GUI subsystem. Reloads all XML dialogs. */ @@ -200,6 +201,8 @@ protected: virtual void reset (bool reload); private: + void createMenuBarImplementation(); + struct ltstr { bool operator()(const char* s1, const char* s2) const { @@ -218,10 +221,19 @@ private: // Read all the configuration files in a directory. void readDir (const SGPath& path); - FGMenuBar * _menubar; + std::auto_ptr _menubar; FGDialog * _active_dialog; - std::map _active_dialogs; - std::map _dialog_props; + typedef std::map DialogDict; + DialogDict _active_dialogs; + + typedef std::map NamePathDict; + // mapping from dialog names to the corresponding XML property list + // which defines them + NamePathDict _dialog_names; + + // cache of loaded dialog proeprties + typedef std::map NameDialogDict; + NameDialogDict _dialog_props; };