#define wxPROPERTY_VERSION 2.0
// A storable sheet of values
-class wxPropertySheet: public wxObject
+class WXDLLEXPORT wxPropertySheet: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxPropertySheet)
public:
- wxPropertySheet(void);
+ wxPropertySheet(const wxString& name = "");
~wxPropertySheet(void);
+ // Set the name of the sheet
+ inline virtual void SetName(const wxString& name) { m_name=name; }
+ inline virtual wxString GetName() const { return m_name; }
+ // Does this sheet contain a property with this name
+ virtual bool HasProperty(const wxString& name) const;
+
+ // Set property name to value
+ virtual bool SetProperty(const wxString& name, const wxPropertyValue& value);
+
+ // Remove property from sheet by name, deleting it
+ virtual void RemoveProperty(const wxString& name);
+
+ // Get the name of the sheet
// Add a property
virtual void AddProperty(wxProperty *property);
// Get property by name
- virtual wxProperty *GetProperty(wxString name);
+ virtual wxProperty *GetProperty(const wxString& name) const;
// Clear all properties
virtual void Clear(void);
wxObject* m_viewedObject;
wxList m_properties;
wxPropertyView* m_propertyView;
-
+ wxString m_name;
};
// Base class for property sheet views. There are currently two directly derived
// classes: wxPropertyListView, and wxPropertyFormView.
-class wxPropertyView: public wxEvtHandler
+class WXDLLEXPORT wxPropertyView: public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxPropertyView)
public:
inline virtual void SetPropertySheet(wxPropertySheet *sheet) { m_propertySheet = sheet; }
inline virtual wxPropertySheet *GetPropertySheet(void) const { return m_propertySheet; }
+/*
virtual void OnOk(void) {};
virtual void OnCancel(void) {};
virtual void OnHelp(void) {};
+*/
inline virtual bool OnClose(void) { return FALSE; }
inline long GetFlags(void) { return m_buttonFlags; }
};
-class wxPropertyValidator: public wxEvtHandler
+class WXDLLEXPORT wxPropertyValidator: public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxPropertyValidator)
public:
// extern wxPropertyValidator *wxDefaultPropertyValidator;
-class wxPropertyValidatorRegistry: public wxHashTable
+class WXDLLEXPORT wxPropertyValidatorRegistry: public wxHashTable
{
DECLARE_DYNAMIC_CLASS(wxPropertyValidatorRegistry)
public:
wxPropertyValueStringPtr
} wxPropertyValueType;
-class wxPropertyValue: public wxObject
+class WXDLLEXPORT wxPropertyValue: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxPropertyValue)
* Property class: contains a name and a value.
*/
-class wxProperty: public wxObject
+class WXDLLEXPORT wxProperty: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxProperty)
protected: