1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/xrc/xh_listc.h
3 // Purpose: XML resource handler for wxListCtrl
6 // Copyright: (c) 2000 Brian Gavin
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_XH_LISTC_H_
11 #define _WX_XH_LISTC_H_
13 #include "wx/xrc/xmlres.h"
15 #if wxUSE_XRC && wxUSE_LISTCTRL
17 class WXDLLIMPEXP_FWD_CORE wxListCtrl
;
18 class WXDLLIMPEXP_FWD_CORE wxListItem
;
20 class WXDLLIMPEXP_XRC wxListCtrlXmlHandler
: public wxXmlResourceHandler
23 wxListCtrlXmlHandler();
24 virtual wxObject
*DoCreateResource();
25 virtual bool CanHandle(wxXmlNode
*node
);
28 // handlers for wxListCtrl itself and its listcol and listitem children
29 wxListCtrl
*HandleListCtrl();
31 void HandleListItem();
33 // common part to HandleList{Col,Item}()
34 void HandleCommonItemAttrs(wxListItem
& item
);
36 // gets the items image index in the corresponding image list (normal if
37 // which is wxIMAGE_LIST_NORMAL or small if it is wxIMAGE_LIST_SMALL)
38 long GetImageIndex(wxListCtrl
*listctrl
, int which
);
40 DECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler
)
43 #endif // wxUSE_XRC && wxUSE_LISTCTRL
45 #endif // _WX_XH_LISTC_H_