#ifndef _PROPERTY_LIST_HXX
#define _PROPERTY_LIST_HXX
+#include <string>
-#include <plib/pu.h>
+#include <plib/puAux.h>
#include <simgear/props/props.hxx>
#include "dialog.hxx"
-#include "puList.hxx"
-class PropertyList : public puList, public SGPropertyChangeListener, public GUI_ID {
+class PropertyList : public puaList, public SGPropertyChangeListener, public GUI_ID {
public:
PropertyList(int minx, int miny, int maxx, int maxy, SGPropertyNode *);
~PropertyList();
void toggleVerbosity() { _verbose = !_verbose; }
// overridden plib pui methods
- virtual char *getListStringValue() { return (char *)(_return ? _return->getPath(true) : ""); }
- //virtual char *getStringValue(void) { return (char *)(_return ? _return->getPath(true) : ""); }
+ virtual char *getStringValue(void)
+ {
+ _return_path.clear();
+ if (_return)
+ _return_path = _return->getPath(true);
+ return const_cast<char*>(_return_path.c_str());
+ }
+ //virtual char *getListStringValue() { return (char *)(_return ? _return->getPath(true) : ""); }
virtual void setValue(const char *);
// listener method
bool _dot_files; // . and .. pseudo-dirs currently shown?
bool _verbose; // show SGPropertyNode flags
+ std::string _return_path;
};