]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/xrc/xh_cald.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC 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"
24 #if wxUSE_CALENDARCTRL
26 #include "wx/xrc/xh_cald.h"
28 #include "wx/calctrl.h"
31 wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
32 : wxXmlResourceHandler()
34 XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST
);
35 XRC_ADD_STYLE(wxCAL_MONDAY_FIRST
);
36 XRC_ADD_STYLE(wxCAL_SHOW_HOLIDAYS
);
37 XRC_ADD_STYLE(wxCAL_NO_YEAR_CHANGE
);
38 XRC_ADD_STYLE(wxCAL_NO_MONTH_CHANGE
);
43 wxObject
*wxCalendarCtrlXmlHandler::DoCreateResource()
45 XRC_MAKE_INSTANCE(calendar
, wxCalendarCtrl
);
47 calendar
->Create(m_parentAsWindow
,
50 /*TODO: take it from resource*/
51 GetPosition(), GetSize(),
55 SetupWindow(calendar
);
60 bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
62 return IsOfClass(node
, wxT("wxCalendarCtrl"));