This class is used by wxDataViewCtrl to render the individual cells. One instance of a renderer class is owned by wxDataViewColumn. There is a number of ready-to-use renderers provided: wxDataViewTextRenderer, wxDataViewToggleRenderer, wxDataViewProgressRenderer, wxDataViewBitmapRenderer, wxDataViewDateRenderer.
Additionally, the user can write own renderers by deriving from wxDataViewCustomRenderer.
These flags control the behaviour of the renderer and they are used for controlling in what mode the renderer shall render its contents:
enum wxDataViewCellMode
{
wxDATAVIEW_CELL_INERT,
wxDATAVIEW_CELL_ACTIVATABLE,
wxDATAVIEW_CELL_EDITABLE
};
enum wxDataViewCellRenderState
{
wxDATAVIEW_CELL_SELECTED = 1,
wxDATAVIEW_CELL_PRELIT = 2,
wxDATAVIEW_CELL_INSENSITIVE = 4,
wxDATAVIEW_CELL_FOCUSED = 8
};
Derived from
Include files
<wx/dataview.h>
wxDataViewRenderer::wxDataViewRenderer
wxDataViewRenderer::GetMode
wxDataViewRenderer::GetOwner
wxDataViewRenderer::GetValue
wxDataViewRenderer::GetVariantType
wxDataViewRenderer::SetOwner
wxDataViewRenderer::SetValue
wxDataViewRenderer::Validate
wxDataViewRenderer(const wxString& varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT)
Constructor.
virtual wxDataViewCellMode GetMode()
Returns the cell mode.
virtual wxDataViewColumn* GetOwner()
Returns pointer to the owning wxDataViewColumn.
virtual bool GetValue(wxVariant& value)
This methods retrieves the value from the renderer in order to transfer the value back to the data model. Returns false on failure.
virtual wxString GetVariantType()
Returns a string with the type of the wxVariant supported by this renderer.
virtual void SetOwner(wxDataViewColumn* owner)
Sets the owning wxDataViewColumn. This is usually called from within wxDataViewColumn.
virtual bool SetValue(const wxVariant& value)
Set the value of the renderer (and thus its cell) to value. The internal code will then render this cell with this data.
virtual bool Validate(wxVariant& value)
To be implemented.