5 #include <Main/globals.hxx>
6 #include <Airports/airport.hxx>
8 #include "AirportList.hxx"
10 AirportList::AirportList(int x, int y, int width, int height) :
11 puaList(x, y, width, height),
12 GUI_ID(FGCLASS_AIRPORTLIST),
19 AirportList::~AirportList()
26 AirportList::create_list()
28 char **content = FGAirport::searchNamesAndIdents(_filter);
29 int n = (content[0] != NULL) ? 1 : 0;
31 // work around plib 2006/04/18 bug: lists with no entries cause crash on arrow-up
32 newList(n > 0 ? content : 0);
42 AirportList::destroy_list()
44 for (char **c = _content; *c; c++) {
54 AirportList::setValue(const char *s)
56 std::string filter(s);
57 const std::ctype<char> &ct = std::use_facet<std::ctype<char> >(std::locale());
58 ct.toupper((char *)filter.data(), (char *)filter.data() + filter.size());
60 if (filter != _filter) {