1
0
Fork 0

- move the ID stuff to dialog.hxx

- add an identifier to fgPropertyList(), which is also PUCLASS_LIST based
This commit is contained in:
mfranz 2006-05-22 16:14:50 +00:00
parent 9ff339332c
commit e2c195f3a6
5 changed files with 14 additions and 11 deletions

View file

@ -7,16 +7,9 @@
#include STL_STRING #include STL_STRING
#include <plib/pu.h> #include <plib/pu.h>
#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); SG_USING_STD(string);
class FGAirportList; class FGAirportList;

View file

@ -16,6 +16,9 @@
#include "property_list.hxx" #include "property_list.hxx"
#include "layout.hxx" #include "layout.hxx"
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// Implementation of GUIInfo. // Implementation of GUIInfo.
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////

View file

@ -20,7 +20,13 @@
#include <vector> #include <vector>
SG_USING_STD(vector); 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; class FGDialog;

View file

@ -80,6 +80,7 @@ static string getValueTypeString(const SGPropertyNode *node)
PropertyList::PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *start) : PropertyList::PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *start) :
puList(minx, miny, maxx, maxy, short(0), 20), puList(minx, miny, maxx, maxy, short(0), 20),
GUI_ID(FGCLASS_PROPERTYLIST),
_curr(start), _curr(start),
_flags(fgGetNode("/sim/gui/dialogs/property-browser/show-flags", true)), _flags(fgGetNode("/sim/gui/dialogs/property-browser/show-flags", true)),
_return(0), _return(0),

View file

@ -26,11 +26,11 @@
#include <plib/pu.h> #include <plib/pu.h>
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>
#include "dialog.hxx"
#include "puList.hxx" #include "puList.hxx"
class PropertyList : public puList, public SGPropertyChangeListener, public GUI_ID {
class PropertyList : public puList, public SGPropertyChangeListener {
public: public:
PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *); PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *);
~PropertyList(); ~PropertyList();