// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKDATAVIEWCTRLH__
-#define __GTKDATAVIEWCTRLH__
+#ifndef _WX_GTKDATAVIEWCTRL_H_
+#define _WX_GTKDATAVIEWCTRL_H_
-#include "wx/defs.h"
-#include "wx/object.h"
#include "wx/list.h"
-#include "wx/control.h"
// ---------------------------------------------------------
// classes
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; }
virtual void SetMinWidth( int minWidth );
virtual void SetWidth( int width );
+ virtual void SetReorderable( bool reorderable );
// getters:
virtual int GetWidth() const;
virtual int GetMinWidth() const;
+
+ virtual bool IsReorderable() const;
// implementation
GtkWidget* GetGtkHandle() { return m_column; }
// 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 );
GtkWidget *GtkGetTreeView() { return m_treeview; }
wxDataViewCtrlInternal* GtkGetInternal() { return m_internal; }
+ virtual void OnInternalIdle();
+
protected:
virtual void DoSetExpanderColumn();
virtual void DoSetIndent();
friend class wxDataViewCtrlDCImpl;
friend class wxDataViewColumn;
friend class wxGtkDataViewModelNotifier;
+ friend class wxDataViewCtrlInternal;
+
GtkWidget *m_treeview;
wxDataViewModelNotifier *m_notifier;
wxDataViewCtrlInternal *m_internal;
wxDataViewColumnList m_cols;
-
- virtual void OnInternalIdle();
-
void GtkEnableSelectionEvents();
void GtkDisableSelectionEvents();
-private:
DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
DECLARE_NO_COPY_CLASS(wxDataViewCtrl)
};
-#endif // __GTKDATAVIEWCTRLH__
+#endif // _WX_GTKDATAVIEWCTRL_H_