Add wxDataViewTextRendererAttr, blind noop under wxMac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-11-08 22:51:58 +00:00
parent 27242d8503
commit 4264606eed
9 changed files with 290 additions and 73 deletions

View File

@@ -78,11 +78,20 @@ public:
// Create DC on request
virtual wxDC *GetDC();
void SetHasAttr( bool set ) { m_hasAttr = set; }
void SetAttr( const wxDataViewItemAttr &attr ) { m_attr = attr; }
bool GetWantsAttr() { return m_wantsAttr; }
private:
wxDC *m_dc;
int m_align;
wxDataViewCellMode m_mode;
protected:
bool m_wantsAttr;
bool m_hasAttr;
wxDataViewItemAttr m_attr;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer)
@@ -128,13 +137,30 @@ public:
virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value );
virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value );
private:
protected:
wxString m_text;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer)
};
// ---------------------------------------------------------
// wxDataViewTextRendererAttr
// ---------------------------------------------------------
class WXDLLIMPEXP_ADV wxDataViewTextRendererAttr: public wxDataViewTextRenderer
{
public:
wxDataViewTextRendererAttr( const wxString &varianttype = wxT("string"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int align = wxDVR_DEFAULT_ALIGNMENT );
bool Render( wxRect cell, wxDC *dc, int state );
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRendererAttr)
};
// ---------------------------------------------------------
// wxDataViewBitmapRenderer
// ---------------------------------------------------------