GtkCellRenderer* GetGtkHandle() { return m_renderer; }
void GtkInitHandlers();
virtual bool GtkHasAttributes() { return false; }
+ void GtkUpdateAlignment();
protected:
GtkCellRenderer *m_renderer;
+ int m_alignment;
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer)
virtual bool LeftClick( wxPoint WXUNUSED(cursor), wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) )
{ return false; }
- virtual bool RightClick( wxPoint WXUNUSED(cursor), wxRect WXUNUSED(cell),
- wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) )
- { return false; }
virtual bool StartDrag( wxPoint WXUNUSED(cursor), wxRect WXUNUSED(cell),
wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) )
{ return false; }
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer)
};
+// -------------------------------------
+// wxDataViewChoiceRenderer
+// -------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewCustomRenderer
+{
+public:
+ wxDataViewChoiceRenderer( const wxArrayString &choices,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
+ int alignment = wxDVR_DEFAULT_ALIGNMENT );
+ 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;
+
+ void SetAlignment( int align );
+private:
+ wxArrayString m_choices;
+ wxString m_data;
+};
+
// ---------------------------------------------------------
// wxDataViewColumn
// ---------------------------------------------------------
// holds the GTK handle
GtkWidget *m_column;
+ // holds GTK handles for title/bitmap in the header
+ GtkWidget *m_image;
+ GtkWidget *m_label;
+
// delayed connection to mouse events
friend class wxDataViewCtrl;
void OnInternalIdle();
virtual bool PrependColumn( wxDataViewColumn *col );
virtual bool AppendColumn( wxDataViewColumn *col );
+ virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
+
virtual unsigned int GetColumnCount() const;
virtual wxDataViewColumn* GetColumn( unsigned int pos ) const;
virtual bool DeleteColumn( wxDataViewColumn *column );
wxDataViewCtrlInternal *m_internal;
wxDataViewColumnList m_cols;
+ virtual void AddChildGTK(wxWindowGTK* child);
void GtkEnableSelectionEvents();
void GtkDisableSelectionEvents();