1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/xrc/xh_listc.h
3 // Purpose: XML resource handler for wxListCtrl
7 // Copyright: (c) 2000 Brian Gavin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_XH_LISTC_H_
12 #define _WX_XH_LISTC_H_
14 #include "wx/xrc/xmlres.h"
16 #if wxUSE_XRC && wxUSE_LISTCTRL
18 class WXDLLIMPEXP_FWD_CORE wxListCtrl
;
19 class WXDLLIMPEXP_FWD_CORE wxListItem
;
21 class WXDLLIMPEXP_XRC wxListCtrlXmlHandler
: public wxXmlResourceHandler
24 wxListCtrlXmlHandler();
25 virtual wxObject
*DoCreateResource();
26 virtual bool CanHandle(wxXmlNode
*node
);
29 // handlers for wxListCtrl itself and its listcol and listitem children
30 wxListCtrl
*HandleListCtrl();
32 void HandleListItem();
34 // common part to HandleList{Col,Item}()
35 void HandleCommonItemAttrs(wxListItem
& item
);
37 // gets the items image index in the corresponding image list (normal if
38 // which is wxIMAGE_LIST_NORMAL or small if it is wxIMAGE_LIST_SMALL)
39 long GetImageIndex(wxListCtrl
*listctrl
, int which
);
41 DECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler
)
44 #endif // wxUSE_XRC && wxUSE_LISTCTRL
46 #endif // _WX_XH_LISTC_H_