1 // atcdialog.hxx - classes to manage user interactions with AI traffic
2 // Written by Durk Talsma, started April 3, 2011
3 // Based on earlier code written by Alexander Kappes and David Luff
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 2 of the
8 // License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful, but
11 // WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef _ATC_DIALOG_HXX_
23 #define _ATC_DIALOG_HXX_
27 # error This library requires C++
30 #include <simgear/constants.h>
31 #include <simgear/structure/commands.hxx>
32 #include <simgear/compiler.h>
33 #include <simgear/props/props.hxx>
34 #include <simgear/misc/sgstream.hxx>
35 #include <simgear/math/sg_geodesy.hxx>
36 #include <simgear/debug/logstream.hxx>
37 #include <simgear/structure/SGSharedPtr.hxx>
40 #include <GUI/gui.h> // mkDialog
41 #include <GUI/new_gui.hxx>
43 typedef std::vector<std::string> StringVec;
44 typedef StringVec::iterator StringVecIterator;
47 class FGATCDialogNew {
53 static FGATCDialogNew *_instance;
61 void update(double dt);
63 void addEntry(int, string);
64 void removeEntry(int);
66 static bool popup( const SGPropertyNode * ) {
67 instance()->PopupDialog();
71 inline static FGATCDialogNew * instance() {
72 if( _instance != NULL ) return _instance;
73 _instance = new FGATCDialogNew();
80 #endif // _ATC_DIALOG_HXX_