X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Fatcdialog.hxx;h=a5d460e4399865f842bb529b5a6b9f5d2f96a16e;hb=831f75a0309fd8ef729f7f2407c17e13cccf0bd9;hp=2e0aa2f74ab6dc93025b07f2dfca446ecea1ee1a;hpb=416ba93a417c4cadde025ba4d7bbcce71d613372;p=flightgear.git diff --git a/src/ATC/atcdialog.hxx b/src/ATC/atcdialog.hxx index 2e0aa2f74..a5d460e43 100644 --- a/src/ATC/atcdialog.hxx +++ b/src/ATC/atcdialog.hxx @@ -28,36 +28,48 @@ #endif #include -#include #include -#include -#include -#include -#include +#include #include +class NewGUI; +class SGPropertyNode; -#include // mkDialog -#include - - -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