-//
-// constructors / destructor
-//
- wxDataViewColumn(wxString const& title, wxDataViewRenderer* renderer, unsigned int model_column, int width=80, wxAlignment align=wxALIGN_CENTER,
- int flags=wxDATAVIEW_COL_RESIZABLE);
- wxDataViewColumn(wxBitmap const& bitmap, wxDataViewRenderer* renderer, unsigned int model_column, int width=80, wxAlignment align=wxALIGN_CENTER,
- int flags=wxDATAVIEW_COL_RESIZABLE);
-
-//
-// inherited methods from wxDataViewColumnBase
-//
- virtual wxAlignment GetAlignment() const
- {
- return this->m_alignment;
- }
- virtual int GetFlags() const
- {
- return this->m_flags;
- }
- virtual int GetMaxWidth() const
- {
- return this->m_maxWidth;
- }
- virtual int GetMinWidth() const
- {
- return this->m_minWidth;
- }
- virtual wxString GetTitle() const
- {
- return this->m_title;
- }
- virtual int GetWidth() const
- {
- return this->m_width;
- }
-
- virtual bool IsHidden() const
- {
- return false; // not implemented
- }
- virtual bool IsSortOrderAscending() const
- {
- return this->m_ascending;
- }
-
- virtual void SetAlignment(wxAlignment align);
- virtual void SetBitmap (wxBitmap const& bitmap);
- virtual void SetFlags (int flags);
- virtual void SetHidden(bool WXUNUSED(hidden))
- {
- }
- virtual void SetMaxWidth (int maxWidth);
- virtual void SetMinWidth (int minWidth);
- virtual void SetReorderable(bool reorderable);
- virtual void SetResizeable (bool resizeable);
- virtual void SetSortable (bool sortable);
- virtual void SetSortOrder (bool ascending);
- virtual void SetTitle (wxString const& title);
- virtual void SetWidth (int width);
-
-//
-// implementation
-//
- WXDataBrowserPropertyID GetPropertyID() const
- {
- return this->m_propertyID;
- }
-
- void SetPropertyID(WXDataBrowserPropertyID newID)
- {
- this->m_propertyID = newID;
- }
- void SetWidthVariable(int NewWidth)
- {
- this->m_width = NewWidth;
- }
+ // constructors / destructor
+ 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 pure virtual methods
+ virtual wxAlignment GetAlignment() const { return m_alignment; }
+ virtual int GetFlags() const { return m_flags; }
+ virtual int GetMaxWidth() const { return m_maxWidth; }
+ virtual int GetMinWidth() const { return m_minWidth; }
+ virtual wxString GetTitle() const { return m_title; }
+ virtual int GetWidth() const { return m_width; }
+ virtual bool IsHidden() const { return false; } // TODO
+ virtual bool IsSortOrderAscending() const { return m_ascending; }
+ virtual bool IsSortKey() const;
+
+ virtual void SetAlignment(wxAlignment align);
+ virtual void SetBitmap (wxBitmap const& bitmap);
+ virtual void SetFlags (int flags) { SetIndividualFlags(flags); }
+ virtual void SetHidden(bool WXUNUSED(hidden)) { } // TODO
+ virtual void SetMaxWidth (int maxWidth);
+ virtual void SetMinWidth (int minWidth);
+ virtual void SetReorderable(bool reorderable);
+ virtual void SetResizeable (bool resizeable);
+ virtual void SetSortable (bool sortable);
+ virtual void SetSortOrder (bool ascending);
+ virtual void SetTitle (wxString const& title);
+ virtual void SetWidth (int width);
+ virtual void SetAsSortKey(bool sort = true);
+
+ // implementation only
+ WXDataBrowserPropertyID GetPropertyID() const
+ {
+ return m_propertyID;
+ }
+
+ void SetPropertyID(WXDataBrowserPropertyID newID)
+ {
+ m_propertyID = newID;
+ }
+ void SetWidthVariable(int NewWidth)
+ {
+ m_width = NewWidth;
+ }