X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATC%2Fatcdialog.hxx;h=3125fd3e475e2e9a585cb9ed2f6ade38a20d44d3;hb=43bc61d1318abd52de6c723dbeef0e4058b1a823;hp=2e0aa2f74ab6dc93025b07f2dfca446ecea1ee1a;hpb=ff4004b261677104d958591635b084131b678d59;p=flightgear.git diff --git a/src/ATC/atcdialog.hxx b/src/ATC/atcdialog.hxx index 2e0aa2f74..3125fd3e4 100644 --- a/src/ATC/atcdialog.hxx +++ b/src/ATC/atcdialog.hxx @@ -40,13 +40,17 @@ #include // mkDialog #include +typedef std::vector StringVec; +typedef StringVec::iterator StringVecIterator; -static bool doATCDialog(const SGPropertyNode* arg); class FGATCDialogNew { private: NewGUI *_gui; - bool dialogVisible; + bool dialogVisible; + StringVec commands; + + static FGATCDialogNew *_instance; public: FGATCDialogNew(); @@ -56,8 +60,21 @@ public: void update(double dt); void PopupDialog(); + void addEntry(int, 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