]>
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"
22 #include "wx/xrc/xh_cald.h"
24 #include "wx/calctrl.h"
27 wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
28 : wxXmlResourceHandler()
30 ADD_STYLE(wxCAL_SUNDAY_FIRST
);
31 ADD_STYLE(wxCAL_MONDAY_FIRST
);
32 ADD_STYLE(wxCAL_SHOW_HOLIDAYS
);
33 ADD_STYLE(wxCAL_NO_YEAR_CHANGE
);
34 ADD_STYLE(wxCAL_NO_MONTH_CHANGE
);
39 wxObject
*wxCalendarCtrlXmlHandler::DoCreateResource()
41 wxCalendarCtrl
*calendar
= wxStaticCast(m_instance
, wxCalendarCtrl
);
44 calendar
= new wxCalendarCtrl
;
46 calendar
->Create(m_parentAsWindow
,
49 /*TODO: take it from resource*/
50 GetPosition(), GetSize(),
54 SetupWindow(calendar
);
61 bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
63 return IsOfClass(node
, wxT("wxCalendarCtrl"));