]>
Commit | Line | Data |
---|---|---|
b008b592 VS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: xh_cald.cpp | |
3 | // Purpose: XML resource for wxCalendarCtrl | |
4 | // Author: Brian Gavin | |
5 | // Created: 2000/09/09 | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2000 Brian Gavin | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifdef __GNUG__ | |
12 | #pragma implementation "xh_cald.h" | |
13 | #endif | |
14 | ||
15 | // For compilers that support precompilation, includes "wx.h". | |
16 | #include "wx/wxprec.h" | |
17 | ||
18 | #ifdef __BORLANDC__ | |
19 | #pragma hdrstop | |
20 | #endif | |
21 | ||
22 | #include "wx/xml/xh_cald.h" | |
23 | #include "wx/calctrl.h" | |
24 | ||
25 | ||
26 | wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler() | |
27 | : wxXmlResourceHandler() | |
28 | { | |
29 | ADD_STYLE(wxCAL_SUNDAY_FIRST); | |
30 | ADD_STYLE(wxCAL_MONDAY_FIRST); | |
31 | ADD_STYLE(wxCAL_SHOW_HOLIDAYS); | |
32 | ADD_STYLE(wxCAL_NO_YEAR_CHANGE); | |
33 | ADD_STYLE(wxCAL_NO_MONTH_CHANGE); | |
34 | AddWindowStyles(); | |
35 | } | |
36 | ||
37 | ||
38 | wxObject *wxCalendarCtrlXmlHandler::DoCreateResource() | |
39 | { | |
ab708d5d | 40 | wxCalendarCtrl *calendar = new wxCalendarCtrl(m_parentAsWindow, |
b008b592 VS |
41 | GetID(), |
42 | wxDefaultDateTime, | |
43 | /*TODO: take it from resource*/ | |
44 | GetPosition(), GetSize(), | |
45 | GetStyle(), | |
46 | GetName()); | |
47 | ||
48 | SetupWindow(calendar); | |
49 | ||
50 | return calendar; | |
51 | } | |
52 | ||
53 | ||
54 | ||
55 | bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node) | |
56 | { | |
a559d708 | 57 | return IsOfClass(node, wxT("wxCalendarCtrl")); |
b008b592 VS |
58 | } |
59 | ||
60 |