]>
Commit | Line | Data |
---|---|---|
9c039d08 RD |
1 | # This file was created automatically by SWIG. |
2 | import stattoolc | |
3 | ||
4 | from misc import * | |
5 | ||
6 | from windows import * | |
7 | ||
8 | from gdi import * | |
9 | ||
a323d3bd RD |
10 | from fonts import * |
11 | ||
b1462dfa RD |
12 | from clip_dnd import * |
13 | ||
9c039d08 RD |
14 | from controls import * |
15 | ||
16 | from events import * | |
b8b8dda7 | 17 | import wx |
a323d3bd | 18 | wxITEM_NORMAL = 0 # predeclare this since wx isn't fully imported yet |
9c039d08 RD |
19 | class wxStatusBarPtr(wxWindowPtr): |
20 | def __init__(self,this): | |
21 | self.this = this | |
22 | self.thisown = 0 | |
aa2a5b86 RD |
23 | def Create(self, *_args, **_kwargs): |
24 | val = apply(stattoolc.wxStatusBar_Create,(self,) + _args, _kwargs) | |
25 | return val | |
1d99702e RD |
26 | def GetFieldRect(self, *_args, **_kwargs): |
27 | val = apply(stattoolc.wxStatusBar_GetFieldRect,(self,) + _args, _kwargs) | |
28 | if val: val = wxRectPtr(val) ; val.thisown = 1 | |
9c039d08 | 29 | return val |
1d99702e RD |
30 | def GetFieldsCount(self, *_args, **_kwargs): |
31 | val = apply(stattoolc.wxStatusBar_GetFieldsCount,(self,) + _args, _kwargs) | |
9c039d08 | 32 | return val |
1d99702e RD |
33 | def GetStatusText(self, *_args, **_kwargs): |
34 | val = apply(stattoolc.wxStatusBar_GetStatusText,(self,) + _args, _kwargs) | |
9c039d08 | 35 | return val |
26b9cf27 RD |
36 | def GetBorderX(self, *_args, **_kwargs): |
37 | val = apply(stattoolc.wxStatusBar_GetBorderX,(self,) + _args, _kwargs) | |
9c039d08 | 38 | return val |
26b9cf27 RD |
39 | def GetBorderY(self, *_args, **_kwargs): |
40 | val = apply(stattoolc.wxStatusBar_GetBorderY,(self,) + _args, _kwargs) | |
9c039d08 | 41 | return val |
1d99702e RD |
42 | def SetFieldsCount(self, *_args, **_kwargs): |
43 | val = apply(stattoolc.wxStatusBar_SetFieldsCount,(self,) + _args, _kwargs) | |
9c039d08 | 44 | return val |
1d99702e RD |
45 | def SetStatusText(self, *_args, **_kwargs): |
46 | val = apply(stattoolc.wxStatusBar_SetStatusText,(self,) + _args, _kwargs) | |
9c039d08 | 47 | return val |
1d99702e RD |
48 | def SetStatusWidths(self, *_args, **_kwargs): |
49 | val = apply(stattoolc.wxStatusBar_SetStatusWidths,(self,) + _args, _kwargs) | |
9c039d08 | 50 | return val |
6129f59e RD |
51 | def PushStatusText(self, *_args, **_kwargs): |
52 | val = apply(stattoolc.wxStatusBar_PushStatusText,(self,) + _args, _kwargs) | |
53 | return val | |
54 | def PopStatusText(self, *_args, **_kwargs): | |
55 | val = apply(stattoolc.wxStatusBar_PopStatusText,(self,) + _args, _kwargs) | |
56 | return val | |
26b9cf27 RD |
57 | def SetMinHeight(self, *_args, **_kwargs): |
58 | val = apply(stattoolc.wxStatusBar_SetMinHeight,(self,) + _args, _kwargs) | |
59 | return val | |
9c039d08 | 60 | def __repr__(self): |
1d99702e | 61 | return "<C wxStatusBar instance at %s>" % (self.this,) |
9c039d08 | 62 | class wxStatusBar(wxStatusBarPtr): |
1d99702e RD |
63 | def __init__(self,*_args,**_kwargs): |
64 | self.this = apply(stattoolc.new_wxStatusBar,_args,_kwargs) | |
9c039d08 | 65 | self.thisown = 1 |
0220cbc1 | 66 | self._setOORInfo(self) |
9c039d08 RD |
67 | |
68 | ||
69 | ||
aa2a5b86 RD |
70 | def wxPreStatusBar(*_args,**_kwargs): |
71 | val = wxStatusBarPtr(apply(stattoolc.new_wxPreStatusBar,_args,_kwargs)) | |
72 | val.thisown = 1 | |
17c0e08c | 73 | val._setOORInfo(val) |
aa2a5b86 RD |
74 | return val |
75 | ||
9c039d08 | 76 | |
9df61a29 | 77 | class wxToolBarToolBasePtr(wxObjectPtr): |
9c039d08 RD |
78 | def __init__(self,this): |
79 | self.this = this | |
80 | self.thisown = 0 | |
9b3d3bc4 RD |
81 | def Destroy(self, *_args, **_kwargs): |
82 | val = apply(stattoolc.wxToolBarToolBase_Destroy,(self,) + _args, _kwargs) | |
9c039d08 | 83 | return val |
9b3d3bc4 RD |
84 | def GetId(self, *_args, **_kwargs): |
85 | val = apply(stattoolc.wxToolBarToolBase_GetId,(self,) + _args, _kwargs) | |
9c039d08 | 86 | return val |
6999b0d8 | 87 | def GetControl(self, *_args, **_kwargs): |
9b3d3bc4 | 88 | val = apply(stattoolc.wxToolBarToolBase_GetControl,(self,) + _args, _kwargs) |
6999b0d8 | 89 | return val |
9b3d3bc4 RD |
90 | def GetToolBar(self, *_args, **_kwargs): |
91 | val = apply(stattoolc.wxToolBarToolBase_GetToolBar,(self,) + _args, _kwargs) | |
9b3d3bc4 RD |
92 | return val |
93 | def IsButton(self, *_args, **_kwargs): | |
94 | val = apply(stattoolc.wxToolBarToolBase_IsButton,(self,) + _args, _kwargs) | |
95 | return val | |
96 | def IsControl(self, *_args, **_kwargs): | |
97 | val = apply(stattoolc.wxToolBarToolBase_IsControl,(self,) + _args, _kwargs) | |
98 | return val | |
99 | def IsSeparator(self, *_args, **_kwargs): | |
100 | val = apply(stattoolc.wxToolBarToolBase_IsSeparator,(self,) + _args, _kwargs) | |
101 | return val | |
102 | def GetStyle(self, *_args, **_kwargs): | |
103 | val = apply(stattoolc.wxToolBarToolBase_GetStyle,(self,) + _args, _kwargs) | |
104 | return val | |
be86ffe3 RD |
105 | def GetKind(self, *_args, **_kwargs): |
106 | val = apply(stattoolc.wxToolBarToolBase_GetKind,(self,) + _args, _kwargs) | |
107 | return val | |
9b3d3bc4 RD |
108 | def IsEnabled(self, *_args, **_kwargs): |
109 | val = apply(stattoolc.wxToolBarToolBase_IsEnabled,(self,) + _args, _kwargs) | |
110 | return val | |
111 | def IsToggled(self, *_args, **_kwargs): | |
112 | val = apply(stattoolc.wxToolBarToolBase_IsToggled,(self,) + _args, _kwargs) | |
113 | return val | |
114 | def CanBeToggled(self, *_args, **_kwargs): | |
115 | val = apply(stattoolc.wxToolBarToolBase_CanBeToggled,(self,) + _args, _kwargs) | |
116 | return val | |
f0972d1e RD |
117 | def GetNormalBitmap(self, *_args, **_kwargs): |
118 | val = apply(stattoolc.wxToolBarToolBase_GetNormalBitmap,(self,) + _args, _kwargs) | |
119 | if val: val = wxBitmapPtr(val) | |
9b3d3bc4 | 120 | return val |
f0972d1e RD |
121 | def GetDisabledBitmap(self, *_args, **_kwargs): |
122 | val = apply(stattoolc.wxToolBarToolBase_GetDisabledBitmap,(self,) + _args, _kwargs) | |
123 | if val: val = wxBitmapPtr(val) | |
9b3d3bc4 RD |
124 | return val |
125 | def GetBitmap(self, *_args, **_kwargs): | |
126 | val = apply(stattoolc.wxToolBarToolBase_GetBitmap,(self,) + _args, _kwargs) | |
3e212503 | 127 | if val: val = wxBitmapPtr(val) ; val.thisown = 1 |
9b3d3bc4 | 128 | return val |
f0972d1e RD |
129 | def GetLabel(self, *_args, **_kwargs): |
130 | val = apply(stattoolc.wxToolBarToolBase_GetLabel,(self,) + _args, _kwargs) | |
131 | return val | |
9b3d3bc4 RD |
132 | def GetShortHelp(self, *_args, **_kwargs): |
133 | val = apply(stattoolc.wxToolBarToolBase_GetShortHelp,(self,) + _args, _kwargs) | |
134 | return val | |
135 | def GetLongHelp(self, *_args, **_kwargs): | |
136 | val = apply(stattoolc.wxToolBarToolBase_GetLongHelp,(self,) + _args, _kwargs) | |
137 | return val | |
138 | def Enable(self, *_args, **_kwargs): | |
139 | val = apply(stattoolc.wxToolBarToolBase_Enable,(self,) + _args, _kwargs) | |
140 | return val | |
141 | def Toggle(self, *_args, **_kwargs): | |
142 | val = apply(stattoolc.wxToolBarToolBase_Toggle,(self,) + _args, _kwargs) | |
143 | return val | |
144 | def SetToggle(self, *_args, **_kwargs): | |
145 | val = apply(stattoolc.wxToolBarToolBase_SetToggle,(self,) + _args, _kwargs) | |
146 | return val | |
147 | def SetShortHelp(self, *_args, **_kwargs): | |
148 | val = apply(stattoolc.wxToolBarToolBase_SetShortHelp,(self,) + _args, _kwargs) | |
149 | return val | |
150 | def SetLongHelp(self, *_args, **_kwargs): | |
151 | val = apply(stattoolc.wxToolBarToolBase_SetLongHelp,(self,) + _args, _kwargs) | |
152 | return val | |
f0972d1e RD |
153 | def SetNormalBitmap(self, *_args, **_kwargs): |
154 | val = apply(stattoolc.wxToolBarToolBase_SetNormalBitmap,(self,) + _args, _kwargs) | |
9b3d3bc4 | 155 | return val |
f0972d1e RD |
156 | def SetDisabledBitmap(self, *_args, **_kwargs): |
157 | val = apply(stattoolc.wxToolBarToolBase_SetDisabledBitmap,(self,) + _args, _kwargs) | |
158 | return val | |
159 | def SetLabel(self, *_args, **_kwargs): | |
160 | val = apply(stattoolc.wxToolBarToolBase_SetLabel,(self,) + _args, _kwargs) | |
9b3d3bc4 RD |
161 | return val |
162 | def Detach(self, *_args, **_kwargs): | |
163 | val = apply(stattoolc.wxToolBarToolBase_Detach,(self,) + _args, _kwargs) | |
164 | return val | |
165 | def Attach(self, *_args, **_kwargs): | |
166 | val = apply(stattoolc.wxToolBarToolBase_Attach,(self,) + _args, _kwargs) | |
167 | return val | |
168 | def GetClientData(self, *_args, **_kwargs): | |
169 | val = apply(stattoolc.wxToolBarToolBase_GetClientData,(self,) + _args, _kwargs) | |
170 | return val | |
171 | def SetClientData(self, *_args, **_kwargs): | |
172 | val = apply(stattoolc.wxToolBarToolBase_SetClientData,(self,) + _args, _kwargs) | |
173 | return val | |
9c039d08 | 174 | def __repr__(self): |
9b3d3bc4 | 175 | return "<C wxToolBarToolBase instance at %s>" % (self.this,) |
f0972d1e RD |
176 | |
177 | GetBitmap1 = GetNormalBitmap | |
178 | GetBitmap2 = GetDisabledBitmap | |
179 | SetBitmap1 = SetNormalBitmap | |
180 | SetBitmap2 = SetDisabledBitmap | |
181 | ||
9b3d3bc4 RD |
182 | class wxToolBarToolBase(wxToolBarToolBasePtr): |
183 | def __init__(self,this): | |
184 | self.this = this | |
9c039d08 RD |
185 | |
186 | ||
187 | ||
188 | ||
9b3d3bc4 | 189 | class wxToolBarBasePtr(wxControlPtr): |
9c039d08 RD |
190 | def __init__(self,this): |
191 | self.this = this | |
192 | self.thisown = 0 | |
a323d3bd RD |
193 | def DoAddTool(self, *_args, **_kwargs): |
194 | val = apply(stattoolc.wxToolBarBase_DoAddTool,(self,) + _args, _kwargs) | |
be86ffe3 | 195 | return val |
9b3d3bc4 RD |
196 | def InsertTool(self, *_args, **_kwargs): |
197 | val = apply(stattoolc.wxToolBarBase_InsertTool,(self,) + _args, _kwargs) | |
6999b0d8 | 198 | return val |
9b3d3bc4 RD |
199 | def AddControl(self, *_args, **_kwargs): |
200 | val = apply(stattoolc.wxToolBarBase_AddControl,(self,) + _args, _kwargs) | |
9c039d08 | 201 | return val |
9b3d3bc4 RD |
202 | def InsertControl(self, *_args, **_kwargs): |
203 | val = apply(stattoolc.wxToolBarBase_InsertControl,(self,) + _args, _kwargs) | |
9c039d08 | 204 | return val |
9b3d3bc4 RD |
205 | def AddSeparator(self, *_args, **_kwargs): |
206 | val = apply(stattoolc.wxToolBarBase_AddSeparator,(self,) + _args, _kwargs) | |
9c039d08 | 207 | return val |
9b3d3bc4 RD |
208 | def InsertSeparator(self, *_args, **_kwargs): |
209 | val = apply(stattoolc.wxToolBarBase_InsertSeparator,(self,) + _args, _kwargs) | |
9c039d08 | 210 | return val |
9b3d3bc4 RD |
211 | def RemoveTool(self, *_args, **_kwargs): |
212 | val = apply(stattoolc.wxToolBarBase_RemoveTool,(self,) + _args, _kwargs) | |
9c039d08 | 213 | return val |
9b3d3bc4 RD |
214 | def DeleteToolByPos(self, *_args, **_kwargs): |
215 | val = apply(stattoolc.wxToolBarBase_DeleteToolByPos,(self,) + _args, _kwargs) | |
be4d9c1f | 216 | return val |
9b3d3bc4 RD |
217 | def DeleteTool(self, *_args, **_kwargs): |
218 | val = apply(stattoolc.wxToolBarBase_DeleteTool,(self,) + _args, _kwargs) | |
6999b0d8 | 219 | return val |
9b3d3bc4 RD |
220 | def ClearTools(self, *_args, **_kwargs): |
221 | val = apply(stattoolc.wxToolBarBase_ClearTools,(self,) + _args, _kwargs) | |
9c039d08 | 222 | return val |
9b3d3bc4 RD |
223 | def Realize(self, *_args, **_kwargs): |
224 | val = apply(stattoolc.wxToolBarBase_Realize,(self,) + _args, _kwargs) | |
9c039d08 | 225 | return val |
9b3d3bc4 RD |
226 | def EnableTool(self, *_args, **_kwargs): |
227 | val = apply(stattoolc.wxToolBarBase_EnableTool,(self,) + _args, _kwargs) | |
9c039d08 | 228 | return val |
9b3d3bc4 RD |
229 | def ToggleTool(self, *_args, **_kwargs): |
230 | val = apply(stattoolc.wxToolBarBase_ToggleTool,(self,) + _args, _kwargs) | |
9c039d08 | 231 | return val |
9b3d3bc4 RD |
232 | def SetToggle(self, *_args, **_kwargs): |
233 | val = apply(stattoolc.wxToolBarBase_SetToggle,(self,) + _args, _kwargs) | |
9c039d08 | 234 | return val |
9b3d3bc4 RD |
235 | def GetToolClientData(self, *_args, **_kwargs): |
236 | val = apply(stattoolc.wxToolBarBase_GetToolClientData,(self,) + _args, _kwargs) | |
237 | return val | |
238 | def SetToolClientData(self, *_args, **_kwargs): | |
239 | val = apply(stattoolc.wxToolBarBase_SetToolClientData,(self,) + _args, _kwargs) | |
9c039d08 | 240 | return val |
1d99702e | 241 | def GetToolState(self, *_args, **_kwargs): |
9b3d3bc4 | 242 | val = apply(stattoolc.wxToolBarBase_GetToolState,(self,) + _args, _kwargs) |
9c039d08 | 243 | return val |
9b3d3bc4 RD |
244 | def GetToolEnabled(self, *_args, **_kwargs): |
245 | val = apply(stattoolc.wxToolBarBase_GetToolEnabled,(self,) + _args, _kwargs) | |
246 | return val | |
247 | def SetToolShortHelp(self, *_args, **_kwargs): | |
248 | val = apply(stattoolc.wxToolBarBase_SetToolShortHelp,(self,) + _args, _kwargs) | |
249 | return val | |
250 | def GetToolShortHelp(self, *_args, **_kwargs): | |
251 | val = apply(stattoolc.wxToolBarBase_GetToolShortHelp,(self,) + _args, _kwargs) | |
9c039d08 | 252 | return val |
1d99702e | 253 | def SetToolLongHelp(self, *_args, **_kwargs): |
9b3d3bc4 | 254 | val = apply(stattoolc.wxToolBarBase_SetToolLongHelp,(self,) + _args, _kwargs) |
9c039d08 | 255 | return val |
9b3d3bc4 RD |
256 | def GetToolLongHelp(self, *_args, **_kwargs): |
257 | val = apply(stattoolc.wxToolBarBase_GetToolLongHelp,(self,) + _args, _kwargs) | |
258 | return val | |
259 | def SetMarginsXY(self, *_args, **_kwargs): | |
260 | val = apply(stattoolc.wxToolBarBase_SetMarginsXY,(self,) + _args, _kwargs) | |
d5c9047a | 261 | return val |
1d99702e | 262 | def SetMargins(self, *_args, **_kwargs): |
9b3d3bc4 | 263 | val = apply(stattoolc.wxToolBarBase_SetMargins,(self,) + _args, _kwargs) |
d5c9047a | 264 | return val |
1d99702e | 265 | def SetToolPacking(self, *_args, **_kwargs): |
9b3d3bc4 | 266 | val = apply(stattoolc.wxToolBarBase_SetToolPacking,(self,) + _args, _kwargs) |
9c039d08 | 267 | return val |
1d99702e | 268 | def SetToolSeparation(self, *_args, **_kwargs): |
9b3d3bc4 | 269 | val = apply(stattoolc.wxToolBarBase_SetToolSeparation,(self,) + _args, _kwargs) |
9c039d08 | 270 | return val |
9b3d3bc4 RD |
271 | def GetToolMargins(self, *_args, **_kwargs): |
272 | val = apply(stattoolc.wxToolBarBase_GetToolMargins,(self,) + _args, _kwargs) | |
273 | if val: val = wxSizePtr(val) ; val.thisown = 1 | |
9c039d08 | 274 | return val |
5e40f9dd RD |
275 | def GetMargins(self, *_args, **_kwargs): |
276 | val = apply(stattoolc.wxToolBarBase_GetMargins,(self,) + _args, _kwargs) | |
277 | if val: val = wxSizePtr(val) ; val.thisown = 1 | |
278 | return val | |
9b3d3bc4 RD |
279 | def GetToolPacking(self, *_args, **_kwargs): |
280 | val = apply(stattoolc.wxToolBarBase_GetToolPacking,(self,) + _args, _kwargs) | |
281 | return val | |
282 | def GetToolSeparation(self, *_args, **_kwargs): | |
283 | val = apply(stattoolc.wxToolBarBase_GetToolSeparation,(self,) + _args, _kwargs) | |
284 | return val | |
285 | def SetRows(self, *_args, **_kwargs): | |
286 | val = apply(stattoolc.wxToolBarBase_SetRows,(self,) + _args, _kwargs) | |
6999b0d8 RD |
287 | return val |
288 | def SetMaxRowsCols(self, *_args, **_kwargs): | |
9b3d3bc4 | 289 | val = apply(stattoolc.wxToolBarBase_SetMaxRowsCols,(self,) + _args, _kwargs) |
6999b0d8 RD |
290 | return val |
291 | def GetMaxRows(self, *_args, **_kwargs): | |
9b3d3bc4 | 292 | val = apply(stattoolc.wxToolBarBase_GetMaxRows,(self,) + _args, _kwargs) |
6999b0d8 RD |
293 | return val |
294 | def GetMaxCols(self, *_args, **_kwargs): | |
9b3d3bc4 RD |
295 | val = apply(stattoolc.wxToolBarBase_GetMaxCols,(self,) + _args, _kwargs) |
296 | return val | |
297 | def SetToolBitmapSize(self, *_args, **_kwargs): | |
298 | val = apply(stattoolc.wxToolBarBase_SetToolBitmapSize,(self,) + _args, _kwargs) | |
299 | return val | |
300 | def GetToolBitmapSize(self, *_args, **_kwargs): | |
301 | val = apply(stattoolc.wxToolBarBase_GetToolBitmapSize,(self,) + _args, _kwargs) | |
302 | if val: val = wxSizePtr(val) ; val.thisown = 1 | |
303 | return val | |
304 | def GetToolSize(self, *_args, **_kwargs): | |
305 | val = apply(stattoolc.wxToolBarBase_GetToolSize,(self,) + _args, _kwargs) | |
306 | if val: val = wxSizePtr(val) ; val.thisown = 1 | |
307 | return val | |
f0972d1e RD |
308 | def FindToolForPosition(self, *_args, **_kwargs): |
309 | val = apply(stattoolc.wxToolBarBase_FindToolForPosition,(self,) + _args, _kwargs) | |
310 | return val | |
311 | def IsVertical(self, *_args, **_kwargs): | |
312 | val = apply(stattoolc.wxToolBarBase_IsVertical,(self,) + _args, _kwargs) | |
313 | return val | |
9b3d3bc4 RD |
314 | def __repr__(self): |
315 | return "<C wxToolBarBase instance at %s>" % (self.this,) | |
a323d3bd RD |
316 | |
317 | # These match the original Add methods for this class, kept for | |
318 | # backwards compatibility with versions < 2.3.3. | |
319 | ||
320 | ||
321 | def AddTool(self, id, bitmap, | |
322 | pushedBitmap = wxNullBitmap, | |
323 | isToggle = 0, | |
324 | clientData = None, | |
325 | shortHelpString = '', | |
326 | longHelpString = '') : | |
327 | '''Old style method to add a tool to the toolbar.''' | |
328 | kind = wx.wxITEM_NORMAL | |
329 | if isToggle: kind = wx.wxITEM_CHECK | |
330 | return self.DoAddTool(id, '', bitmap, pushedBitmap, kind, | |
331 | shortHelpString, longHelpString, clientData) | |
332 | ||
333 | def AddSimpleTool(self, id, bitmap, | |
334 | shortHelpString = '', | |
335 | longHelpString = '', | |
336 | isToggle = 0): | |
337 | '''Old style method to add a tool to the toolbar.''' | |
338 | kind = wx.wxITEM_NORMAL | |
339 | if isToggle: kind = wx.wxITEM_CHECK | |
340 | return self.DoAddTool(id, '', bitmap, wxNullBitmap, kind, | |
341 | shortHelpString, longHelpString, None) | |
342 | ||
343 | def InsertTool(self, pos, id, bitmap, | |
344 | pushedBitmap = wxNullBitmap, | |
345 | isToggle = 0, | |
346 | clientData = None, | |
347 | shortHelpString = '', | |
348 | longHelpString = ''): | |
349 | '''Old style method to insert a tool in the toolbar.''' | |
350 | kind = wx.wxITEM_NORMAL | |
351 | if isToggle: kind = wx.wxITEM_CHECK | |
352 | return self.DoInsertTool(pos, id, '', bitmap, pushedBitmap, kind, | |
353 | shortHelpString, longHelpString, clientData) | |
354 | ||
355 | def InsertSimpleTool(self, pos, id, bitmap, | |
356 | shortHelpString = '', | |
357 | longHelpString = '', | |
358 | isToggle = 0): | |
359 | '''Old style method to insert a tool in the toolbar.''' | |
360 | kind = wx.wxITEM_NORMAL | |
361 | if isToggle: kind = wx.wxITEM_CHECK | |
362 | return self.DoInsertTool(pos, id, '', bitmap, wxNullBitmap, kind, | |
363 | shortHelpString, longHelpString, None) | |
364 | ||
365 | ||
366 | # The following are the new toolbar Add methods starting with | |
367 | # 2.3.3. They are renamed to have 'Label' in the name so as to be | |
368 | # able to keep backwards compatibility with using the above | |
369 | # methods. Eventually these should migrate to be the methods used | |
370 | # primarily and loose the 'Label' in the name... | |
371 | ||
372 | def AddLabelTool(self, id, label, bitmap, | |
373 | bmpDisabled = wxNullBitmap, | |
374 | kind = wxITEM_NORMAL, | |
375 | shortHelp = '', longHelp = '', | |
376 | clientData = None): | |
377 | ''' | |
378 | The full AddTool() function. | |
379 | ||
380 | If bmpDisabled is wxNullBitmap, a shadowed version of the normal bitmap | |
381 | is created and used as the disabled image. | |
382 | ''' | |
383 | return self.DoAddTool(id, label, bitmap, bmpDisabled, kind, | |
384 | shortHelp, longHelp, clientData) | |
385 | ||
386 | ||
387 | def InsertLabelTool(self, pos, id, label, bitmap, | |
388 | bmpDisabled = wxNullBitmap, | |
389 | kind = wxITEM_NORMAL, | |
390 | shortHelp = '', longHelp = '', | |
391 | clientData = None): | |
392 | ''' | |
393 | Insert the new tool at the given position, if pos == GetToolsCount(), it | |
394 | is equivalent to AddTool() | |
395 | ''' | |
396 | return self.DoInsertTool(pos, id, label, bitmap, bmpDisabled, kind, | |
397 | shortHelp, longHelp, clientData) | |
398 | ||
399 | def AddCheckLabelTool(self, id, label, bitmap, | |
400 | bmpDisabled = wxNullBitmap, | |
401 | shortHelp = '', longHelp = '', | |
402 | clientData = None): | |
403 | '''Add a check tool, i.e. a tool which can be toggled''' | |
404 | return self.DoAddTool(id, label, bitmap, bmpDisabled, wx.wxITEM_CHECK, | |
405 | shortHelp, longHelp, clientData) | |
406 | ||
407 | def AddRadioLabelTool(self, id, label, bitmap, | |
408 | bmpDisabled = wxNullBitmap, | |
409 | shortHelp = '', longHelp = '', | |
410 | clientData = None): | |
411 | ''' | |
412 | Add a radio tool, i.e. a tool which can be toggled and releases any | |
413 | other toggled radio tools in the same group when it happens | |
414 | ''' | |
415 | return self.DoAddTool(id, label, bitmap, bmpDisabled, wx.wxITEM_RADIO, | |
416 | shortHelp, longHelp, clientData) | |
417 | ||
418 | ||
419 | # For consistency with the backwards compatible methods above, here are | |
420 | # some non-'Label' versions of the Check and Radio methods | |
421 | def AddCheckTool(self, id, bitmap, | |
422 | bmpDisabled = wxNullBitmap, | |
423 | shortHelp = '', longHelp = '', | |
424 | clientData = None): | |
425 | '''Add a check tool, i.e. a tool which can be toggled''' | |
426 | return self.DoAddTool(id, '', bitmap, bmpDisabled, wx.wxITEM_CHECK, | |
427 | shortHelp, longHelp, clientData) | |
428 | ||
429 | def AddRadioTool(self, id, bitmap, | |
430 | bmpDisabled = wxNullBitmap, | |
431 | shortHelp = '', longHelp = '', | |
432 | clientData = None): | |
433 | ''' | |
434 | Add a radio tool, i.e. a tool which can be toggled and releases any | |
435 | other toggled radio tools in the same group when it happens | |
436 | ''' | |
437 | return self.DoAddTool(id, '', bitmap, bmpDisabled, wx.wxITEM_RADIO, | |
438 | shortHelp, longHelp, clientData) | |
439 | ||
9b3d3bc4 RD |
440 | class wxToolBarBase(wxToolBarBasePtr): |
441 | def __init__(self,this): | |
442 | self.this = this | |
443 | ||
444 | ||
445 | ||
446 | ||
447 | class wxToolBarPtr(wxToolBarBasePtr): | |
448 | def __init__(self,this): | |
449 | self.this = this | |
450 | self.thisown = 0 | |
aa2a5b86 RD |
451 | def Create(self, *_args, **_kwargs): |
452 | val = apply(stattoolc.wxToolBar_Create,(self,) + _args, _kwargs) | |
453 | return val | |
9b3d3bc4 RD |
454 | def FindToolForPosition(self, *_args, **_kwargs): |
455 | val = apply(stattoolc.wxToolBar_FindToolForPosition,(self,) + _args, _kwargs) | |
6999b0d8 | 456 | return val |
9c039d08 | 457 | def __repr__(self): |
1d99702e | 458 | return "<C wxToolBar instance at %s>" % (self.this,) |
9c039d08 | 459 | class wxToolBar(wxToolBarPtr): |
1d99702e RD |
460 | def __init__(self,*_args,**_kwargs): |
461 | self.this = apply(stattoolc.new_wxToolBar,_args,_kwargs) | |
9c039d08 | 462 | self.thisown = 1 |
0220cbc1 | 463 | self._setOORInfo(self) |
9c039d08 RD |
464 | |
465 | ||
466 | ||
aa2a5b86 RD |
467 | def wxPreToolBar(*_args,**_kwargs): |
468 | val = wxToolBarPtr(apply(stattoolc.new_wxPreToolBar,_args,_kwargs)) | |
469 | val.thisown = 1 | |
17c0e08c | 470 | val._setOORInfo(val) |
aa2a5b86 RD |
471 | return val |
472 | ||
9c039d08 | 473 | |
9b3d3bc4 RD |
474 | class wxToolBarSimplePtr(wxToolBarBasePtr): |
475 | def __init__(self,this): | |
476 | self.this = this | |
477 | self.thisown = 0 | |
aa2a5b86 RD |
478 | def Create(self, *_args, **_kwargs): |
479 | val = apply(stattoolc.wxToolBarSimple_Create,(self,) + _args, _kwargs) | |
480 | return val | |
9b3d3bc4 RD |
481 | def FindToolForPosition(self, *_args, **_kwargs): |
482 | val = apply(stattoolc.wxToolBarSimple_FindToolForPosition,(self,) + _args, _kwargs) | |
9b3d3bc4 RD |
483 | return val |
484 | def __repr__(self): | |
485 | return "<C wxToolBarSimple instance at %s>" % (self.this,) | |
486 | class wxToolBarSimple(wxToolBarSimplePtr): | |
487 | def __init__(self,*_args,**_kwargs): | |
488 | self.this = apply(stattoolc.new_wxToolBarSimple,_args,_kwargs) | |
489 | self.thisown = 1 | |
0220cbc1 | 490 | self._setOORInfo(self) |
9b3d3bc4 RD |
491 | |
492 | ||
493 | ||
aa2a5b86 RD |
494 | def wxPreToolBarSimple(*_args,**_kwargs): |
495 | val = wxToolBarSimplePtr(apply(stattoolc.new_wxPreToolBarSimple,_args,_kwargs)) | |
496 | val.thisown = 1 | |
17c0e08c | 497 | val._setOORInfo(val) |
aa2a5b86 RD |
498 | return val |
499 | ||
9b3d3bc4 | 500 | |
9c039d08 RD |
501 | |
502 | ||
503 | #-------------- FUNCTION WRAPPERS ------------------ | |
504 | ||
505 | ||
506 | ||
507 | #-------------- VARIABLE WRAPPERS ------------------ | |
508 | ||
9b3d3bc4 RD |
509 | wxTOOL_STYLE_BUTTON = stattoolc.wxTOOL_STYLE_BUTTON |
510 | wxTOOL_STYLE_SEPARATOR = stattoolc.wxTOOL_STYLE_SEPARATOR | |
511 | wxTOOL_STYLE_CONTROL = stattoolc.wxTOOL_STYLE_CONTROL |