add wxDataViewIconTextRenderer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-08-29 11:48:12 +00:00
parent 8935265382
commit c9c13e7043
3 changed files with 107 additions and 2 deletions

View File

@@ -180,6 +180,35 @@ protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
};
// ---------------------------------------------------------
// wxDataViewIconTextRenderer
// ---------------------------------------------------------
class wxDataViewIconTextRenderer: public wxDataViewCustomRenderer
{
public:
wxDataViewIconTextRenderer( const wxString &varianttype = wxT("wxDataViewIconText"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int align = wxDVR_DEFAULT_ALIGNMENT );
virtual ~wxDataViewIconTextRenderer();
bool SetValue( const wxVariant &value );
bool GetValue( wxVariant &value ) const;
virtual bool Render( wxRect cell, wxDC *dc, int state );
virtual wxSize GetSize() const;
virtual bool HasEditorCtrl() { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
private:
wxDataViewIconText m_value;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer)
};
// ---------------------------------------------------------
// wxDataViewDateRenderer
// ---------------------------------------------------------