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