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