#include "FGCocoaMenuBar.hxx"
#endif
+#if defined(SG_WINDOWS)
+#include "FGWindowsMenuBar.hxx"
+#endif
+
#include "FGPUIDialog.hxx"
#include "FGFontCache.hxx"
#include "FGColor.hxx"
void
NewGUI::shutdown()
{
+ DialogDict::iterator it = _active_dialogs.begin();
+ for (; it != _active_dialogs.end(); ++it) {
+ delete it->second;
+ }
+ _active_dialogs.clear();
+
fgUntie("/sim/menubar/visibility");
_menubar.reset();
_dialog_props.clear();
if (fgGetBool("/sim/menubar/native", true)) {
_menubar.reset(new FGCocoaMenuBar);
}
+#endif
+#if defined(SG_WINDOWS)
+ if (fgGetBool("/sim/menubar/native", true)) {
+ // Windows-native menubar disabled for the moment, fall-through
+ // to PUI version
+ // _menubar.reset(new FGWindowsMenuBar);
+ }
#endif
if (!_menubar.get()) {
_menubar.reset(new FGPUIMenuBar);
void
NewGUI::reset (bool reload)
{
- map<string,FGDialog *>::iterator iter;
+ DialogDict::iterator iter;
string_list openDialogs;
// close all open dialogs and remember them ...
for (iter = _active_dialogs.begin(); iter != _active_dialogs.end(); ++iter)
void
NewGUI::setupFont (SGPropertyNode *node)
{
- _font = globals->get_fontcache()->get(node);
+ _font = FGFontCache::instance()->get(node);
puSetDefaultFonts(*_font, *_font);
return;
}