1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/headercolg.h
3 // Purpose: Generic wxHeaderColumn implementation
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GENERIC_HEADERCOLG_H_
12 #define _WX_GENERIC_HEADERCOLG_H_
14 // ----------------------------------------------------------------------------
15 // wxHeaderColumn: trivial generic implementation of wxHeaderColumnBase
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxHeaderColumn
: public wxHeaderColumnBase
22 wxHeaderColumn(const wxString
& title
,
23 int width
= wxCOL_WIDTH_DEFAULT
,
24 wxAlignment align
= wxALIGN_NOT
,
25 int flags
= wxCOL_DEFAULT_FLAGS
)
34 wxHeaderColumn(const wxBitmap
& bitmap
,
35 int width
= wxCOL_WIDTH_DEFAULT
,
36 wxAlignment align
= wxALIGN_CENTER
,
37 int flags
= wxCOL_DEFAULT_FLAGS
)
46 // implement base class pure virtuals
47 virtual void SetTitle(const wxString
& title
) { m_title
= title
; }
48 virtual wxString
GetTitle() const { return m_title
; }
50 virtual void SetBitmap(const wxBitmap
& bitmap
) { m_bitmap
= bitmap
; }
51 wxBitmap
GetBitmap() const { return m_bitmap
; }
53 virtual void SetWidth(int width
) { m_width
= width
; }
54 virtual int GetWidth() const { return m_width
; }
56 virtual void SetMinWidth(int minWidth
) { m_minWidth
= minWidth
; }
57 virtual int GetMinWidth() const { return m_minWidth
; }
59 virtual void SetAlignment(wxAlignment align
) { m_align
= align
; }
60 virtual wxAlignment
GetAlignment() const { return m_align
; }
62 virtual void SetFlags(int flags
) { m_flags
= flags
; }
63 virtual int GetFlags() const { return m_flags
; }
65 virtual void SetSortOrder(bool ascending
) { m_sortAscending
= ascending
; }
66 virtual bool IsSortOrderAscending() const { return m_sortAscending
; }
69 // common part of all ctors
73 m_sortAscending
= true;
84 #endif // _WX_GENERIC_HEADERCOLG_H_