In the generic version of wxDataViewCtrl, all

cells are custom cells (nothing native).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-03-22 10:01:57 +00:00
parent bbc8b0ee18
commit 3d9d7cc4f7
2 changed files with 107 additions and 87 deletions

View File

@@ -32,57 +32,8 @@ class wxDataViewCell: public wxDataViewCellBase
{
public:
wxDataViewCell( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
~wxDataViewCell();
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCell)
};
// ---------------------------------------------------------
// wxDataViewTextCell
// ---------------------------------------------------------
class wxDataViewTextCell: public wxDataViewCell
{
public:
wxDataViewTextCell( const wxString &varianttype = wxT("string"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
bool SetValue( const wxVariant &value );
bool GetValue( wxVariant &value );
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextCell)
};
// ---------------------------------------------------------
// wxDataViewToggleCell
// ---------------------------------------------------------
class wxDataViewToggleCell: public wxDataViewCell
{
public:
wxDataViewToggleCell( const wxString &varianttype = wxT("bool"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
bool SetValue( const wxVariant &value );
bool GetValue( wxVariant &value );
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleCell)
};
// ---------------------------------------------------------
// wxDataViewCustomCell
// ---------------------------------------------------------
class wxDataViewCustomCell: public wxDataViewCell
{
public:
wxDataViewCustomCell( const wxString &varianttype = wxT("string"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
~wxDataViewCustomCell();
bool Init();
virtual bool Render( wxRect cell, wxDC *dc, int state ) = 0;
virtual wxSize GetSize() = 0;
@@ -106,10 +57,64 @@ public:
private:
wxDC *m_dc;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCell)
};
// ---------------------------------------------------------
// wxDataViewCustomCell
// ---------------------------------------------------------
class wxDataViewCustomCell: public wxDataViewCell
{
public:
wxDataViewCustomCell( const wxString &varianttype = wxT("string"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomCell)
};
// ---------------------------------------------------------
// wxDataViewTextCell
// ---------------------------------------------------------
class wxDataViewTextCell: public wxDataViewCustomCell
{
public:
wxDataViewTextCell( const wxString &varianttype = wxT("string"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
bool SetValue( const wxVariant &value );
bool GetValue( wxVariant &value );
bool Render( wxRect cell, wxDC *dc, int state );
wxSize GetSize();
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextCell)
};
// ---------------------------------------------------------
// wxDataViewToggleCell
// ---------------------------------------------------------
class wxDataViewToggleCell: public wxDataViewCustomCell
{
public:
wxDataViewToggleCell( const wxString &varianttype = wxT("bool"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
bool SetValue( const wxVariant &value );
bool GetValue( wxVariant &value );
bool Render( wxRect cell, wxDC *dc, int state );
wxSize GetSize();
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleCell)
};
// ---------------------------------------------------------
// wxDataViewProgressCell
// ---------------------------------------------------------
@@ -217,6 +222,7 @@ public:
private:
friend class wxDataViewMainWindow;
friend class wxDataViewHeaderWindow;
wxDataViewListModelNotifier *m_notifier;
wxDataViewMainWindow *m_clientArea;
wxDataViewHeaderWindow *m_headerArea;