]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/mac/calendar.py
Bug fix
[wxWidgets.git] / wxPython / src / mac / 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 fonts import *
11
12 from clip_dnd import *
13
14 from controls import *
15
16 from events import *
17
18 from utils import *
19 import wx
20
21 def EVT_CALENDAR(win, id, fn):
22 win.Connect(id, -1, wxEVT_CALENDAR_DOUBLECLICKED, fn)
23
24 def EVT_CALENDAR_SEL_CHANGED(win, id, fn):
25 win.Connect(id, -1, wxEVT_CALENDAR_SEL_CHANGED, fn)
26
27 def EVT_CALENDAR_DAY(win, id, fn):
28 win.Connect(id, -1, wxEVT_CALENDAR_DAY_CHANGED, fn)
29
30 def EVT_CALENDAR_MONTH(win, id, fn):
31 win.Connect(id, -1, wxEVT_CALENDAR_MONTH_CHANGED, fn)
32
33 def EVT_CALENDAR_YEAR(win, id, fn):
34 win.Connect(id, -1, wxEVT_CALENDAR_YEAR_CHANGED, fn)
35
36 def EVT_CALENDAR_WEEKDAY_CLICKED(win, id, fn):
37 win.Connect(id, -1, wxEVT_CALENDAR_WEEKDAY_CLICKED, fn)
38
39
40 class wxCalendarDateAttrPtr :
41 def __init__(self,this):
42 self.this = this
43 self.thisown = 0
44 def SetTextColour(self, *_args, **_kwargs):
45 val = apply(calendarc.wxCalendarDateAttr_SetTextColour,(self,) + _args, _kwargs)
46 return val
47 def SetBackgroundColour(self, *_args, **_kwargs):
48 val = apply(calendarc.wxCalendarDateAttr_SetBackgroundColour,(self,) + _args, _kwargs)
49 return val
50 def SetBorderColour(self, *_args, **_kwargs):
51 val = apply(calendarc.wxCalendarDateAttr_SetBorderColour,(self,) + _args, _kwargs)
52 return val
53 def SetFont(self, *_args, **_kwargs):
54 val = apply(calendarc.wxCalendarDateAttr_SetFont,(self,) + _args, _kwargs)
55 return val
56 def SetBorder(self, *_args, **_kwargs):
57 val = apply(calendarc.wxCalendarDateAttr_SetBorder,(self,) + _args, _kwargs)
58 return val
59 def SetHoliday(self, *_args, **_kwargs):
60 val = apply(calendarc.wxCalendarDateAttr_SetHoliday,(self,) + _args, _kwargs)
61 return val
62 def HasTextColour(self, *_args, **_kwargs):
63 val = apply(calendarc.wxCalendarDateAttr_HasTextColour,(self,) + _args, _kwargs)
64 return val
65 def HasBackgroundColour(self, *_args, **_kwargs):
66 val = apply(calendarc.wxCalendarDateAttr_HasBackgroundColour,(self,) + _args, _kwargs)
67 return val
68 def HasBorderColour(self, *_args, **_kwargs):
69 val = apply(calendarc.wxCalendarDateAttr_HasBorderColour,(self,) + _args, _kwargs)
70 return val
71 def HasFont(self, *_args, **_kwargs):
72 val = apply(calendarc.wxCalendarDateAttr_HasFont,(self,) + _args, _kwargs)
73 return val
74 def HasBorder(self, *_args, **_kwargs):
75 val = apply(calendarc.wxCalendarDateAttr_HasBorder,(self,) + _args, _kwargs)
76 return val
77 def IsHoliday(self, *_args, **_kwargs):
78 val = apply(calendarc.wxCalendarDateAttr_IsHoliday,(self,) + _args, _kwargs)
79 return val
80 def GetTextColour(self, *_args, **_kwargs):
81 val = apply(calendarc.wxCalendarDateAttr_GetTextColour,(self,) + _args, _kwargs)
82 if val: val = wxColourPtr(val) ; val.thisown = 1
83 return val
84 def GetBackgroundColour(self, *_args, **_kwargs):
85 val = apply(calendarc.wxCalendarDateAttr_GetBackgroundColour,(self,) + _args, _kwargs)
86 if val: val = wxColourPtr(val) ; val.thisown = 1
87 return val
88 def GetBorderColour(self, *_args, **_kwargs):
89 val = apply(calendarc.wxCalendarDateAttr_GetBorderColour,(self,) + _args, _kwargs)
90 if val: val = wxColourPtr(val) ; val.thisown = 1
91 return val
92 def GetFont(self, *_args, **_kwargs):
93 val = apply(calendarc.wxCalendarDateAttr_GetFont,(self,) + _args, _kwargs)
94 if val: val = wxFontPtr(val) ; val.thisown = 1
95 return val
96 def GetBorder(self, *_args, **_kwargs):
97 val = apply(calendarc.wxCalendarDateAttr_GetBorder,(self,) + _args, _kwargs)
98 return val
99 def __repr__(self):
100 return "<C wxCalendarDateAttr instance at %s>" % (self.this,)
101 class wxCalendarDateAttr(wxCalendarDateAttrPtr):
102 def __init__(self,*_args,**_kwargs):
103 self.this = apply(calendarc.new_wxCalendarDateAttr,_args,_kwargs)
104 self.thisown = 1
105
106
107
108 def wxCalendarDateAttrBorder(*_args,**_kwargs):
109 val = wxCalendarDateAttrPtr(apply(calendarc.new_wxCalendarDateAttrBorder,_args,_kwargs))
110 val.thisown = 1
111 return val
112
113
114 class wxCalendarEventPtr(wxCommandEventPtr):
115 def __init__(self,this):
116 self.this = this
117 self.thisown = 0
118 def GetDate(self, *_args, **_kwargs):
119 val = apply(calendarc.wxCalendarEvent_GetDate,(self,) + _args, _kwargs)
120 if val: val = wxDateTimePtr(val)
121 return val
122 def GetWeekDay(self, *_args, **_kwargs):
123 val = apply(calendarc.wxCalendarEvent_GetWeekDay,(self,) + _args, _kwargs)
124 return val
125 def __repr__(self):
126 return "<C wxCalendarEvent instance at %s>" % (self.this,)
127 class wxCalendarEvent(wxCalendarEventPtr):
128 def __init__(self,*_args,**_kwargs):
129 self.this = apply(calendarc.new_wxCalendarEvent,_args,_kwargs)
130 self.thisown = 1
131
132
133
134
135 class wxCalendarCtrlPtr(wxControlPtr):
136 def __init__(self,this):
137 self.this = this
138 self.thisown = 0
139 def Create(self, *_args, **_kwargs):
140 val = apply(calendarc.wxCalendarCtrl_Create,(self,) + _args, _kwargs)
141 return val
142 def SetDate(self, *_args, **_kwargs):
143 val = apply(calendarc.wxCalendarCtrl_SetDate,(self,) + _args, _kwargs)
144 return val
145 def GetDate(self, *_args, **_kwargs):
146 val = apply(calendarc.wxCalendarCtrl_GetDate,(self,) + _args, _kwargs)
147 if val: val = wxDateTimePtr(val)
148 return val
149 def SetLowerDateLimit(self, *_args, **_kwargs):
150 val = apply(calendarc.wxCalendarCtrl_SetLowerDateLimit,(self,) + _args, _kwargs)
151 return val
152 def GetLowerDateLimit(self, *_args, **_kwargs):
153 val = apply(calendarc.wxCalendarCtrl_GetLowerDateLimit,(self,) + _args, _kwargs)
154 if val: val = wxDateTimePtr(val)
155 return val
156 def SetUpperDateLimit(self, *_args, **_kwargs):
157 val = apply(calendarc.wxCalendarCtrl_SetUpperDateLimit,(self,) + _args, _kwargs)
158 return val
159 def GetUpperDateLimit(self, *_args, **_kwargs):
160 val = apply(calendarc.wxCalendarCtrl_GetUpperDateLimit,(self,) + _args, _kwargs)
161 if val: val = wxDateTimePtr(val)
162 return val
163 def SetDateRange(self, *_args, **_kwargs):
164 val = apply(calendarc.wxCalendarCtrl_SetDateRange,(self,) + _args, _kwargs)
165 return val
166 def EnableYearChange(self, *_args, **_kwargs):
167 val = apply(calendarc.wxCalendarCtrl_EnableYearChange,(self,) + _args, _kwargs)
168 return val
169 def EnableMonthChange(self, *_args, **_kwargs):
170 val = apply(calendarc.wxCalendarCtrl_EnableMonthChange,(self,) + _args, _kwargs)
171 return val
172 def EnableHolidayDisplay(self, *_args, **_kwargs):
173 val = apply(calendarc.wxCalendarCtrl_EnableHolidayDisplay,(self,) + _args, _kwargs)
174 return val
175 def SetHeaderColours(self, *_args, **_kwargs):
176 val = apply(calendarc.wxCalendarCtrl_SetHeaderColours,(self,) + _args, _kwargs)
177 return val
178 def GetHeaderColourFg(self, *_args, **_kwargs):
179 val = apply(calendarc.wxCalendarCtrl_GetHeaderColourFg,(self,) + _args, _kwargs)
180 if val: val = wxColourPtr(val) ; val.thisown = 1
181 return val
182 def GetHeaderColourBg(self, *_args, **_kwargs):
183 val = apply(calendarc.wxCalendarCtrl_GetHeaderColourBg,(self,) + _args, _kwargs)
184 if val: val = wxColourPtr(val) ; val.thisown = 1
185 return val
186 def SetHighlightColours(self, *_args, **_kwargs):
187 val = apply(calendarc.wxCalendarCtrl_SetHighlightColours,(self,) + _args, _kwargs)
188 return val
189 def GetHighlightColourFg(self, *_args, **_kwargs):
190 val = apply(calendarc.wxCalendarCtrl_GetHighlightColourFg,(self,) + _args, _kwargs)
191 if val: val = wxColourPtr(val) ; val.thisown = 1
192 return val
193 def GetHighlightColourBg(self, *_args, **_kwargs):
194 val = apply(calendarc.wxCalendarCtrl_GetHighlightColourBg,(self,) + _args, _kwargs)
195 if val: val = wxColourPtr(val) ; val.thisown = 1
196 return val
197 def SetHolidayColours(self, *_args, **_kwargs):
198 val = apply(calendarc.wxCalendarCtrl_SetHolidayColours,(self,) + _args, _kwargs)
199 return val
200 def GetHolidayColourFg(self, *_args, **_kwargs):
201 val = apply(calendarc.wxCalendarCtrl_GetHolidayColourFg,(self,) + _args, _kwargs)
202 if val: val = wxColourPtr(val) ; val.thisown = 1
203 return val
204 def GetHolidayColourBg(self, *_args, **_kwargs):
205 val = apply(calendarc.wxCalendarCtrl_GetHolidayColourBg,(self,) + _args, _kwargs)
206 if val: val = wxColourPtr(val) ; val.thisown = 1
207 return val
208 def GetAttr(self, *_args, **_kwargs):
209 val = apply(calendarc.wxCalendarCtrl_GetAttr,(self,) + _args, _kwargs)
210 if val: val = wxCalendarDateAttrPtr(val)
211 return val
212 def SetAttr(self, *_args, **_kwargs):
213 val = apply(calendarc.wxCalendarCtrl_SetAttr,(self,) + _args, _kwargs)
214 return val
215 def SetHoliday(self, *_args, **_kwargs):
216 val = apply(calendarc.wxCalendarCtrl_SetHoliday,(self,) + _args, _kwargs)
217 return val
218 def ResetAttr(self, *_args, **_kwargs):
219 val = apply(calendarc.wxCalendarCtrl_ResetAttr,(self,) + _args, _kwargs)
220 return val
221 def HitTest(self, *_args, **_kwargs):
222 val = apply(calendarc.wxCalendarCtrl_HitTest,(self,) + _args, _kwargs)
223 return val
224 def Enable(self, *_args, **_kwargs):
225 val = apply(calendarc.wxCalendarCtrl_Enable,(self,) + _args, _kwargs)
226 return val
227 def Show(self, *_args, **_kwargs):
228 val = apply(calendarc.wxCalendarCtrl_Show,(self,) + _args, _kwargs)
229 return val
230 def __repr__(self):
231 return "<C wxCalendarCtrl instance at %s>" % (self.this,)
232 class wxCalendarCtrl(wxCalendarCtrlPtr):
233 def __init__(self,*_args,**_kwargs):
234 self.this = apply(calendarc.new_wxCalendarCtrl,_args,_kwargs)
235 self.thisown = 1
236 self._setOORInfo(self)
237
238
239
240 def wxPreCalendarCtrl(*_args,**_kwargs):
241 val = wxCalendarCtrlPtr(apply(calendarc.new_wxPreCalendarCtrl,_args,_kwargs))
242 val.thisown = 1
243 val._setOORInfo(val)
244 return val
245
246
247
248
249 #-------------- FUNCTION WRAPPERS ------------------
250
251
252
253 #-------------- VARIABLE WRAPPERS ------------------
254
255 wxCAL_SUNDAY_FIRST = calendarc.wxCAL_SUNDAY_FIRST
256 wxCAL_MONDAY_FIRST = calendarc.wxCAL_MONDAY_FIRST
257 wxCAL_SHOW_HOLIDAYS = calendarc.wxCAL_SHOW_HOLIDAYS
258 wxCAL_NO_YEAR_CHANGE = calendarc.wxCAL_NO_YEAR_CHANGE
259 wxCAL_NO_MONTH_CHANGE = calendarc.wxCAL_NO_MONTH_CHANGE
260 wxCAL_SEQUENTIAL_MONTH_SELECTION = calendarc.wxCAL_SEQUENTIAL_MONTH_SELECTION
261 wxCAL_SHOW_SURROUNDING_WEEKS = calendarc.wxCAL_SHOW_SURROUNDING_WEEKS
262 wxCAL_HITTEST_NOWHERE = calendarc.wxCAL_HITTEST_NOWHERE
263 wxCAL_HITTEST_HEADER = calendarc.wxCAL_HITTEST_HEADER
264 wxCAL_HITTEST_DAY = calendarc.wxCAL_HITTEST_DAY
265 wxCAL_HITTEST_INCMONTH = calendarc.wxCAL_HITTEST_INCMONTH
266 wxCAL_HITTEST_DECMONTH = calendarc.wxCAL_HITTEST_DECMONTH
267 wxCAL_HITTEST_SURROUNDING_WEEK = calendarc.wxCAL_HITTEST_SURROUNDING_WEEK
268 wxCAL_BORDER_NONE = calendarc.wxCAL_BORDER_NONE
269 wxCAL_BORDER_SQUARE = calendarc.wxCAL_BORDER_SQUARE
270 wxCAL_BORDER_ROUND = calendarc.wxCAL_BORDER_ROUND
271 wxEVT_CALENDAR_DOUBLECLICKED = calendarc.wxEVT_CALENDAR_DOUBLECLICKED
272 wxEVT_CALENDAR_SEL_CHANGED = calendarc.wxEVT_CALENDAR_SEL_CHANGED
273 wxEVT_CALENDAR_DAY_CHANGED = calendarc.wxEVT_CALENDAR_DAY_CHANGED
274 wxEVT_CALENDAR_MONTH_CHANGED = calendarc.wxEVT_CALENDAR_MONTH_CHANGED
275 wxEVT_CALENDAR_YEAR_CHANGED = calendarc.wxEVT_CALENDAR_YEAR_CHANGED
276 wxEVT_CALENDAR_WEEKDAY_CLICKED = calendarc.wxEVT_CALENDAR_WEEKDAY_CLICKED
277
278
279 #-------------- USER INCLUDE -----------------------
280
281
282 # Stuff these names into the wx namespace so wxPyConstructObject can find them
283
284 wx.wxCalendarEventPtr = wxCalendarEventPtr