1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_cald.cpp
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"
26 #include "wx/calctrl.h"
28 IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler
, wxXmlResourceHandler
)
30 wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
31 : wxXmlResourceHandler()
33 XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST
);
34 XRC_ADD_STYLE(wxCAL_MONDAY_FIRST
);
35 XRC_ADD_STYLE(wxCAL_SHOW_HOLIDAYS
);
36 XRC_ADD_STYLE(wxCAL_NO_YEAR_CHANGE
);
37 XRC_ADD_STYLE(wxCAL_NO_MONTH_CHANGE
);
38 XRC_ADD_STYLE(wxCAL_SEQUENTIAL_MONTH_SELECTION
);
39 XRC_ADD_STYLE(wxCAL_SHOW_SURROUNDING_WEEKS
);
45 wxObject
*wxCalendarCtrlXmlHandler::DoCreateResource()
47 XRC_MAKE_INSTANCE(calendar
, wxCalendarCtrl
);
49 calendar
->Create(m_parentAsWindow
,
52 /*TODO: take it from resource*/
53 GetPosition(), GetSize(),
57 SetupWindow(calendar
);
62 bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
64 return IsOfClass(node
, wxT("wxCalendarCtrl"));
67 #endif // wxUSE_XRC && wxUSE_CALENDARCTRL