#endif
#include <simgear/constants.h>
-#include <simgear/structure/commands.hxx>
#include <simgear/compiler.h>
-#include <simgear/props/props.hxx>
-#include <simgear/misc/sgstream.hxx>
-#include <simgear/math/sg_geodesy.hxx>
-#include <simgear/debug/logstream.hxx>
+#include <simgear/misc/strutils.hxx>
#include <simgear/structure/SGSharedPtr.hxx>
+class NewGUI;
+class SGPropertyNode;
-#include <GUI/gui.h> // mkDialog
-#include <GUI/new_gui.hxx>
-
-
-static bool doATCDialog(const SGPropertyNode* arg);
-
-class FGATCDialogNew {
+class FGATCDialogNew
+{
private:
NewGUI *_gui;
- bool dialogVisible;
+ bool dialogVisible;
+ string_list commands;
+
+ static FGATCDialogNew *_instance;
public:
FGATCDialogNew();
~FGATCDialogNew();
+ void frequencySearch();
+ void frequencyDisplay(const std::string& ident);
+
void init();
void update(double dt);
void PopupDialog();
+ void addEntry(int, const std::string&);
+ void removeEntry(int);
+
+ static bool popup( const SGPropertyNode * ) {
+ instance()->PopupDialog();
+ return true;
+ }
+
+ inline static FGATCDialogNew * instance() {
+ if( _instance != NULL ) return _instance;
+ _instance = new FGATCDialogNew();
+ _instance->init();
+ return _instance;
+ }
};
-extern FGATCDialogNew *currentATCDialog;
#endif // _ATC_DIALOG_HXX_
\ No newline at end of file