Added wxDataViewCustomRenderer::RenderText() for renderer simple text in platform dependent way, added wxDataViewSpinRenderer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-10-20 20:09:10 +00:00
parent 59a722ea3a
commit 52e750fc75
9 changed files with 173 additions and 35 deletions

View File

@@ -713,6 +713,29 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
#include "wx/generic/dataview.h"
#endif
// -------------------------------------
// wxDataViewSpinRenderer
// -------------------------------------
class wxDataViewSpinRenderer: public wxDataViewCustomRenderer
{
public:
wxDataViewSpinRenderer( int min, int max,
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
int alignment = wxDVR_DEFAULT_ALIGNMENT );
virtual bool HasEditorCtrl() { return true; }
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
virtual bool Render( wxRect rect, wxDC *dc, int state );
virtual wxSize GetSize() const;
virtual bool SetValue( const wxVariant &value );
virtual bool GetValue( wxVariant &value ) const;
private:
long m_data;
long m_min,m_max;
};
//-----------------------------------------------------------------------------
// wxDataViewTreeStore
//-----------------------------------------------------------------------------