]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/calendar.py
b3b52b17ab951653917c9f4f854a8c03ef001d33
[wxWidgets.git] / wxPython / src / msw / calendar.py
1 # This file was created automatically by SWIG.
2 import calendarc
3
4 from misc import *
5
6 from windows import *
7
8 from gdi import *
9
10 from clip_dnd import *
11
12 from controls import *
13
14 from events import *
15
16 from utils import *
17 import wx
18
19 def EVT_CALENDAR(win, id, fn):
20 win.Connect(id, -1, wxEVT_CALENDAR_DOUBLECLICKED, fn)
21
22 def EVT_CALENDAR_SEL_CHANGED(win, id, fn):
23 win.Connect(id, -1, wxEVT_CALENDAR_SEL_CHANGED, fn)
24
25 def EVT_CALENDAR_DAY(win, id, fn):
26 win.Connect(id, -1, wxEVT_CALENDAR_DAY_CHANGED, fn)
27
28 def EVT_CALENDAR_MONTH(win, id, fn):
29 win.Connect(id, -1, wxEVT_CALENDAR_MONTH_CHANGED, fn)
30
31 def EVT_CALENDAR_YEAR(win, id, fn):
32 win.Connect(id, -1, wxEVT_CALENDAR_YEAR_CHANGED, fn)
33
34 def EVT_CALENDAR_WEEKDAY_CLICKED(win, id, fn):
35 win.Connect(id, -1, wxEVT_CALENDAR_WEEKDAY_CLICKED, fn)
36
37
38 class wxCalendarEventPtr(wxCommandEventPtr):
39 def __init__(self,this):
40 self.this = this
41 self.thisown = 0
42 def GetDate(self, *_args, **_kwargs):
43 val = apply(calendarc.wxCalendarEvent_GetDate,(self,) + _args, _kwargs)
44 if val: val = wxDateTimePtr(val)
45 return val
46 def GetWeekDay(self, *_args, **_kwargs):
47 val = apply(calendarc.wxCalendarEvent_GetWeekDay,(self,) + _args, _kwargs)
48 return val
49 def __repr__(self):
50 return "<C wxCalendarEvent instance at %s>" % (self.this,)
51 class wxCalendarEvent(wxCalendarEventPtr):
52 def __init__(self,*_args,**_kwargs):
53 self.this = apply(calendarc.new_wxCalendarEvent,_args,_kwargs)
54 self.thisown = 1
55
56
57
58
59 class wxCalendarCtrlPtr(wxControlPtr):
60 def __init__(self,this):
61 self.this = this
62 self.thisown = 0
63 def Create(self, *_args, **_kwargs):
64 val = apply(calendarc.wxCalendarCtrl_Create,(self,) + _args, _kwargs)
65 return val
66 def SetDate(self, *_args, **_kwargs):
67 val = apply(calendarc.wxCalendarCtrl_SetDate,(self,) + _args, _kwargs)
68 return val
69 def GetDate(self, *_args, **_kwargs):
70 val = apply(calendarc.wxCalendarCtrl_GetDate,(self,) + _args, _kwargs)
71 if val: val = wxDateTimePtr(val)
72 return val
73 def SetLowerDateLimit(self, *_args, **_kwargs):
74 val = apply(calendarc.wxCalendarCtrl_SetLowerDateLimit,(self,) + _args, _kwargs)
75 return val
76 def GetLowerDateLimit(self, *_args, **_kwargs):
77 val = apply(calendarc.wxCalendarCtrl_GetLowerDateLimit,(self,) + _args, _kwargs)
78 if val: val = wxDateTimePtr(val)
79 return val
80 def SetUpperDateLimit(self, *_args, **_kwargs):
81 val = apply(calendarc.wxCalendarCtrl_SetUpperDateLimit,(self,) + _args, _kwargs)
82 return val
83 def GetUpperDateLimit(self, *_args, **_kwargs):
84 val = apply(calendarc.wxCalendarCtrl_GetUpperDateLimit,(self,) + _args, _kwargs)
85 if val: val = wxDateTimePtr(val)
86 return val
87 def SetDateRange(self, *_args, **_kwargs):
88 val = apply(calendarc.wxCalendarCtrl_SetDateRange,(self,) + _args, _kwargs)
89 return val
90 def EnableYearChange(self, *_args, **_kwargs):
91 val = apply(calendarc.wxCalendarCtrl_EnableYearChange,(self,) + _args, _kwargs)
92 return val
93 def EnableMonthChange(self, *_args, **_kwargs):
94 val = apply(calendarc.wxCalendarCtrl_EnableMonthChange,(self,) + _args, _kwargs)
95 return val
96 def EnableHolidayDisplay(self, *_args, **_kwargs):
97 val = apply(calendarc.wxCalendarCtrl_EnableHolidayDisplay,(self,) + _args, _kwargs)
98 return val
99 def SetHeaderColours(self, *_args, **_kwargs):
100 val = apply(calendarc.wxCalendarCtrl_SetHeaderColours,(self,) + _args, _kwargs)
101 return val
102 def GetHeaderColourFg(self, *_args, **_kwargs):
103 val = apply(calendarc.wxCalendarCtrl_GetHeaderColourFg,(self,) + _args, _kwargs)
104 if val: val = wxColourPtr(val)
105 return val
106 def GetHeaderColourBg(self, *_args, **_kwargs):
107 val = apply(calendarc.wxCalendarCtrl_GetHeaderColourBg,(self,) + _args, _kwargs)
108 if val: val = wxColourPtr(val)
109 return val
110 def SetHighlightColours(self, *_args, **_kwargs):
111 val = apply(calendarc.wxCalendarCtrl_SetHighlightColours,(self,) + _args, _kwargs)
112 return val
113 def GetHighlightColourFg(self, *_args, **_kwargs):
114 val = apply(calendarc.wxCalendarCtrl_GetHighlightColourFg,(self,) + _args, _kwargs)
115 if val: val = wxColourPtr(val)
116 return val
117 def GetHighlightColourBg(self, *_args, **_kwargs):
118 val = apply(calendarc.wxCalendarCtrl_GetHighlightColourBg,(self,) + _args, _kwargs)
119 if val: val = wxColourPtr(val)
120 return val
121 def SetHolidayColours(self, *_args, **_kwargs):
122 val = apply(calendarc.wxCalendarCtrl_SetHolidayColours,(self,) + _args, _kwargs)
123 return val
124 def GetHolidayColourFg(self, *_args, **_kwargs):
125 val = apply(calendarc.wxCalendarCtrl_GetHolidayColourFg,(self,) + _args, _kwargs)
126 if val: val = wxColourPtr(val)
127 return val
128 def GetHolidayColourBg(self, *_args, **_kwargs):
129 val = apply(calendarc.wxCalendarCtrl_GetHolidayColourBg,(self,) + _args, _kwargs)
130 if val: val = wxColourPtr(val)
131 return val
132 def GetAttr(self, *_args, **_kwargs):
133 val = apply(calendarc.wxCalendarCtrl_GetAttr,(self,) + _args, _kwargs)
134 return val
135 def SetAttr(self, *_args, **_kwargs):
136 val = apply(calendarc.wxCalendarCtrl_SetAttr,(self,) + _args, _kwargs)
137 return val
138 def SetHoliday(self, *_args, **_kwargs):
139 val = apply(calendarc.wxCalendarCtrl_SetHoliday,(self,) + _args, _kwargs)
140 return val
141 def ResetAttr(self, *_args, **_kwargs):
142 val = apply(calendarc.wxCalendarCtrl_ResetAttr,(self,) + _args, _kwargs)
143 return val
144 def HitTest(self, *_args, **_kwargs):
145 val = apply(calendarc.wxCalendarCtrl_HitTest,(self,) + _args, _kwargs)
146 return val
147 def Enable(self, *_args, **_kwargs):
148 val = apply(calendarc.wxCalendarCtrl_Enable,(self,) + _args, _kwargs)
149 return val
150 def Show(self, *_args, **_kwargs):
151 val = apply(calendarc.wxCalendarCtrl_Show,(self,) + _args, _kwargs)
152 return val
153 def __repr__(self):
154 return "<C wxCalendarCtrl instance at %s>" % (self.this,)
155 class wxCalendarCtrl(wxCalendarCtrlPtr):
156 def __init__(self,*_args,**_kwargs):
157 self.this = apply(calendarc.new_wxCalendarCtrl,_args,_kwargs)
158 self.thisown = 1
159 self._setOORInfo(self)
160
161
162
163 def wxPreCalendarCtrl(*_args,**_kwargs):
164 val = wxCalendarCtrlPtr(apply(calendarc.new_wxPreCalendarCtrl,_args,_kwargs))
165 val.thisown = 1
166 val._setOORInfo(val)
167 return val
168
169
170
171
172 #-------------- FUNCTION WRAPPERS ------------------
173
174
175
176 #-------------- VARIABLE WRAPPERS ------------------
177
178 wxCAL_SUNDAY_FIRST = calendarc.wxCAL_SUNDAY_FIRST
179 wxCAL_MONDAY_FIRST = calendarc.wxCAL_MONDAY_FIRST
180 wxCAL_SHOW_HOLIDAYS = calendarc.wxCAL_SHOW_HOLIDAYS
181 wxCAL_NO_YEAR_CHANGE = calendarc.wxCAL_NO_YEAR_CHANGE
182 wxCAL_NO_MONTH_CHANGE = calendarc.wxCAL_NO_MONTH_CHANGE
183 wxCAL_SEQUENTIAL_MONTH_SELECTION = calendarc.wxCAL_SEQUENTIAL_MONTH_SELECTION
184 wxCAL_SHOW_SURROUNDING_WEEKS = calendarc.wxCAL_SHOW_SURROUNDING_WEEKS
185 wxCAL_HITTEST_NOWHERE = calendarc.wxCAL_HITTEST_NOWHERE
186 wxCAL_HITTEST_HEADER = calendarc.wxCAL_HITTEST_HEADER
187 wxCAL_HITTEST_DAY = calendarc.wxCAL_HITTEST_DAY
188 wxEVT_CALENDAR_DOUBLECLICKED = calendarc.wxEVT_CALENDAR_DOUBLECLICKED
189 wxEVT_CALENDAR_SEL_CHANGED = calendarc.wxEVT_CALENDAR_SEL_CHANGED
190 wxEVT_CALENDAR_DAY_CHANGED = calendarc.wxEVT_CALENDAR_DAY_CHANGED
191 wxEVT_CALENDAR_MONTH_CHANGED = calendarc.wxEVT_CALENDAR_MONTH_CHANGED
192 wxEVT_CALENDAR_YEAR_CHANGED = calendarc.wxEVT_CALENDAR_YEAR_CHANGED
193 wxEVT_CALENDAR_WEEKDAY_CLICKED = calendarc.wxEVT_CALENDAR_WEEKDAY_CLICKED
194
195
196 #-------------- USER INCLUDE -----------------------
197
198
199 # Stuff these names into the wx namespace so wxPyConstructObject can find them
200
201 wx.wxCalendarEventPtr = wxCalendarEventPtr