From e2c195f3a6d27f238f3a9a2bb0fec1bb6bb3e867 Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 22 May 2006 16:14:50 +0000 Subject: [PATCH] - move the ID stuff to dialog.hxx - add an identifier to fgPropertyList(), which is also PUCLASS_LIST based --- src/GUI/AirportList.hxx | 9 +-------- src/GUI/dialog.cxx | 3 +++ src/GUI/dialog.hxx | 8 +++++++- src/GUI/property_list.cxx | 1 + src/GUI/property_list.hxx | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/GUI/AirportList.hxx b/src/GUI/AirportList.hxx index f4340d19c..c7e6a11b5 100644 --- a/src/GUI/AirportList.hxx +++ b/src/GUI/AirportList.hxx @@ -7,16 +7,9 @@ #include STL_STRING #include +#include "dialog.hxx" -// ugly temproary workaround for plib's lack of user defined class ids FIXME -#define FGCLASS_LIST 0x00000001 -#define FGCLASS_AIRPORTLIST 0x00000002 -class GUI_ID { public: GUI_ID(int id) : id(id) {} int id; }; - - -#include "puList.hxx" - SG_USING_STD(string); class FGAirportList; diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index bcd07aebf..7c9120c71 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -16,6 +16,9 @@ #include "property_list.hxx" #include "layout.hxx" + + + //////////////////////////////////////////////////////////////////////// // Implementation of GUIInfo. //////////////////////////////////////////////////////////////////////// diff --git a/src/GUI/dialog.hxx b/src/GUI/dialog.hxx index 802dea963..df981c81f 100644 --- a/src/GUI/dialog.hxx +++ b/src/GUI/dialog.hxx @@ -20,7 +20,13 @@ #include SG_USING_STD(vector); -#include "AirportList.hxx" + +// ugly temproary workaround for plib's lack of user defined class ids FIXME +#define FGCLASS_LIST 0x00000001 +#define FGCLASS_AIRPORTLIST 0x00000002 +#define FGCLASS_PROPERTYLIST 0x00000004 +class GUI_ID { public: GUI_ID(int id) : id(id) {} int id; }; + class FGDialog; diff --git a/src/GUI/property_list.cxx b/src/GUI/property_list.cxx index a1f59624e..ba25849c8 100644 --- a/src/GUI/property_list.cxx +++ b/src/GUI/property_list.cxx @@ -80,6 +80,7 @@ static string getValueTypeString(const SGPropertyNode *node) PropertyList::PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *start) : puList(minx, miny, maxx, maxy, short(0), 20), + GUI_ID(FGCLASS_PROPERTYLIST), _curr(start), _flags(fgGetNode("/sim/gui/dialogs/property-browser/show-flags", true)), _return(0), diff --git a/src/GUI/property_list.hxx b/src/GUI/property_list.hxx index 7d0792eda..0b91154d9 100644 --- a/src/GUI/property_list.hxx +++ b/src/GUI/property_list.hxx @@ -26,11 +26,11 @@ #include #include +#include "dialog.hxx" #include "puList.hxx" - -class PropertyList : public puList, public SGPropertyChangeListener { +class PropertyList : public puList, public SGPropertyChangeListener, public GUI_ID { public: PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *); ~PropertyList(); -- 2.39.5