]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/new_gui.hxx
Launcher: Maintain aircraft selection better
[flightgear.git] / src / GUI / new_gui.hxx
index 08a01b27f5a9e730ea011f36bb8aa94277863b2f..a0e4e69af6b963fddd6b03ff6f8074085bf6f8c8 100644 (file)
@@ -7,12 +7,10 @@
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/misc/sg_path.hxx>
 
-#include <string.h>
-#include <functional>
 #include <vector>
 #include <map>
-
-class SGBinding;
+#include <memory> // for auto_ptr on some systems
+#include <cstring> // for strcmp in lstr() (in this header, alas)
 
 class FGMenuBar;
 class FGDialog;
@@ -48,6 +46,8 @@ public:
      */
     virtual void init ();
 
+    virtual void shutdown ();
+    
     /**
      * Reinitialize the GUI subsystem. Reloads all XML dialogs.
      */
@@ -201,6 +201,8 @@ protected:
     virtual void reset (bool reload);
 
 private:
+    void createMenuBarImplementation();
+    
     struct ltstr
     {
         bool operator()(const char* s1, const char* s2) const {
@@ -221,8 +223,17 @@ private:
 
     std::auto_ptr<FGMenuBar> _menubar;
     FGDialog * _active_dialog;
-    std::map<std::string,FGDialog *> _active_dialogs;
-    std::map<std::string,SGPropertyNode_ptr> _dialog_props;
+    typedef std::map<std::string,FGDialog *> DialogDict;
+    DialogDict _active_dialogs;
+  
+    typedef std::map<std::string, SGPath> 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<std::string,SGPropertyNode_ptr> NameDialogDict;
+    NameDialogDict _dialog_props;
 
 };