1
#ifndef CUSTOMEDITORPROPERTY_H
2
#define CUSTOMEDITORPROPERTY_H
5
#include "wxsproperty.h"
7
/** \brief Class which may be used to create properties with custom editor */
8
class wxsCustomEditorProperty : public wxsProperty
12
/** \brief Ctor with different names */
13
wxsCustomEditorProperty(const wxString& PGName,const wxString& DataName,int Priority=100):
14
wxsProperty(PGName,DataName,Priority) {}
16
/** \brief Function opening property editor
18
* This function should open editor (in modal) for this property
20
* \return true - property value has changed,
21
* false - property has not changed
23
virtual bool ShowEditor(wxsPropertyContainer* Object) =0;
27
/** \brief Function giving string representation of property */
28
virtual wxString GetStr(wxsPropertyContainer* Object) { return _("Click to edit"); }
30
/** \brief Function parsing string representation of property
32
* After parsing, data should be stored in Object
33
* \return true - parsing done, false - parsing error
35
virtual bool ParseStr(wxsPropertyContainer* Object,wxString Value) { return false; }
37
/** \brief Checkig if this property is able to parse string */
38
virtual bool CanParseStr() { return false; }
42
virtual void PGCreate(wxsPropertyContainer* Object,wxPropertyGridManager* Grid,wxPGId Parent);
43
virtual bool PGRead(wxsPropertyContainer* Object,wxPropertyGridManager* Grid, wxPGId Id,long Index);
44
virtual bool PGWrite(wxsPropertyContainer* Object,wxPropertyGridManager* Grid, wxPGId Id,long Index);