wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int align = wxDVR_DEFAULT_ALIGNMENT );
- // implementation
- GtkCellRenderer* GetGtkHandle() { return m_renderer; }
-
virtual void SetMode( wxDataViewCellMode mode );
virtual wxDataViewCellMode GetMode() const;
virtual void SetAlignment( int align );
virtual int GetAlignment() const;
+ // implementation
+ GtkCellRenderer* GetGtkHandle() { return m_renderer; }
+ void GtkInitHandlers();
+
protected:
GtkCellRenderer *m_renderer;
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
// ---------------------------------------------------------
// implementation
GtkWidget* GetGtkHandle() { return m_column; }
+ GtkWidget* GetConstGtkHandle() const { return m_column; }
private:
// holds the GTK handle
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumn)
};
+WX_DECLARE_LIST(wxDataViewColumn, wxDataViewColumnList );
+
// ---------------------------------------------------------
// wxDataViewCtrl
// ---------------------------------------------------------
const wxValidator& validator = wxDefaultValidator );
virtual bool AssociateModel( wxDataViewModel *model );
+
virtual bool AppendColumn( wxDataViewColumn *col );
+ virtual unsigned int GetColumnCount() const;
+ virtual wxDataViewColumn* GetColumn( unsigned int pos ) const;
+ virtual bool DeleteColumn( wxDataViewColumn *column );
+ virtual bool ClearColumns();
+ virtual int GetColumnPosition( const wxDataViewColumn *column ) const;
+
+ virtual wxDataViewColumn *GetSortingColumn() const;
virtual wxDataViewItem GetSelection() const;
virtual int GetSelections( wxDataViewItemArray & sel ) const;
const wxDataViewColumn *column = NULL );
virtual void HitTest( const wxPoint &point,
wxDataViewItem &item,
- wxDataViewColumn *column ) const;
+ wxDataViewColumn *&column ) const;
virtual wxRect GetItemRect( const wxDataViewItem &item,
const wxDataViewColumn *column = NULL ) const;
+ virtual void Expand( const wxDataViewItem & item );
+ virtual void Collapse( const wxDataViewItem & item );
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
GtkWidget *m_treeview;
wxDataViewModelNotifier *m_notifier;
wxDataViewCtrlInternal *m_internal;
+ wxDataViewColumnList m_cols;
virtual void OnInternalIdle();