X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Fatcdialog.hxx;h=a5d460e4399865f842bb529b5a6b9f5d2f96a16e;hb=f1e0206f30a78df71ef6654dc280063b94651e73;hp=1a54debfbb7d8a6810d988c0c78dfbba0f1d75f2;hpb=49677f512b8edaaf22c76761dbbf9c0850c79aad;p=flightgear.git diff --git a/src/ATC/atcdialog.hxx b/src/ATC/atcdialog.hxx index 1a54debfb..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 *current_atcdialog; #endif // _ATC_DIALOG_HXX_ \ No newline at end of file