From: James Turner Date: Thu, 30 Sep 2010 17:58:01 +0000 (+0100) Subject: Tidy new_gui header X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=582c1e8df8a27ada5dcac718d8ee310a55ef579f;p=flightgear.git Tidy new_gui header --- diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index b17c0b021..034484e27 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -1,12 +1,17 @@ // new_gui.cxx: implementation of XML-configurable GUI support. + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "new_gui.hxx" + #include #include #include #include #include -#include "new_gui.hxx" - #include #include diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index 6bc270715..5932512fd 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -3,17 +3,8 @@ #ifndef __NEW_GUI_HXX #define __NEW_GUI_HXX 1 -#ifndef __cplusplus -# error This library requires C++ -#endif - -#ifdef HAVE_CONFIG_H -# include -#endif - #include -#include // for SG_USING_STD #include #include #include @@ -22,10 +13,6 @@ #include #include -using std::vector; -using std::map; -using std::string; - #include
class SGBinding; @@ -119,7 +106,7 @@ public: * @param name The name of the dialog box. * @return true if the dialog exists, false otherwise. */ - virtual bool showDialog (const string &name); + virtual bool showDialog (const std::string &name); /** @@ -138,14 +125,14 @@ public: * @param name The name of the dialog box. * @return true if the dialog was active, false otherwise. */ - virtual bool closeDialog (const string &name); + virtual bool closeDialog (const std::string &name); /** * Get dialog property tree's root node. * @param name The name of the dialog box. * @return node pointer if the dialog was found, zero otherwise. */ - virtual SGPropertyNode_ptr getDialogProperties (const string &name); + virtual SGPropertyNode_ptr getDialogProperties (const std::string &name); /** * Return a pointer to the current menubar. @@ -173,14 +160,14 @@ public: * * @return The named dialog, or 0 if it isn't active. */ - virtual FGDialog * getDialog (const string &name); + virtual FGDialog * getDialog (const std::string &name); virtual FGColor *getColor (const char * name) const { _citt_t it = _colors.find(name); return (it != _colors.end()) ? it->second : NULL; } - virtual FGColor *getColor (const string &name) const { + virtual FGColor *getColor (const std::string &name) const { _citt_t it = _colors.find(name.c_str()); return (it != _colors.end()) ? it->second : NULL; } @@ -236,8 +223,8 @@ private: FGMenuBar * _menubar; FGDialog * _active_dialog; - map _active_dialogs; - map _dialog_props; + std::map _active_dialogs; + std::map _dialog_props; };