1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/headerctrl.h
3 // Purpose: wxMSW native wxHeaderCtrl
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MSW_HEADERCTRL_H_
12 #define _WX_MSW_HEADERCTRL_H_
14 class WXDLLIMPEXP_FWD_CORE wxImageList
;
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxHeaderCtrl
: public wxHeaderCtrlBase
28 wxHeaderCtrl(wxWindow
*parent
,
29 wxWindowID id
= wxID_ANY
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
32 long style
= wxHD_DEFAULT_STYLE
,
33 const wxString
& name
= wxHeaderCtrlNameStr
)
37 Create(parent
, id
, pos
, size
, style
, name
);
40 bool Create(wxWindow
*parent
,
41 wxWindowID id
= wxID_ANY
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 long style
= wxHD_DEFAULT_STYLE
,
45 const wxString
& name
= wxHeaderCtrlNameStr
);
47 virtual ~wxHeaderCtrl();
50 // implement base class pure virtuals
51 virtual unsigned int DoGetCount() const;
52 virtual void DoInsert(const wxHeaderColumn
& col
, unsigned int idx
);
53 virtual void DoDelete(unsigned int idx
);
54 virtual void DoShowSortIndicator(unsigned int idx
, int sortOrder
);
56 // override wxWindow methods which must be implemented by a new control
57 virtual wxSize
DoGetBestSize() const;
59 // override MSW-specific methods needed for new control
60 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
62 // common part of all ctors
65 // the image list: initially NULL, created on demand
66 wxImageList
*m_imageList
;
68 DECLARE_NO_COPY_CLASS(wxHeaderCtrl
)
71 #endif // _WX_MSW_HEADERCTRL_H_