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