1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC resource for wxCalendarCtrl
7 // Copyright: (c) 2000 Brian Gavin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_CALENDARCTRL
20 #include "wx/xrc/xh_cald.h"
22 #include "wx/calctrl.h"
24 IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler
, wxXmlResourceHandler
)
26 wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
27 : wxXmlResourceHandler()
29 XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST
);
30 XRC_ADD_STYLE(wxCAL_MONDAY_FIRST
);
31 XRC_ADD_STYLE(wxCAL_SHOW_HOLIDAYS
);
32 XRC_ADD_STYLE(wxCAL_NO_YEAR_CHANGE
);
33 XRC_ADD_STYLE(wxCAL_NO_MONTH_CHANGE
);
34 XRC_ADD_STYLE(wxCAL_SEQUENTIAL_MONTH_SELECTION
);
35 XRC_ADD_STYLE(wxCAL_SHOW_SURROUNDING_WEEKS
);
41 wxObject
*wxCalendarCtrlXmlHandler::DoCreateResource()
43 XRC_MAKE_INSTANCE(calendar
, wxCalendarCtrl
);
45 calendar
->Create(m_parentAsWindow
,
48 /*TODO: take it from resource*/
49 GetPosition(), GetSize(),
53 SetupWindow(calendar
);
58 bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
60 return IsOfClass(node
, wxT("wxCalendarCtrl"));
63 #endif // wxUSE_XRC && wxUSE_CALENDARCTRL