1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_cald.cpp
3 // Purpose: XRC resource for wxCalendarCtrl
6 // Copyright: (c) 2000 Brian Gavin
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_CALENDARCTRL
19 #include "wx/xrc/xh_cald.h"
25 #include "wx/calctrl.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler
, wxXmlResourceHandler
)
29 wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
30 : wxXmlResourceHandler()
32 XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST
);
33 XRC_ADD_STYLE(wxCAL_MONDAY_FIRST
);
34 XRC_ADD_STYLE(wxCAL_SHOW_HOLIDAYS
);
35 XRC_ADD_STYLE(wxCAL_NO_YEAR_CHANGE
);
36 XRC_ADD_STYLE(wxCAL_NO_MONTH_CHANGE
);
37 XRC_ADD_STYLE(wxCAL_SEQUENTIAL_MONTH_SELECTION
);
38 XRC_ADD_STYLE(wxCAL_SHOW_SURROUNDING_WEEKS
);
44 wxObject
*wxCalendarCtrlXmlHandler::DoCreateResource()
46 XRC_MAKE_INSTANCE(calendar
, wxCalendarCtrl
);
48 calendar
->Create(m_parentAsWindow
,
51 /*TODO: take it from resource*/
52 GetPosition(), GetSize(),
56 SetupWindow(calendar
);
61 bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
63 return IsOfClass(node
, wxT("wxCalendarCtrl"));
66 #endif // wxUSE_XRC && wxUSE_CALENDARCTRL