]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_cald.cpp
added and documented SplitVolume() and GetPathTerminators(); corrected SetPath()...
[wxWidgets.git] / src / xrc / xh_cald.cpp
CommitLineData
78d14f80
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_cald.cpp
b5d6954b 3// Purpose: XRC resource for wxCalendarCtrl
78d14f80
VS
4// Author: Brian Gavin
5// Created: 2000/09/09
6// RCS-ID: $Id$
7// Copyright: (c) 2000 Brian Gavin
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
f80ea77b 10
78d14f80
VS
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
f03b9d45
MB
22#include "wx/setup.h"
23
24#if wxUSE_CALENDARCTRL
25
78d14f80
VS
26#include "wx/xrc/xh_cald.h"
27#include "wx/event.h"
28#include "wx/calctrl.h"
29
854e189f 30IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler, wxXmlResourceHandler)
78d14f80 31
f80ea77b
WS
32wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
33: wxXmlResourceHandler()
78d14f80 34{
544fee32
VS
35 XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST);
36 XRC_ADD_STYLE(wxCAL_MONDAY_FIRST);
37 XRC_ADD_STYLE(wxCAL_SHOW_HOLIDAYS);
38 XRC_ADD_STYLE(wxCAL_NO_YEAR_CHANGE);
39 XRC_ADD_STYLE(wxCAL_NO_MONTH_CHANGE);
c1250407
JS
40 XRC_ADD_STYLE(wxCAL_SEQUENTIAL_MONTH_SELECTION);
41 XRC_ADD_STYLE(wxCAL_SHOW_SURROUNDING_WEEKS);
42
78d14f80
VS
43 AddWindowStyles();
44}
45
46
47wxObject *wxCalendarCtrlXmlHandler::DoCreateResource()
f80ea77b 48{
544fee32 49 XRC_MAKE_INSTANCE(calendar, wxCalendarCtrl);
f2588180
VS
50
51 calendar->Create(m_parentAsWindow,
52 GetID(),
53 wxDefaultDateTime,
54 /*TODO: take it from resource*/
55 GetPosition(), GetSize(),
56 GetStyle(),
57 GetName());
f80ea77b 58
78d14f80 59 SetupWindow(calendar);
f80ea77b 60
78d14f80
VS
61 return calendar;
62}
63
78d14f80
VS
64bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node)
65{
66 return IsOfClass(node, wxT("wxCalendarCtrl"));
67}
f03b9d45
MB
68
69#endif