X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Fatcdialog.hxx;h=a5d460e4399865f842bb529b5a6b9f5d2f96a16e;hb=831f75a0309fd8ef729f7f2407c17e13cccf0bd9;hp=f52b5b4f1852e0f7c20a8b2abdf6add13ea4c9f0;hpb=f8a8805e2dde01e0c0a962c283880fa60fa23f0f;p=flightgear.git diff --git a/src/ATC/atcdialog.hxx b/src/ATC/atcdialog.hxx index f52b5b4f1..a5d460e43 100644 --- a/src/ATC/atcdialog.hxx +++ b/src/ATC/atcdialog.hxx @@ -28,41 +28,48 @@ #endif #include -#include #include -#include -#include -#include -#include +#include #include +class NewGUI; +class SGPropertyNode; -#include // mkDialog -#include - -typedef vector StringVec; -typedef vector:: iterator StringVecIterator; - -static bool doATCDialog(const SGPropertyNode* arg); - -class FGATCDialogNew { +class FGATCDialogNew +{ private: NewGUI *_gui; bool dialogVisible; - StringVec commands; + 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, string); + 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