class WXDLLIMPEXP_FWD_ADV wxDataViewCtrlInternal;
+struct _GtkTreePath;
+
// ---------------------------------------------------------
// wxDataViewColumn
// ---------------------------------------------------------
virtual void SetSortOrder( bool ascending );
virtual void SetAsSortKey(bool sort = true);
- virtual void SetResizeable( bool resizeable );
+ virtual void SetResizeable( bool resizable );
virtual void SetHidden( bool hidden );
virtual void SetMinWidth( int minWidth );
virtual int GetFlags() const { return GetFromIndividualFlags(); }
// implementation
- GtkWidget* GetGtkHandle() { return m_column; }
- GtkWidget* GetConstGtkHandle() const { return m_column; }
+ GtkWidget* GetGtkHandle() const { return m_column; }
private:
// holds the GTK handle
wxDataViewCtrl( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
- const wxValidator& validator = wxDefaultValidator )
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDataViewCtrlNameStr )
{
Init();
- Create(parent, id, pos, size, style, validator );
+ Create(parent, id, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
- const wxValidator& validator = wxDefaultValidator );
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxDataViewCtrlNameStr);
virtual ~wxDataViewCtrl();
GtkWidget *GtkGetTreeView() { return m_treeview; }
wxDataViewCtrlInternal* GtkGetInternal() { return m_internal; }
+ // Convert GTK path to our item. Returned item may be invalid if get_iter()
+ // failed.
+ wxDataViewItem GTKPathToItem(struct _GtkTreePath *path) const;
+
virtual void OnInternalIdle();
protected:
private:
void Init();
+ virtual wxDataViewItem DoGetCurrentItem() const;
+ virtual void DoSetCurrentItem(const wxDataViewItem& item);
+
+ // Return wxDataViewColumn matching the given GtkTreeViewColumn.
+ //
+ // If the input argument is NULL, return NULL too. Otherwise we must find
+ // the matching column and assert if we didn't.
+ wxDataViewColumn* FromGTKColumn(GtkTreeViewColumn *gtk_col) const;
+
friend class wxDataViewCtrlDCImpl;
friend class wxDataViewColumn;
- friend class wxGtkDataViewModelNotifier;
friend class wxDataViewCtrlInternal;
GtkWidget *m_treeview;
- wxDataViewModelNotifier *m_notifier;
wxDataViewCtrlInternal *m_internal;
wxDataViewColumnList m_cols;
+ wxDataViewItem m_ensureVisibleDefered;
virtual void AddChildGTK(wxWindowGTK* child);
void GtkEnableSelectionEvents();