- wxDataViewColumn( const wxString &title, wxDataViewRenderer *renderer,
- unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *renderer,
- unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
- wxAlignment align = wxALIGN_CENTER,
- int flags = wxDATAVIEW_COL_RESIZABLE );
-
- // override some methods to notify the owner about changes
- virtual void SetFlags(int flags);
- virtual void SetWidth(int width);
- virtual void SetSortOrder(bool ascending);
-
- // override this one to return our default width for columns whose width
- // was not explicitly set
- virtual int GetWidth() const;
+ wxDataViewColumn(const wxString& title,
+ wxDataViewRenderer *renderer,
+ unsigned int model_column,
+ int width = wxDVC_DEFAULT_WIDTH,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE)
+ : wxDataViewColumnBase(renderer, model_column),
+ m_title(title)
+ {
+ Init(width, align, flags);
+ }
+
+ wxDataViewColumn(const wxBitmap& bitmap,
+ wxDataViewRenderer *renderer,
+ unsigned int model_column,
+ int width = wxDVC_DEFAULT_WIDTH,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxDATAVIEW_COL_RESIZABLE)
+ : wxDataViewColumnBase(bitmap, renderer, model_column)
+ {
+ Init(width, align, flags);
+ }
+
+ // implement wxHeaderColumnBase methods
+ virtual void SetTitle(const wxString& title) { m_title = title; }
+ virtual wxString GetTitle() const { return m_title; }
+
+ virtual void SetWidth(int width) { m_width = width; }
+ virtual int GetWidth() const { return m_width; }
+
+ virtual void SetMinWidth(int minWidth) { m_minWidth = minWidth; }
+ virtual int GetMinWidth() const { return m_minWidth; }
+
+ virtual void SetAlignment(wxAlignment align) { m_align = align; }
+ virtual wxAlignment GetAlignment() const { return m_align; }
+
+ virtual void SetFlags(int flags) { m_flags = flags; }
+ virtual int GetFlags() const { return m_flags; }
+
+ virtual void SetAsSortKey(bool sort = true) { m_sort = sort; }
+ virtual bool IsSortKey() const { return m_sort; }
+
+ virtual void SetSortOrder(bool ascending) { m_sortAscending = ascending; }
+ virtual bool IsSortOrderAscending() const { return m_sortAscending; }