- move the ID stuff to dialog.hxx
- add an identifier to fgPropertyList(), which is also PUCLASS_LIST based
This commit is contained in:
parent
9ff339332c
commit
e2c195f3a6
5 changed files with 14 additions and 11 deletions
|
@ -7,16 +7,9 @@
|
|||
#include STL_STRING
|
||||
|
||||
#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);
|
||||
|
||||
class FGAirportList;
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
#include "property_list.hxx"
|
||||
#include "layout.hxx"
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Implementation of GUIInfo.
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -20,7 +20,13 @@
|
|||
#include <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;
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -26,11 +26,11 @@
|
|||
|
||||
#include <plib/pu.h>
|
||||
#include <simgear/props/props.hxx>
|
||||
#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();
|
||||
|
|
Loading…
Reference in a new issue