1 # This file was created automatically by SWIG.
10 from clip_dnd
import *
12 from controls
import *
16 wxITEM_NORMAL
= 0 # predeclare this since wx isn't fully imported yet
17 class wxStatusBarPtr(wxWindowPtr
):
18 def __init__(self
,this
):
21 def Create(self
, *_args
, **_kwargs
):
22 val
= apply(stattoolc
.wxStatusBar_Create
,(self
,) + _args
, _kwargs
)
24 def GetFieldRect(self
, *_args
, **_kwargs
):
25 val
= apply(stattoolc
.wxStatusBar_GetFieldRect
,(self
,) + _args
, _kwargs
)
26 if val
: val
= wxRectPtr(val
) ; val
.thisown
= 1
28 def GetFieldsCount(self
, *_args
, **_kwargs
):
29 val
= apply(stattoolc
.wxStatusBar_GetFieldsCount
,(self
,) + _args
, _kwargs
)
31 def GetStatusText(self
, *_args
, **_kwargs
):
32 val
= apply(stattoolc
.wxStatusBar_GetStatusText
,(self
,) + _args
, _kwargs
)
34 def GetBorderX(self
, *_args
, **_kwargs
):
35 val
= apply(stattoolc
.wxStatusBar_GetBorderX
,(self
,) + _args
, _kwargs
)
37 def GetBorderY(self
, *_args
, **_kwargs
):
38 val
= apply(stattoolc
.wxStatusBar_GetBorderY
,(self
,) + _args
, _kwargs
)
40 def SetFieldsCount(self
, *_args
, **_kwargs
):
41 val
= apply(stattoolc
.wxStatusBar_SetFieldsCount
,(self
,) + _args
, _kwargs
)
43 def SetStatusText(self
, *_args
, **_kwargs
):
44 val
= apply(stattoolc
.wxStatusBar_SetStatusText
,(self
,) + _args
, _kwargs
)
46 def SetStatusWidths(self
, *_args
, **_kwargs
):
47 val
= apply(stattoolc
.wxStatusBar_SetStatusWidths
,(self
,) + _args
, _kwargs
)
49 def SetMinHeight(self
, *_args
, **_kwargs
):
50 val
= apply(stattoolc
.wxStatusBar_SetMinHeight
,(self
,) + _args
, _kwargs
)
53 return "<C wxStatusBar instance at %s>" % (self
.this
,)
54 class wxStatusBar(wxStatusBarPtr
):
55 def __init__(self
,*_args
,**_kwargs
):
56 self
.this
= apply(stattoolc
.new_wxStatusBar
,_args
,_kwargs
)
58 self
._setOORInfo
(self
)
62 def wxPreStatusBar(*_args
,**_kwargs
):
63 val
= wxStatusBarPtr(apply(stattoolc
.new_wxPreStatusBar
,_args
,_kwargs
))
69 class wxToolBarToolBasePtr(wxObjectPtr
):
70 def __init__(self
,this
):
73 def Destroy(self
, *_args
, **_kwargs
):
74 val
= apply(stattoolc
.wxToolBarToolBase_Destroy
,(self
,) + _args
, _kwargs
)
76 def GetId(self
, *_args
, **_kwargs
):
77 val
= apply(stattoolc
.wxToolBarToolBase_GetId
,(self
,) + _args
, _kwargs
)
79 def GetControl(self
, *_args
, **_kwargs
):
80 val
= apply(stattoolc
.wxToolBarToolBase_GetControl
,(self
,) + _args
, _kwargs
)
82 def GetToolBar(self
, *_args
, **_kwargs
):
83 val
= apply(stattoolc
.wxToolBarToolBase_GetToolBar
,(self
,) + _args
, _kwargs
)
85 def IsButton(self
, *_args
, **_kwargs
):
86 val
= apply(stattoolc
.wxToolBarToolBase_IsButton
,(self
,) + _args
, _kwargs
)
88 def IsControl(self
, *_args
, **_kwargs
):
89 val
= apply(stattoolc
.wxToolBarToolBase_IsControl
,(self
,) + _args
, _kwargs
)
91 def IsSeparator(self
, *_args
, **_kwargs
):
92 val
= apply(stattoolc
.wxToolBarToolBase_IsSeparator
,(self
,) + _args
, _kwargs
)
94 def GetStyle(self
, *_args
, **_kwargs
):
95 val
= apply(stattoolc
.wxToolBarToolBase_GetStyle
,(self
,) + _args
, _kwargs
)
97 def GetKind(self
, *_args
, **_kwargs
):
98 val
= apply(stattoolc
.wxToolBarToolBase_GetKind
,(self
,) + _args
, _kwargs
)
100 def IsEnabled(self
, *_args
, **_kwargs
):
101 val
= apply(stattoolc
.wxToolBarToolBase_IsEnabled
,(self
,) + _args
, _kwargs
)
103 def IsToggled(self
, *_args
, **_kwargs
):
104 val
= apply(stattoolc
.wxToolBarToolBase_IsToggled
,(self
,) + _args
, _kwargs
)
106 def CanBeToggled(self
, *_args
, **_kwargs
):
107 val
= apply(stattoolc
.wxToolBarToolBase_CanBeToggled
,(self
,) + _args
, _kwargs
)
109 def GetNormalBitmap(self
, *_args
, **_kwargs
):
110 val
= apply(stattoolc
.wxToolBarToolBase_GetNormalBitmap
,(self
,) + _args
, _kwargs
)
111 if val
: val
= wxBitmapPtr(val
)
113 def GetDisabledBitmap(self
, *_args
, **_kwargs
):
114 val
= apply(stattoolc
.wxToolBarToolBase_GetDisabledBitmap
,(self
,) + _args
, _kwargs
)
115 if val
: val
= wxBitmapPtr(val
)
117 def GetBitmap(self
, *_args
, **_kwargs
):
118 val
= apply(stattoolc
.wxToolBarToolBase_GetBitmap
,(self
,) + _args
, _kwargs
)
119 if val
: val
= wxBitmapPtr(val
) ; val
.thisown
= 1
121 def GetLabel(self
, *_args
, **_kwargs
):
122 val
= apply(stattoolc
.wxToolBarToolBase_GetLabel
,(self
,) + _args
, _kwargs
)
124 def GetShortHelp(self
, *_args
, **_kwargs
):
125 val
= apply(stattoolc
.wxToolBarToolBase_GetShortHelp
,(self
,) + _args
, _kwargs
)
127 def GetLongHelp(self
, *_args
, **_kwargs
):
128 val
= apply(stattoolc
.wxToolBarToolBase_GetLongHelp
,(self
,) + _args
, _kwargs
)
130 def Enable(self
, *_args
, **_kwargs
):
131 val
= apply(stattoolc
.wxToolBarToolBase_Enable
,(self
,) + _args
, _kwargs
)
133 def Toggle(self
, *_args
, **_kwargs
):
134 val
= apply(stattoolc
.wxToolBarToolBase_Toggle
,(self
,) + _args
, _kwargs
)
136 def SetToggle(self
, *_args
, **_kwargs
):
137 val
= apply(stattoolc
.wxToolBarToolBase_SetToggle
,(self
,) + _args
, _kwargs
)
139 def SetShortHelp(self
, *_args
, **_kwargs
):
140 val
= apply(stattoolc
.wxToolBarToolBase_SetShortHelp
,(self
,) + _args
, _kwargs
)
142 def SetLongHelp(self
, *_args
, **_kwargs
):
143 val
= apply(stattoolc
.wxToolBarToolBase_SetLongHelp
,(self
,) + _args
, _kwargs
)
145 def SetNormalBitmap(self
, *_args
, **_kwargs
):
146 val
= apply(stattoolc
.wxToolBarToolBase_SetNormalBitmap
,(self
,) + _args
, _kwargs
)
148 def SetDisabledBitmap(self
, *_args
, **_kwargs
):
149 val
= apply(stattoolc
.wxToolBarToolBase_SetDisabledBitmap
,(self
,) + _args
, _kwargs
)
151 def SetLabel(self
, *_args
, **_kwargs
):
152 val
= apply(stattoolc
.wxToolBarToolBase_SetLabel
,(self
,) + _args
, _kwargs
)
154 def Detach(self
, *_args
, **_kwargs
):
155 val
= apply(stattoolc
.wxToolBarToolBase_Detach
,(self
,) + _args
, _kwargs
)
157 def Attach(self
, *_args
, **_kwargs
):
158 val
= apply(stattoolc
.wxToolBarToolBase_Attach
,(self
,) + _args
, _kwargs
)
160 def GetClientData(self
, *_args
, **_kwargs
):
161 val
= apply(stattoolc
.wxToolBarToolBase_GetClientData
,(self
,) + _args
, _kwargs
)
163 def SetClientData(self
, *_args
, **_kwargs
):
164 val
= apply(stattoolc
.wxToolBarToolBase_SetClientData
,(self
,) + _args
, _kwargs
)
167 return "<C wxToolBarToolBase instance at %s>" % (self
.this
,)
169 GetBitmap1
= GetNormalBitmap
170 GetBitmap2
= GetDisabledBitmap
171 SetBitmap1
= SetNormalBitmap
172 SetBitmap2
= SetDisabledBitmap
174 class wxToolBarToolBase(wxToolBarToolBasePtr
):
175 def __init__(self
,this
):
181 class wxToolBarBasePtr(wxControlPtr
):
182 def __init__(self
,this
):
185 def DoAddTool(self
, *_args
, **_kwargs
):
186 val
= apply(stattoolc
.wxToolBarBase_DoAddTool
,(self
,) + _args
, _kwargs
)
188 def InsertTool(self
, *_args
, **_kwargs
):
189 val
= apply(stattoolc
.wxToolBarBase_InsertTool
,(self
,) + _args
, _kwargs
)
191 def AddControl(self
, *_args
, **_kwargs
):
192 val
= apply(stattoolc
.wxToolBarBase_AddControl
,(self
,) + _args
, _kwargs
)
194 def InsertControl(self
, *_args
, **_kwargs
):
195 val
= apply(stattoolc
.wxToolBarBase_InsertControl
,(self
,) + _args
, _kwargs
)
197 def AddSeparator(self
, *_args
, **_kwargs
):
198 val
= apply(stattoolc
.wxToolBarBase_AddSeparator
,(self
,) + _args
, _kwargs
)
200 def InsertSeparator(self
, *_args
, **_kwargs
):
201 val
= apply(stattoolc
.wxToolBarBase_InsertSeparator
,(self
,) + _args
, _kwargs
)
203 def RemoveTool(self
, *_args
, **_kwargs
):
204 val
= apply(stattoolc
.wxToolBarBase_RemoveTool
,(self
,) + _args
, _kwargs
)
206 def DeleteToolByPos(self
, *_args
, **_kwargs
):
207 val
= apply(stattoolc
.wxToolBarBase_DeleteToolByPos
,(self
,) + _args
, _kwargs
)
209 def DeleteTool(self
, *_args
, **_kwargs
):
210 val
= apply(stattoolc
.wxToolBarBase_DeleteTool
,(self
,) + _args
, _kwargs
)
212 def ClearTools(self
, *_args
, **_kwargs
):
213 val
= apply(stattoolc
.wxToolBarBase_ClearTools
,(self
,) + _args
, _kwargs
)
215 def Realize(self
, *_args
, **_kwargs
):
216 val
= apply(stattoolc
.wxToolBarBase_Realize
,(self
,) + _args
, _kwargs
)
218 def EnableTool(self
, *_args
, **_kwargs
):
219 val
= apply(stattoolc
.wxToolBarBase_EnableTool
,(self
,) + _args
, _kwargs
)
221 def ToggleTool(self
, *_args
, **_kwargs
):
222 val
= apply(stattoolc
.wxToolBarBase_ToggleTool
,(self
,) + _args
, _kwargs
)
224 def SetToggle(self
, *_args
, **_kwargs
):
225 val
= apply(stattoolc
.wxToolBarBase_SetToggle
,(self
,) + _args
, _kwargs
)
227 def GetToolClientData(self
, *_args
, **_kwargs
):
228 val
= apply(stattoolc
.wxToolBarBase_GetToolClientData
,(self
,) + _args
, _kwargs
)
230 def SetToolClientData(self
, *_args
, **_kwargs
):
231 val
= apply(stattoolc
.wxToolBarBase_SetToolClientData
,(self
,) + _args
, _kwargs
)
233 def GetToolState(self
, *_args
, **_kwargs
):
234 val
= apply(stattoolc
.wxToolBarBase_GetToolState
,(self
,) + _args
, _kwargs
)
236 def GetToolEnabled(self
, *_args
, **_kwargs
):
237 val
= apply(stattoolc
.wxToolBarBase_GetToolEnabled
,(self
,) + _args
, _kwargs
)
239 def SetToolShortHelp(self
, *_args
, **_kwargs
):
240 val
= apply(stattoolc
.wxToolBarBase_SetToolShortHelp
,(self
,) + _args
, _kwargs
)
242 def GetToolShortHelp(self
, *_args
, **_kwargs
):
243 val
= apply(stattoolc
.wxToolBarBase_GetToolShortHelp
,(self
,) + _args
, _kwargs
)
245 def SetToolLongHelp(self
, *_args
, **_kwargs
):
246 val
= apply(stattoolc
.wxToolBarBase_SetToolLongHelp
,(self
,) + _args
, _kwargs
)
248 def GetToolLongHelp(self
, *_args
, **_kwargs
):
249 val
= apply(stattoolc
.wxToolBarBase_GetToolLongHelp
,(self
,) + _args
, _kwargs
)
251 def SetMarginsXY(self
, *_args
, **_kwargs
):
252 val
= apply(stattoolc
.wxToolBarBase_SetMarginsXY
,(self
,) + _args
, _kwargs
)
254 def SetMargins(self
, *_args
, **_kwargs
):
255 val
= apply(stattoolc
.wxToolBarBase_SetMargins
,(self
,) + _args
, _kwargs
)
257 def SetToolPacking(self
, *_args
, **_kwargs
):
258 val
= apply(stattoolc
.wxToolBarBase_SetToolPacking
,(self
,) + _args
, _kwargs
)
260 def SetToolSeparation(self
, *_args
, **_kwargs
):
261 val
= apply(stattoolc
.wxToolBarBase_SetToolSeparation
,(self
,) + _args
, _kwargs
)
263 def GetToolMargins(self
, *_args
, **_kwargs
):
264 val
= apply(stattoolc
.wxToolBarBase_GetToolMargins
,(self
,) + _args
, _kwargs
)
265 if val
: val
= wxSizePtr(val
) ; val
.thisown
= 1
267 def GetMargins(self
, *_args
, **_kwargs
):
268 val
= apply(stattoolc
.wxToolBarBase_GetMargins
,(self
,) + _args
, _kwargs
)
269 if val
: val
= wxSizePtr(val
) ; val
.thisown
= 1
271 def GetToolPacking(self
, *_args
, **_kwargs
):
272 val
= apply(stattoolc
.wxToolBarBase_GetToolPacking
,(self
,) + _args
, _kwargs
)
274 def GetToolSeparation(self
, *_args
, **_kwargs
):
275 val
= apply(stattoolc
.wxToolBarBase_GetToolSeparation
,(self
,) + _args
, _kwargs
)
277 def SetRows(self
, *_args
, **_kwargs
):
278 val
= apply(stattoolc
.wxToolBarBase_SetRows
,(self
,) + _args
, _kwargs
)
280 def SetMaxRowsCols(self
, *_args
, **_kwargs
):
281 val
= apply(stattoolc
.wxToolBarBase_SetMaxRowsCols
,(self
,) + _args
, _kwargs
)
283 def GetMaxRows(self
, *_args
, **_kwargs
):
284 val
= apply(stattoolc
.wxToolBarBase_GetMaxRows
,(self
,) + _args
, _kwargs
)
286 def GetMaxCols(self
, *_args
, **_kwargs
):
287 val
= apply(stattoolc
.wxToolBarBase_GetMaxCols
,(self
,) + _args
, _kwargs
)
289 def SetToolBitmapSize(self
, *_args
, **_kwargs
):
290 val
= apply(stattoolc
.wxToolBarBase_SetToolBitmapSize
,(self
,) + _args
, _kwargs
)
292 def GetToolBitmapSize(self
, *_args
, **_kwargs
):
293 val
= apply(stattoolc
.wxToolBarBase_GetToolBitmapSize
,(self
,) + _args
, _kwargs
)
294 if val
: val
= wxSizePtr(val
) ; val
.thisown
= 1
296 def GetToolSize(self
, *_args
, **_kwargs
):
297 val
= apply(stattoolc
.wxToolBarBase_GetToolSize
,(self
,) + _args
, _kwargs
)
298 if val
: val
= wxSizePtr(val
) ; val
.thisown
= 1
300 def FindToolForPosition(self
, *_args
, **_kwargs
):
301 val
= apply(stattoolc
.wxToolBarBase_FindToolForPosition
,(self
,) + _args
, _kwargs
)
303 def IsVertical(self
, *_args
, **_kwargs
):
304 val
= apply(stattoolc
.wxToolBarBase_IsVertical
,(self
,) + _args
, _kwargs
)
307 return "<C wxToolBarBase instance at %s>" % (self
.this
,)
309 # These match the original Add methods for this class, kept for
310 # backwards compatibility with versions < 2.3.3.
313 def AddTool(self
, id, bitmap
,
314 pushedBitmap
= wxNullBitmap
,
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
)
325 def AddSimpleTool(self
, id, bitmap
,
326 shortHelpString
= '',
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)
335 def InsertTool(self
, pos
, id, bitmap
,
336 pushedBitmap
= wxNullBitmap
,
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
)
347 def InsertSimpleTool(self
, pos
, id, bitmap
,
348 shortHelpString
= '',
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)
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...
364 def AddLabelTool(self
, id, label
, bitmap
,
365 bmpDisabled
= wxNullBitmap
,
366 kind
= wxITEM_NORMAL
,
367 shortHelp
= '', longHelp
= '',
370 The full AddTool() function.
372 If bmpDisabled is wxNullBitmap, a shadowed version of the normal bitmap
373 is created and used as the disabled image.
375 return self
.DoAddTool(id, label
, bitmap
, bmpDisabled
, kind
,
376 shortHelp
, longHelp
, clientData
)
379 def InsertLabelTool(self
, pos
, id, label
, bitmap
,
380 bmpDisabled
= wxNullBitmap
,
381 kind
= wxITEM_NORMAL
,
382 shortHelp
= '', longHelp
= '',
385 Insert the new tool at the given position, if pos == GetToolsCount(), it
386 is equivalent to AddTool()
388 return self
.DoInsertTool(pos
, id, label
, bitmap
, bmpDisabled
, kind
,
389 shortHelp
, longHelp
, clientData
)
391 def AddCheckLabelTool(self
, id, label
, bitmap
,
392 bmpDisabled
= wxNullBitmap
,
393 shortHelp
= '', longHelp
= '',
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
)
399 def AddRadioLabelTool(self
, id, label
, bitmap
,
400 bmpDisabled
= wxNullBitmap
,
401 shortHelp
= '', longHelp
= '',
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
407 return self
.DoAddTool(id, label
, bitmap
, bmpDisabled
, wx
.wxITEM_RADIO
,
408 shortHelp
, longHelp
, clientData
)
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
= '',
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
)
421 def AddRadioTool(self
, id, bitmap
,
422 bmpDisabled
= wxNullBitmap
,
423 shortHelp
= '', longHelp
= '',
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
429 return self
.DoAddTool(id, '', bitmap
, bmpDisabled
, wx
.wxITEM_RADIO
,
430 shortHelp
, longHelp
, clientData
)
432 class wxToolBarBase(wxToolBarBasePtr
):
433 def __init__(self
,this
):
439 class wxToolBarPtr(wxToolBarBasePtr
):
440 def __init__(self
,this
):
443 def Create(self
, *_args
, **_kwargs
):
444 val
= apply(stattoolc
.wxToolBar_Create
,(self
,) + _args
, _kwargs
)
446 def FindToolForPosition(self
, *_args
, **_kwargs
):
447 val
= apply(stattoolc
.wxToolBar_FindToolForPosition
,(self
,) + _args
, _kwargs
)
450 return "<C wxToolBar instance at %s>" % (self
.this
,)
451 class wxToolBar(wxToolBarPtr
):
452 def __init__(self
,*_args
,**_kwargs
):
453 self
.this
= apply(stattoolc
.new_wxToolBar
,_args
,_kwargs
)
455 self
._setOORInfo
(self
)
459 def wxPreToolBar(*_args
,**_kwargs
):
460 val
= wxToolBarPtr(apply(stattoolc
.new_wxPreToolBar
,_args
,_kwargs
))
466 class wxToolBarSimplePtr(wxToolBarBasePtr
):
467 def __init__(self
,this
):
470 def Create(self
, *_args
, **_kwargs
):
471 val
= apply(stattoolc
.wxToolBarSimple_Create
,(self
,) + _args
, _kwargs
)
473 def FindToolForPosition(self
, *_args
, **_kwargs
):
474 val
= apply(stattoolc
.wxToolBarSimple_FindToolForPosition
,(self
,) + _args
, _kwargs
)
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
)
482 self
._setOORInfo
(self
)
486 def wxPreToolBarSimple(*_args
,**_kwargs
):
487 val
= wxToolBarSimplePtr(apply(stattoolc
.new_wxPreToolBarSimple
,_args
,_kwargs
))
495 #-------------- FUNCTION WRAPPERS ------------------
499 #-------------- VARIABLE WRAPPERS ------------------
501 wxTOOL_STYLE_BUTTON
= stattoolc
.wxTOOL_STYLE_BUTTON
502 wxTOOL_STYLE_SEPARATOR
= stattoolc
.wxTOOL_STYLE_SEPARATOR
503 wxTOOL_STYLE_CONTROL
= stattoolc
.wxTOOL_STYLE_CONTROL