Added wxDataViewProgressCell with native code

for GTK 2.6 and fallbacks otherwise.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-02-25 13:13:05 +00:00
parent 8045736e4d
commit ad63bf413b
5 changed files with 143 additions and 7 deletions

View File

@@ -83,8 +83,10 @@ class wxDataViewCustomCell: public wxDataViewCell
{
public:
wxDataViewCustomCell( const wxString &varianttype = wxT("string"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
bool no_init = false );
~wxDataViewCustomCell();
bool Init();
virtual bool Render( wxRect cell, wxDC *dc, int state ) = 0;
virtual wxSize GetSize() = 0;
@@ -99,6 +101,31 @@ protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomCell)
};
// ---------------------------------------------------------
// wxDataViewProgressCell
// ---------------------------------------------------------
class wxDataViewProgressCell: public wxDataViewCustomCell
{
public:
wxDataViewProgressCell( const wxString &label = wxEmptyString,
const wxString &varianttype = wxT("long"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
~wxDataViewProgressCell();
bool SetValue( const wxVariant &value );
virtual bool Render( wxRect cell, wxDC *dc, int state );
virtual wxSize GetSize();
private:
wxString m_label;
int m_value;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressCell)
};
// ---------------------------------------------------------
// wxDataViewColumn
// ---------------------------------------------------------