+class wxHeaderColumnSimple : public wxHeaderColumnBase
+{
+public:
+ // ctors and dtor
+ wxHeaderColumnSimple(const wxString& title,
+ int width = wxCOL_WIDTH_DEFAULT,
+ wxAlignment align = wxALIGN_NOT,
+ int flags = wxCOL_DEFAULT_FLAGS)
+ : m_title(title),
+ m_width(width),
+ m_align(align),
+ m_flags(flags)
+ {
+ Init();
+ }
+
+ wxHeaderColumnSimple(const wxBitmap& bitmap,
+ int width = wxCOL_WIDTH_DEFAULT,
+ wxAlignment align = wxALIGN_CENTER,
+ int flags = wxCOL_DEFAULT_FLAGS)
+ : m_bitmap(bitmap),
+ m_width(width),
+ m_align(align),
+ m_flags(flags)
+ {
+ Init();
+ }
+
+ // implement base class pure virtuals
+ virtual void SetTitle(const wxString& title) { m_title = title; }
+ virtual wxString GetTitle() const { return m_title; }
+
+ virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
+ wxBitmap GetBitmap() const { return m_bitmap; }
+
+ 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; }
+
+private:
+ // common part of all ctors
+ void Init()
+ {
+ m_minWidth = 0;
+ m_sort = false;
+ m_sortAscending = true;
+ }
+
+ wxString m_title;
+ wxBitmap m_bitmap;
+ int m_width,
+ m_minWidth;
+ wxAlignment m_align;
+ int m_flags;
+ bool m_sort,
+ m_sortAscending;
+};