#include <propdev.h>
Public Member Functions | |
virtual bool | CanContainCustomImage () const |
virtual bool | CopyValueFromControl (wxPGProperty *property, wxWindow *ctrl) const=0 |
virtual wxWindow * | CreateControls (wxPropertyGrid *propgrid, wxPGProperty *property, const wxPoint &pos, const wxSize &sz, wxWindow **psecondary) const =0 |
virtual void | DeleteItem (wxWindow *ctrl, int index) const |
virtual void | DrawValue (wxDC &dc, wxPGProperty *property, const wxRect &rect) const |
virtual wxPG_CONST_WXCHAR_PTR | GetName () const=0 |
virtual int | InsertItem (wxWindow *ctrl, const wxString &label, int index) const |
virtual bool | OnEvent (wxPropertyGrid *propgrid, wxPGProperty *property, wxWindow *wnd_primary, wxEvent &event) const=0 |
virtual void | OnFocus (wxPGProperty *property, wxWindow *wnd) const |
virtual void | SetControlIntValue (wxWindow *ctrl, int value) const |
virtual void | SetControlStringValue (wxWindow *ctrl, const wxString &txt) const |
virtual void | SetValueToUnspecified (wxWindow *ctrl) const =0 |
virtual void | UpdateControl (wxPGProperty *property, wxWindow *ctrl) const=0 |
wxPGEditor () | |
virtual | ~wxPGEditor () |
// Relays wxEVT_COMMAND_TEXT_UPDATED events of primary editor // control to the OnEvent. // NOTE: This event in particular is actually automatically conveyed, but // it is just used as an example. propgrid->Connect( wxPG_SUBID1, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) &wxPropertyGrid::OnCustomEditorEvent );
wxPGEditor::wxPGEditor | ( | ) | [inline] |
Constructor.
virtual wxPGEditor::~wxPGEditor | ( | ) | [virtual] |
Destructor.
virtual bool wxPGEditor::CanContainCustomImage | ( | ) | const [virtual] |
Returns true if control itself can contain the custom image.
Default is to return false.
virtual bool wxPGEditor::CopyValueFromControl | ( | wxPGProperty * | property, | |
wxWindow * | ctrl | |||
) | const [pure virtual] |
Copies value from ctrl to property's internal storage.
Returns true if value was different.
virtual wxWindow* wxPGEditor::CreateControls | ( | wxPropertyGrid * | propgrid, | |
wxPGProperty * | property, | |||
const wxPoint & | pos, | |||
const wxSize & | sz, | |||
wxWindow ** | psecondary | |||
) | const [pure virtual] |
Instantiates editor controls.
propgrid | wxPropertyGrid to which the property belongs (use as parent for control). | |
propert | Property for which this method is called. | |
pos | Position, inside wxPropertyGrid, to create control(s) to. | |
size | Initial size for control(s). | |
psecondary | If method generates a secondary (button) control, pointer to it must be stored here. |
virtual void wxPGEditor::DeleteItem | ( | wxWindow * | ctrl, | |
int | index | |||
) | const [virtual] |
Deletes item from existing control.
Default implementation does nothing.
virtual void wxPGEditor::DrawValue | ( | wxDC & | dc, | |
wxPGProperty * | property, | |||
const wxRect & | rect | |||
) | const [virtual] |
Used to draw the value when control is hidden.
Default is to draw a string. Note that some margin above and below has been taken into account, to make drawing text easier without giving loads parameters. If Pen is changed, it must be returned to *wxTRANSPARENT_PEN.
virtual wxPG_CONST_WXCHAR_PTR wxPGEditor::GetName | ( | ) | const [pure virtual] |
Returns pointer to the name of the editor.
For example, wxPG_EDITOR(TextCtrl) has name "TextCtrl". This method is autogenerated for custom editors.
virtual int wxPGEditor::InsertItem | ( | wxWindow * | ctrl, | |
const wxString & | label, | |||
int | index | |||
) | const [virtual] |
Inserts item to existing control.
Index -1 means appending. Default implementation does nothing. Returns index of item added.
virtual bool wxPGEditor::OnEvent | ( | wxPropertyGrid * | propgrid, | |
wxPGProperty * | property, | |||
wxWindow * | wnd_primary, | |||
wxEvent & | event | |||
) | const [pure virtual] |
Handles events.
Returns true if value in control was modified (see wxPGProperty::OnEvent for more information).
virtual void wxPGEditor::OnFocus | ( | wxPGProperty * | property, | |
wxWindow * | wnd | |||
) | const [virtual] |
Extra processing when control gains focus.
For example, wxTextCtrl based controls should select all text.
virtual void wxPGEditor::SetControlIntValue | ( | wxWindow * | ctrl, | |
int | value | |||
) | const [virtual] |
Sets control's value specifically from int (applies to choice etc.
).
virtual void wxPGEditor::SetControlStringValue | ( | wxWindow * | ctrl, | |
const wxString & | txt | |||
) | const [virtual] |
Sets control's value specifically from string.
virtual void wxPGEditor::SetValueToUnspecified | ( | wxWindow * | ctrl | ) | const [pure virtual] |
Sets value in control to unspecified.
virtual void wxPGEditor::UpdateControl | ( | wxPGProperty * | property, | |
wxWindow * | ctrl | |||
) | const [pure virtual] |
Loads value from property to the control.