]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/xml/xh_cald.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XML resource for wxCalendarCtrl
7 // Copyright: (c) 2000 Brian Gavin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_cald.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #include "wx/xml/xh_cald.h"
23 #include "wx/calctrl.h"
26 wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
27 : wxXmlResourceHandler()
29 ADD_STYLE(wxCAL_SUNDAY_FIRST
);
30 ADD_STYLE(wxCAL_MONDAY_FIRST
);
31 ADD_STYLE(wxCAL_SHOW_HOLIDAYS
);
32 ADD_STYLE(wxCAL_NO_YEAR_CHANGE
);
33 ADD_STYLE(wxCAL_NO_MONTH_CHANGE
);
38 wxObject
*wxCalendarCtrlXmlHandler::DoCreateResource()
40 wxCalendarCtrl
*calendar
= new wxCalendarCtrl(m_ParentAsWindow
,
43 /*TODO: take it from resource*/
44 GetPosition(), GetSize(),
48 SetupWindow(calendar
);
55 bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, _T("wxCalendarCtrl"));