]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/new_gui.hxx
Moved random ground cover object management code (userdata.[ch]xx) over
[flightgear.git] / src / GUI / new_gui.hxx
index 7936c8a17c5f77bbf864caeb00435fb052f37462..35cc3d831532f782d188c561d17b62b657e5f9b3 100644 (file)
@@ -10,7 +10,7 @@
 #include <plib/pu.h>
 
 #include <simgear/compiler.h>  // for SG_USING_STD
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
 
 #include <vector>
 SG_USING_STD(vector);
@@ -32,7 +32,7 @@ class FGBinding;
  * This subsystem manages the graphical user interface for FlightGear.
  * It creates a menubar from the XML configuration file in
  * $FG_ROOT/gui/menubar.xml, then stores the configuration properties
- * for XML-configured dialog boxes in $FG_ROOT/gui/dialogs/*.  It
+ * for XML-configured dialog boxes found in $FG_ROOT/gui/dialogs/.  It
  * can show or hide the menubar, and can display any dialog by name.
  */
 class NewGUI : public FGSubsystem
@@ -54,6 +54,11 @@ public:
      */
     virtual void init ();
 
+    /**
+     * Reinitialize the GUI subsystem.
+     */
+    virtual void reinit ();
+
     /**
      * Bind properties for the GUI subsystem.
      *
@@ -79,9 +84,10 @@ public:
      * Display a dialog box.
      *
      * At initialization time, the subsystem reads all of the XML
-     * configuration files from $FG_ROOT/gui/dialogs/*.  The
-     * configuration for each dialog specifies a name, and this method
-     * invokes the dialog with the name specified (if it exists).
+     * configuration files from the directory $FG_ROOT/gui/dialogs/.
+     * The configuration for each dialog specifies a name, and this
+     * method invokes the dialog with the name specified (if it
+     * exists).
      *
      * @param name The name of the dialog box.
      * @return true if the dialog exists, false otherwise.
@@ -137,12 +143,15 @@ protected:
 
 private:
 
+    // Free all allocated memory.
+    void clear ();
+
     // Read all the configuration files in a directory.
     void readDir (const char * path);
 
     FGMenuBar * _menubar;
     FGDialog * _active_dialog;
-    map<string,SGPropertyNode_ptr> _dialog_props;
+    map<string,SGPropertyNode *> _dialog_props;
 
 };