X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30dc34551bc893d879bb5e3a6969354066445fc9..d642db66a5efc82d374b813022c72ba88bc50839:/include/wx/xrc/xh_listc.h diff --git a/include/wx/xrc/xh_listc.h b/include/wx/xrc/xh_listc.h index 151dc9c6c9..ecb38b6761 100644 --- a/include/wx/xrc/xh_listc.h +++ b/include/wx/xrc/xh_listc.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_listc.h -// Purpose: XML resource handler for wxCalendarCtrl +// Name: wx/xrc/xh_listc.h +// Purpose: XML resource handler for wxListCtrl // Author: Brian Gavin // Created: 2000/09/09 // RCS-ID: $Id$ @@ -11,20 +11,36 @@ #ifndef _WX_XH_LISTC_H_ #define _WX_XH_LISTC_H_ -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "xh_listc.h" -#endif - #include "wx/xrc/xmlres.h" +#if wxUSE_XRC && wxUSE_LISTCTRL + +class WXDLLIMPEXP_FWD_CORE wxListCtrl; +class WXDLLIMPEXP_FWD_CORE wxListItem; + class WXDLLIMPEXP_XRC wxListCtrlXmlHandler : public wxXmlResourceHandler { -DECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler) public: wxListCtrlXmlHandler(); virtual wxObject *DoCreateResource(); virtual bool CanHandle(wxXmlNode *node); + +private: + // handlers for wxListCtrl itself and its listcol and listitem children + wxListCtrl *HandleListCtrl(); + void HandleListCol(); + void HandleListItem(); + + // common part to HandleList{Col,Item}() + void HandleCommonItemAttrs(wxListItem& item); + + // gets the items image index in the corresponding image list (normal if + // which is wxIMAGE_LIST_NORMAL or small if it is wxIMAGE_LIST_SMALL) + long GetImageIndex(wxListCtrl *listctrl, int which); + + DECLARE_DYNAMIC_CLASS(wxListCtrlXmlHandler) }; +#endif // wxUSE_XRC && wxUSE_LISTCTRL #endif // _WX_XH_LISTC_H_