]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/msw/wx.py
clarified legal stuff
[wxWidgets.git] / wxPython / src / msw / wx.py
CommitLineData
b8b8dda7
RD
1# This file was created automatically by SWIG.
2import wxc
3
4from misc import *
5
bb0054cd
RD
6from misc2 import *
7
b8b8dda7
RD
8from windows import *
9
10from gdi import *
11
b1462dfa
RD
12from clip_dnd import *
13
b8b8dda7
RD
14from events import *
15
c368d904
RD
16from streams import *
17
181526ac
RD
18from utils import *
19
b8b8dda7
RD
20from mdi import *
21
22from frames import *
23
24from stattool import *
25
26from controls import *
27
28from controls2 import *
29
30from windows2 import *
31
32from cmndlgs import *
33
08127323
RD
34from windows3 import *
35
cf694132 36from image import *
bb0054cd
RD
37
38from printfw import *
2f90df85
RD
39
40from sizers import *
c368d904
RD
41
42from filesys import *
b8b8dda7
RD
43class wxPyAppPtr(wxEvtHandlerPtr):
44 def __init__(self,this):
45 self.this = this
46 self.thisown = 0
1d99702e 47 def __del__(self,wxc=wxc):
8bf5d46e 48 if self.thisown == 1 :
1d99702e
RD
49 wxc.delete_wxPyApp(self)
50 def GetAppName(self, *_args, **_kwargs):
51 val = apply(wxc.wxPyApp_GetAppName,(self,) + _args, _kwargs)
b8b8dda7 52 return val
1d99702e
RD
53 def GetAuto3D(self, *_args, **_kwargs):
54 val = apply(wxc.wxPyApp_GetAuto3D,(self,) + _args, _kwargs)
b8b8dda7 55 return val
1d99702e
RD
56 def GetClassName(self, *_args, **_kwargs):
57 val = apply(wxc.wxPyApp_GetClassName,(self,) + _args, _kwargs)
b8b8dda7 58 return val
1d99702e
RD
59 def GetExitOnFrameDelete(self, *_args, **_kwargs):
60 val = apply(wxc.wxPyApp_GetExitOnFrameDelete,(self,) + _args, _kwargs)
b8b8dda7 61 return val
1d99702e
RD
62 def GetPrintMode(self, *_args, **_kwargs):
63 val = apply(wxc.wxPyApp_GetPrintMode,(self,) + _args, _kwargs)
b8b8dda7 64 return val
1d99702e
RD
65 def GetTopWindow(self, *_args, **_kwargs):
66 val = apply(wxc.wxPyApp_GetTopWindow,(self,) + _args, _kwargs)
b8b8dda7 67 return val
1d99702e
RD
68 def GetVendorName(self, *_args, **_kwargs):
69 val = apply(wxc.wxPyApp_GetVendorName,(self,) + _args, _kwargs)
b8b8dda7 70 return val
f6bcfd97
BP
71 def GetUseBestVisual(self, *_args, **_kwargs):
72 val = apply(wxc.wxPyApp_GetUseBestVisual,(self,) + _args, _kwargs)
73 return val
1d99702e
RD
74 def Dispatch(self, *_args, **_kwargs):
75 val = apply(wxc.wxPyApp_Dispatch,(self,) + _args, _kwargs)
b8b8dda7 76 return val
1d99702e
RD
77 def ExitMainLoop(self, *_args, **_kwargs):
78 val = apply(wxc.wxPyApp_ExitMainLoop,(self,) + _args, _kwargs)
b8b8dda7 79 return val
1d99702e
RD
80 def Initialized(self, *_args, **_kwargs):
81 val = apply(wxc.wxPyApp_Initialized,(self,) + _args, _kwargs)
b8b8dda7 82 return val
1d99702e
RD
83 def MainLoop(self, *_args, **_kwargs):
84 val = apply(wxc.wxPyApp_MainLoop,(self,) + _args, _kwargs)
b8b8dda7 85 return val
1d99702e
RD
86 def Pending(self, *_args, **_kwargs):
87 val = apply(wxc.wxPyApp_Pending,(self,) + _args, _kwargs)
b8b8dda7 88 return val
1d99702e
RD
89 def ProcessIdle(self, *_args, **_kwargs):
90 val = apply(wxc.wxPyApp_ProcessIdle,(self,) + _args, _kwargs)
8bf5d46e 91 return val
1d99702e
RD
92 def SetAppName(self, *_args, **_kwargs):
93 val = apply(wxc.wxPyApp_SetAppName,(self,) + _args, _kwargs)
b8b8dda7 94 return val
1d99702e
RD
95 def SetAuto3D(self, *_args, **_kwargs):
96 val = apply(wxc.wxPyApp_SetAuto3D,(self,) + _args, _kwargs)
b8b8dda7 97 return val
1d99702e
RD
98 def SetClassName(self, *_args, **_kwargs):
99 val = apply(wxc.wxPyApp_SetClassName,(self,) + _args, _kwargs)
b8b8dda7 100 return val
1d99702e
RD
101 def SetExitOnFrameDelete(self, *_args, **_kwargs):
102 val = apply(wxc.wxPyApp_SetExitOnFrameDelete,(self,) + _args, _kwargs)
b8b8dda7 103 return val
1d99702e
RD
104 def SetPrintMode(self, *_args, **_kwargs):
105 val = apply(wxc.wxPyApp_SetPrintMode,(self,) + _args, _kwargs)
b8b8dda7 106 return val
1d99702e
RD
107 def SetTopWindow(self, *_args, **_kwargs):
108 val = apply(wxc.wxPyApp_SetTopWindow,(self,) + _args, _kwargs)
b8b8dda7 109 return val
1d99702e
RD
110 def SetVendorName(self, *_args, **_kwargs):
111 val = apply(wxc.wxPyApp_SetVendorName,(self,) + _args, _kwargs)
b8b8dda7 112 return val
f6bcfd97
BP
113 def SetUseBestVisual(self, *_args, **_kwargs):
114 val = apply(wxc.wxPyApp_SetUseBestVisual,(self,) + _args, _kwargs)
115 return val
1d99702e
RD
116 def GetStdIcon(self, *_args, **_kwargs):
117 val = apply(wxc.wxPyApp_GetStdIcon,(self,) + _args, _kwargs)
118 if val: val = wxIconPtr(val) ; val.thisown = 1
b8b8dda7
RD
119 return val
120 def __repr__(self):
1d99702e 121 return "<C wxPyApp instance at %s>" % (self.this,)
b8b8dda7 122class wxPyApp(wxPyAppPtr):
1d99702e
RD
123 def __init__(self,*_args,**_kwargs):
124 self.this = apply(wxc.new_wxPyApp,_args,_kwargs)
b8b8dda7
RD
125 self.thisown = 1
126
127
128
129
130
131
132#-------------- FUNCTION WRAPPERS ------------------
133
8bf5d46e
RD
134ptrcast = wxc.ptrcast
135
136ptrvalue = wxc.ptrvalue
137
138ptrset = wxc.ptrset
139
140ptrcreate = wxc.ptrcreate
141
142ptrfree = wxc.ptrfree
143
144ptradd = wxc.ptradd
145
146ptrmap = wxc.ptrmap
147
b8b8dda7
RD
148_wxStart = wxc._wxStart
149
150_wxSetDictionary = wxc._wxSetDictionary
151
c368d904
RD
152def wxGetApp(*_args, **_kwargs):
153 val = apply(wxc.wxGetApp,_args,_kwargs)
154 if val: val = wxPyAppPtr(val)
155 return val
156
b1462dfa
RD
157wxApp_CleanUp = wxc.wxApp_CleanUp
158
b8b8dda7
RD
159
160
161#-------------- VARIABLE WRAPPERS ------------------
162
163wxMAJOR_VERSION = wxc.wxMAJOR_VERSION
164wxMINOR_VERSION = wxc.wxMINOR_VERSION
165wxRELEASE_NUMBER = wxc.wxRELEASE_NUMBER
08127323 166wxNOT_FOUND = wxc.wxNOT_FOUND
b8b8dda7
RD
167wxVSCROLL = wxc.wxVSCROLL
168wxHSCROLL = wxc.wxHSCROLL
169wxCAPTION = wxc.wxCAPTION
170wxDOUBLE_BORDER = wxc.wxDOUBLE_BORDER
171wxSUNKEN_BORDER = wxc.wxSUNKEN_BORDER
172wxRAISED_BORDER = wxc.wxRAISED_BORDER
173wxBORDER = wxc.wxBORDER
174wxSIMPLE_BORDER = wxc.wxSIMPLE_BORDER
175wxSTATIC_BORDER = wxc.wxSTATIC_BORDER
176wxTRANSPARENT_WINDOW = wxc.wxTRANSPARENT_WINDOW
177wxNO_BORDER = wxc.wxNO_BORDER
178wxUSER_COLOURS = wxc.wxUSER_COLOURS
179wxNO_3D = wxc.wxNO_3D
180wxTAB_TRAVERSAL = wxc.wxTAB_TRAVERSAL
1afc06c2 181wxWANTS_CHARS = wxc.wxWANTS_CHARS
0122b7e3 182wxPOPUP_WINDOW = wxc.wxPOPUP_WINDOW
b8b8dda7
RD
183wxHORIZONTAL = wxc.wxHORIZONTAL
184wxVERTICAL = wxc.wxVERTICAL
185wxBOTH = wxc.wxBOTH
186wxCENTER_FRAME = wxc.wxCENTER_FRAME
1afc06c2
RD
187wxCENTRE_ON_SCREEN = wxc.wxCENTRE_ON_SCREEN
188wxCENTER_ON_SCREEN = wxc.wxCENTER_ON_SCREEN
b8b8dda7
RD
189wxSTAY_ON_TOP = wxc.wxSTAY_ON_TOP
190wxICONIZE = wxc.wxICONIZE
191wxMINIMIZE = wxc.wxMINIMIZE
192wxMAXIMIZE = wxc.wxMAXIMIZE
193wxTHICK_FRAME = wxc.wxTHICK_FRAME
194wxSYSTEM_MENU = wxc.wxSYSTEM_MENU
195wxMINIMIZE_BOX = wxc.wxMINIMIZE_BOX
196wxMAXIMIZE_BOX = wxc.wxMAXIMIZE_BOX
197wxTINY_CAPTION_HORIZ = wxc.wxTINY_CAPTION_HORIZ
198wxTINY_CAPTION_VERT = wxc.wxTINY_CAPTION_VERT
199wxRESIZE_BOX = wxc.wxRESIZE_BOX
200wxRESIZE_BORDER = wxc.wxRESIZE_BORDER
201wxDIALOG_MODAL = wxc.wxDIALOG_MODAL
202wxDIALOG_MODELESS = wxc.wxDIALOG_MODELESS
d56cebe7 203wxDIALOG_NO_PARENT = wxc.wxDIALOG_NO_PARENT
b8b8dda7
RD
204wxDEFAULT_FRAME_STYLE = wxc.wxDEFAULT_FRAME_STYLE
205wxDEFAULT_DIALOG_STYLE = wxc.wxDEFAULT_DIALOG_STYLE
206wxFRAME_TOOL_WINDOW = wxc.wxFRAME_TOOL_WINDOW
bb0054cd 207wxFRAME_FLOAT_ON_PARENT = wxc.wxFRAME_FLOAT_ON_PARENT
4c9993c3 208wxFRAME_NO_WINDOW_MENU = wxc.wxFRAME_NO_WINDOW_MENU
1b62f00d 209wxFRAME_NO_TASKBAR = wxc.wxFRAME_NO_TASKBAR
1afc06c2
RD
210wxED_CLIENT_MARGIN = wxc.wxED_CLIENT_MARGIN
211wxED_BUTTONS_BOTTOM = wxc.wxED_BUTTONS_BOTTOM
212wxED_BUTTONS_RIGHT = wxc.wxED_BUTTONS_RIGHT
213wxED_STATIC_LINE = wxc.wxED_STATIC_LINE
214wxEXT_DIALOG_STYLE = wxc.wxEXT_DIALOG_STYLE
08127323 215wxCLIP_CHILDREN = wxc.wxCLIP_CHILDREN
0adbc166 216wxCLIP_SIBLINGS = wxc.wxCLIP_SIBLINGS
b8b8dda7
RD
217wxRETAINED = wxc.wxRETAINED
218wxBACKINGSTORE = wxc.wxBACKINGSTORE
219wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS
220wxTB_HORIZONTAL = wxc.wxTB_HORIZONTAL
221wxTB_VERTICAL = wxc.wxTB_VERTICAL
222wxTB_FLAT = wxc.wxTB_FLAT
f0261a72 223wxTB_DOCKABLE = wxc.wxTB_DOCKABLE
b8b8dda7
RD
224wxCOLOURED = wxc.wxCOLOURED
225wxFIXED_LENGTH = wxc.wxFIXED_LENGTH
226wxALIGN_LEFT = wxc.wxALIGN_LEFT
694759cf
RD
227wxALIGN_CENTER_HORIZONTAL = wxc.wxALIGN_CENTER_HORIZONTAL
228wxALIGN_CENTRE_HORIZONTAL = wxc.wxALIGN_CENTRE_HORIZONTAL
b8b8dda7 229wxALIGN_RIGHT = wxc.wxALIGN_RIGHT
2f90df85 230wxALIGN_BOTTOM = wxc.wxALIGN_BOTTOM
694759cf
RD
231wxALIGN_CENTER_VERTICAL = wxc.wxALIGN_CENTER_VERTICAL
232wxALIGN_CENTRE_VERTICAL = wxc.wxALIGN_CENTRE_VERTICAL
2f90df85 233wxALIGN_TOP = wxc.wxALIGN_TOP
694759cf
RD
234wxALIGN_CENTER = wxc.wxALIGN_CENTER
235wxALIGN_CENTRE = wxc.wxALIGN_CENTRE
236wxSHAPED = wxc.wxSHAPED
1b62f00d 237wxADJUST_MINSIZE = wxc.wxADJUST_MINSIZE
b8b8dda7
RD
238wxLB_NEEDED_SB = wxc.wxLB_NEEDED_SB
239wxLB_ALWAYS_SB = wxc.wxLB_ALWAYS_SB
240wxLB_SORT = wxc.wxLB_SORT
241wxLB_SINGLE = wxc.wxLB_SINGLE
242wxLB_MULTIPLE = wxc.wxLB_MULTIPLE
243wxLB_EXTENDED = wxc.wxLB_EXTENDED
244wxLB_OWNERDRAW = wxc.wxLB_OWNERDRAW
245wxLB_HSCROLL = wxc.wxLB_HSCROLL
246wxPROCESS_ENTER = wxc.wxPROCESS_ENTER
247wxPASSWORD = wxc.wxPASSWORD
b8b8dda7
RD
248wxTE_READONLY = wxc.wxTE_READONLY
249wxTE_MULTILINE = wxc.wxTE_MULTILINE
2f4e9287
RD
250wxTE_PROCESS_TAB = wxc.wxTE_PROCESS_TAB
251wxTE_RICH = wxc.wxTE_RICH
68320e40 252wxTE_RICH2 = wxc.wxTE_RICH2
06c0fba4 253wxTE_NO_VSCROLL = wxc.wxTE_NO_VSCROLL
2f4e9287
RD
254wxTE_AUTO_SCROLL = wxc.wxTE_AUTO_SCROLL
255wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER
256wxTE_PASSWORD = wxc.wxTE_PASSWORD
00b6c4e3 257wxTE_AUTO_URL = wxc.wxTE_AUTO_URL
b1e930a5 258wxTE_NOHIDESEL = wxc.wxTE_NOHIDESEL
2f4e9287
RD
259wxTE_DONTWRAP = wxc.wxTE_DONTWRAP
260wxTE_LINEWRAP = wxc.wxTE_LINEWRAP
261wxTE_WORDWRAP = wxc.wxTE_WORDWRAP
b8b8dda7
RD
262wxCB_SIMPLE = wxc.wxCB_SIMPLE
263wxCB_DROPDOWN = wxc.wxCB_DROPDOWN
264wxCB_SORT = wxc.wxCB_SORT
265wxCB_READONLY = wxc.wxCB_READONLY
266wxRA_HORIZONTAL = wxc.wxRA_HORIZONTAL
267wxRA_VERTICAL = wxc.wxRA_VERTICAL
62abd41e
RD
268wxRA_SPECIFY_ROWS = wxc.wxRA_SPECIFY_ROWS
269wxRA_SPECIFY_COLS = wxc.wxRA_SPECIFY_COLS
b8b8dda7
RD
270wxRB_GROUP = wxc.wxRB_GROUP
271wxGA_PROGRESSBAR = wxc.wxGA_PROGRESSBAR
272wxGA_HORIZONTAL = wxc.wxGA_HORIZONTAL
273wxGA_VERTICAL = wxc.wxGA_VERTICAL
bb0054cd 274wxGA_SMOOTH = wxc.wxGA_SMOOTH
b8b8dda7
RD
275wxSL_HORIZONTAL = wxc.wxSL_HORIZONTAL
276wxSL_VERTICAL = wxc.wxSL_VERTICAL
277wxSL_AUTOTICKS = wxc.wxSL_AUTOTICKS
278wxSL_LABELS = wxc.wxSL_LABELS
279wxSL_LEFT = wxc.wxSL_LEFT
280wxSL_TOP = wxc.wxSL_TOP
281wxSL_RIGHT = wxc.wxSL_RIGHT
282wxSL_BOTTOM = wxc.wxSL_BOTTOM
283wxSL_BOTH = wxc.wxSL_BOTH
284wxSL_SELRANGE = wxc.wxSL_SELRANGE
285wxSB_HORIZONTAL = wxc.wxSB_HORIZONTAL
286wxSB_VERTICAL = wxc.wxSB_VERTICAL
cf694132 287wxST_SIZEGRIP = wxc.wxST_SIZEGRIP
2abc0a0f 288wxST_NO_AUTORESIZE = wxc.wxST_NO_AUTORESIZE
b8b8dda7
RD
289wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
290wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW
b8b8dda7
RD
291wxSP_VERTICAL = wxc.wxSP_VERTICAL
292wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL
293wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS
294wxSP_WRAP = wxc.wxSP_WRAP
295wxSP_NOBORDER = wxc.wxSP_NOBORDER
296wxSP_3D = wxc.wxSP_3D
1b62f00d
RD
297wxSP_3DSASH = wxc.wxSP_3DSASH
298wxSP_3DBORDER = wxc.wxSP_3DBORDER
299wxSP_FULLSASH = wxc.wxSP_FULLSASH
b8b8dda7 300wxSP_BORDER = wxc.wxSP_BORDER
9d8bd15f
RD
301wxSP_LIVE_UPDATE = wxc.wxSP_LIVE_UPDATE
302wxSP_PERMIT_UNSPLIT = wxc.wxSP_PERMIT_UNSPLIT
b8b8dda7
RD
303wxFLOOD_SURFACE = wxc.wxFLOOD_SURFACE
304wxFLOOD_BORDER = wxc.wxFLOOD_BORDER
305wxODDEVEN_RULE = wxc.wxODDEVEN_RULE
306wxWINDING_RULE = wxc.wxWINDING_RULE
307wxTOOL_TOP = wxc.wxTOOL_TOP
308wxTOOL_BOTTOM = wxc.wxTOOL_BOTTOM
309wxTOOL_LEFT = wxc.wxTOOL_LEFT
310wxTOOL_RIGHT = wxc.wxTOOL_RIGHT
311wxOK = wxc.wxOK
312wxYES_NO = wxc.wxYES_NO
313wxCANCEL = wxc.wxCANCEL
314wxYES = wxc.wxYES
315wxNO = wxc.wxNO
1afc06c2
RD
316wxNO_DEFAULT = wxc.wxNO_DEFAULT
317wxYES_DEFAULT = wxc.wxYES_DEFAULT
b8b8dda7
RD
318wxICON_EXCLAMATION = wxc.wxICON_EXCLAMATION
319wxICON_HAND = wxc.wxICON_HAND
320wxICON_QUESTION = wxc.wxICON_QUESTION
321wxICON_INFORMATION = wxc.wxICON_INFORMATION
322wxICON_STOP = wxc.wxICON_STOP
323wxICON_ASTERISK = wxc.wxICON_ASTERISK
324wxICON_MASK = wxc.wxICON_MASK
1afc06c2
RD
325wxICON_WARNING = wxc.wxICON_WARNING
326wxICON_ERROR = wxc.wxICON_ERROR
327wxFORWARD = wxc.wxFORWARD
328wxBACKWARD = wxc.wxBACKWARD
329wxRESET = wxc.wxRESET
330wxHELP = wxc.wxHELP
331wxMORE = wxc.wxMORE
332wxSETUP = wxc.wxSETUP
b8b8dda7
RD
333wxCENTRE = wxc.wxCENTRE
334wxCENTER = wxc.wxCENTER
335wxSIZE_AUTO_WIDTH = wxc.wxSIZE_AUTO_WIDTH
336wxSIZE_AUTO_HEIGHT = wxc.wxSIZE_AUTO_HEIGHT
337wxSIZE_AUTO = wxc.wxSIZE_AUTO
338wxSIZE_USE_EXISTING = wxc.wxSIZE_USE_EXISTING
339wxSIZE_ALLOW_MINUS_ONE = wxc.wxSIZE_ALLOW_MINUS_ONE
b8b8dda7
RD
340wxPORTRAIT = wxc.wxPORTRAIT
341wxLANDSCAPE = wxc.wxLANDSCAPE
bb0054cd
RD
342wxPRINT_QUALITY_HIGH = wxc.wxPRINT_QUALITY_HIGH
343wxPRINT_QUALITY_MEDIUM = wxc.wxPRINT_QUALITY_MEDIUM
344wxPRINT_QUALITY_LOW = wxc.wxPRINT_QUALITY_LOW
345wxPRINT_QUALITY_DRAFT = wxc.wxPRINT_QUALITY_DRAFT
b8b8dda7
RD
346wxID_OPEN = wxc.wxID_OPEN
347wxID_CLOSE = wxc.wxID_CLOSE
348wxID_NEW = wxc.wxID_NEW
349wxID_SAVE = wxc.wxID_SAVE
350wxID_SAVEAS = wxc.wxID_SAVEAS
351wxID_REVERT = wxc.wxID_REVERT
352wxID_EXIT = wxc.wxID_EXIT
353wxID_UNDO = wxc.wxID_UNDO
354wxID_REDO = wxc.wxID_REDO
355wxID_HELP = wxc.wxID_HELP
356wxID_PRINT = wxc.wxID_PRINT
357wxID_PRINT_SETUP = wxc.wxID_PRINT_SETUP
358wxID_PREVIEW = wxc.wxID_PREVIEW
359wxID_ABOUT = wxc.wxID_ABOUT
360wxID_HELP_CONTENTS = wxc.wxID_HELP_CONTENTS
361wxID_HELP_COMMANDS = wxc.wxID_HELP_COMMANDS
362wxID_HELP_PROCEDURES = wxc.wxID_HELP_PROCEDURES
363wxID_HELP_CONTEXT = wxc.wxID_HELP_CONTEXT
b5a5d647 364wxID_CLOSE_ALL = wxc.wxID_CLOSE_ALL
b8b8dda7
RD
365wxID_CUT = wxc.wxID_CUT
366wxID_COPY = wxc.wxID_COPY
367wxID_PASTE = wxc.wxID_PASTE
368wxID_CLEAR = wxc.wxID_CLEAR
369wxID_FIND = wxc.wxID_FIND
d56cebe7
RD
370wxID_DUPLICATE = wxc.wxID_DUPLICATE
371wxID_SELECTALL = wxc.wxID_SELECTALL
b8b8dda7
RD
372wxID_FILE1 = wxc.wxID_FILE1
373wxID_FILE2 = wxc.wxID_FILE2
374wxID_FILE3 = wxc.wxID_FILE3
375wxID_FILE4 = wxc.wxID_FILE4
376wxID_FILE5 = wxc.wxID_FILE5
377wxID_FILE6 = wxc.wxID_FILE6
378wxID_FILE7 = wxc.wxID_FILE7
379wxID_FILE8 = wxc.wxID_FILE8
380wxID_FILE9 = wxc.wxID_FILE9
381wxID_OK = wxc.wxID_OK
382wxID_CANCEL = wxc.wxID_CANCEL
383wxID_APPLY = wxc.wxID_APPLY
384wxID_YES = wxc.wxID_YES
385wxID_NO = wxc.wxID_NO
cf694132 386wxID_STATIC = wxc.wxID_STATIC
4c9993c3 387wxID_SEPARATOR = wxc.wxID_SEPARATOR
f3d9dc1d
RD
388wxID_FORWARD = wxc.wxID_FORWARD
389wxID_BACKWARD = wxc.wxID_BACKWARD
390wxID_SETUP = wxc.wxID_SETUP
391wxID_MORE = wxc.wxID_MORE
b8b8dda7
RD
392wxOPEN = wxc.wxOPEN
393wxSAVE = wxc.wxSAVE
394wxHIDE_READONLY = wxc.wxHIDE_READONLY
395wxOVERWRITE_PROMPT = wxc.wxOVERWRITE_PROMPT
2abc0a0f 396wxFILE_MUST_EXIST = wxc.wxFILE_MUST_EXIST
f6bcfd97 397wxMULTIPLE = wxc.wxMULTIPLE
1b62f00d 398wxCHANGE_DIR = wxc.wxCHANGE_DIR
b8b8dda7
RD
399wxACCEL_ALT = wxc.wxACCEL_ALT
400wxACCEL_CTRL = wxc.wxACCEL_CTRL
401wxACCEL_SHIFT = wxc.wxACCEL_SHIFT
f6bcfd97 402wxACCEL_NORMAL = wxc.wxACCEL_NORMAL
bb0054cd
RD
403wxPD_AUTO_HIDE = wxc.wxPD_AUTO_HIDE
404wxPD_APP_MODAL = wxc.wxPD_APP_MODAL
405wxPD_CAN_ABORT = wxc.wxPD_CAN_ABORT
a08cbc01
RD
406wxPD_ELAPSED_TIME = wxc.wxPD_ELAPSED_TIME
407wxPD_ESTIMATED_TIME = wxc.wxPD_ESTIMATED_TIME
408wxPD_REMAINING_TIME = wxc.wxPD_REMAINING_TIME
8bf5d46e 409wxMENU_TEAROFF = wxc.wxMENU_TEAROFF
1afc06c2 410wxMB_DOCKABLE = wxc.wxMB_DOCKABLE
8bf5d46e 411wxNO_FULL_REPAINT_ON_RESIZE = wxc.wxNO_FULL_REPAINT_ON_RESIZE
1afc06c2
RD
412wxLEFT = wxc.wxLEFT
413wxRIGHT = wxc.wxRIGHT
414wxUP = wxc.wxUP
415wxDOWN = wxc.wxDOWN
416wxALL = wxc.wxALL
417wxTOP = wxc.wxTOP
418wxBOTTOM = wxc.wxBOTTOM
419wxNORTH = wxc.wxNORTH
420wxSOUTH = wxc.wxSOUTH
421wxEAST = wxc.wxEAST
422wxWEST = wxc.wxWEST
423wxSTRETCH_NOT = wxc.wxSTRETCH_NOT
424wxSHRINK = wxc.wxSHRINK
425wxGROW = wxc.wxGROW
426wxEXPAND = wxc.wxEXPAND
427wxNB_FIXEDWIDTH = wxc.wxNB_FIXEDWIDTH
f0261a72
RD
428wxNB_LEFT = wxc.wxNB_LEFT
429wxNB_RIGHT = wxc.wxNB_RIGHT
430wxNB_BOTTOM = wxc.wxNB_BOTTOM
0adbc166 431wxNB_MULTILINE = wxc.wxNB_MULTILINE
1afc06c2
RD
432wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL
433wxLI_VERTICAL = wxc.wxLI_VERTICAL
434wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER
435wxHW_SCROLLBAR_AUTO = wxc.wxHW_SCROLLBAR_AUTO
185d7c3e
RD
436wxJOYSTICK1 = wxc.wxJOYSTICK1
437wxJOYSTICK2 = wxc.wxJOYSTICK2
438wxJOY_BUTTON1 = wxc.wxJOY_BUTTON1
439wxJOY_BUTTON2 = wxc.wxJOY_BUTTON2
440wxJOY_BUTTON3 = wxc.wxJOY_BUTTON3
441wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4
442wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY
d1679124 443wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY
0122b7e3 444wxWS_EX_BLOCK_EVENTS = wxc.wxWS_EX_BLOCK_EVENTS
78e8819c 445wxWS_EX_TRANSIENT = wxc.wxWS_EX_TRANSIENT
ecc08ead
RD
446wxMM_TEXT = wxc.wxMM_TEXT
447wxMM_LOMETRIC = wxc.wxMM_LOMETRIC
448wxMM_HIMETRIC = wxc.wxMM_HIMETRIC
449wxMM_LOENGLISH = wxc.wxMM_LOENGLISH
450wxMM_HIENGLISH = wxc.wxMM_HIENGLISH
451wxMM_TWIPS = wxc.wxMM_TWIPS
452wxMM_ISOTROPIC = wxc.wxMM_ISOTROPIC
453wxMM_ANISOTROPIC = wxc.wxMM_ANISOTROPIC
454wxMM_POINTS = wxc.wxMM_POINTS
455wxMM_METRIC = wxc.wxMM_METRIC
ebf4302c
RD
456wxBORDER_DEFAULT = wxc.wxBORDER_DEFAULT
457wxBORDER_NONE = wxc.wxBORDER_NONE
458wxBORDER_STATIC = wxc.wxBORDER_STATIC
459wxBORDER_SIMPLE = wxc.wxBORDER_SIMPLE
460wxBORDER_RAISED = wxc.wxBORDER_RAISED
461wxBORDER_SUNKEN = wxc.wxBORDER_SUNKEN
462wxBORDER_DOUBLE = wxc.wxBORDER_DOUBLE
463wxBORDER_MASK = wxc.wxBORDER_MASK
b8b8dda7
RD
464wxDEFAULT = wxc.wxDEFAULT
465wxDECORATIVE = wxc.wxDECORATIVE
466wxROMAN = wxc.wxROMAN
467wxSCRIPT = wxc.wxSCRIPT
468wxSWISS = wxc.wxSWISS
469wxMODERN = wxc.wxMODERN
470wxTELETYPE = wxc.wxTELETYPE
471wxVARIABLE = wxc.wxVARIABLE
472wxFIXED = wxc.wxFIXED
473wxNORMAL = wxc.wxNORMAL
474wxLIGHT = wxc.wxLIGHT
475wxBOLD = wxc.wxBOLD
476wxITALIC = wxc.wxITALIC
477wxSLANT = wxc.wxSLANT
478wxSOLID = wxc.wxSOLID
479wxDOT = wxc.wxDOT
480wxLONG_DASH = wxc.wxLONG_DASH
481wxSHORT_DASH = wxc.wxSHORT_DASH
482wxDOT_DASH = wxc.wxDOT_DASH
483wxUSER_DASH = wxc.wxUSER_DASH
484wxTRANSPARENT = wxc.wxTRANSPARENT
485wxSTIPPLE = wxc.wxSTIPPLE
486wxBDIAGONAL_HATCH = wxc.wxBDIAGONAL_HATCH
487wxCROSSDIAG_HATCH = wxc.wxCROSSDIAG_HATCH
488wxFDIAGONAL_HATCH = wxc.wxFDIAGONAL_HATCH
489wxCROSS_HATCH = wxc.wxCROSS_HATCH
490wxHORIZONTAL_HATCH = wxc.wxHORIZONTAL_HATCH
491wxVERTICAL_HATCH = wxc.wxVERTICAL_HATCH
492wxJOIN_BEVEL = wxc.wxJOIN_BEVEL
493wxJOIN_MITER = wxc.wxJOIN_MITER
494wxJOIN_ROUND = wxc.wxJOIN_ROUND
495wxCAP_ROUND = wxc.wxCAP_ROUND
496wxCAP_PROJECTING = wxc.wxCAP_PROJECTING
497wxCAP_BUTT = wxc.wxCAP_BUTT
498wxCLEAR = wxc.wxCLEAR
499wxXOR = wxc.wxXOR
500wxINVERT = wxc.wxINVERT
501wxOR_REVERSE = wxc.wxOR_REVERSE
502wxAND_REVERSE = wxc.wxAND_REVERSE
503wxCOPY = wxc.wxCOPY
504wxAND = wxc.wxAND
505wxAND_INVERT = wxc.wxAND_INVERT
506wxNO_OP = wxc.wxNO_OP
507wxNOR = wxc.wxNOR
508wxEQUIV = wxc.wxEQUIV
509wxSRC_INVERT = wxc.wxSRC_INVERT
510wxOR_INVERT = wxc.wxOR_INVERT
511wxNAND = wxc.wxNAND
512wxOR = wxc.wxOR
513wxSET = wxc.wxSET
b8b8dda7
RD
514WXK_BACK = wxc.WXK_BACK
515WXK_TAB = wxc.WXK_TAB
516WXK_RETURN = wxc.WXK_RETURN
517WXK_ESCAPE = wxc.WXK_ESCAPE
518WXK_SPACE = wxc.WXK_SPACE
519WXK_DELETE = wxc.WXK_DELETE
520WXK_START = wxc.WXK_START
521WXK_LBUTTON = wxc.WXK_LBUTTON
522WXK_RBUTTON = wxc.WXK_RBUTTON
523WXK_CANCEL = wxc.WXK_CANCEL
524WXK_MBUTTON = wxc.WXK_MBUTTON
525WXK_CLEAR = wxc.WXK_CLEAR
526WXK_SHIFT = wxc.WXK_SHIFT
65fe3842 527WXK_ALT = wxc.WXK_ALT
b8b8dda7
RD
528WXK_CONTROL = wxc.WXK_CONTROL
529WXK_MENU = wxc.WXK_MENU
530WXK_PAUSE = wxc.WXK_PAUSE
531WXK_CAPITAL = wxc.WXK_CAPITAL
532WXK_PRIOR = wxc.WXK_PRIOR
533WXK_NEXT = wxc.WXK_NEXT
534WXK_END = wxc.WXK_END
535WXK_HOME = wxc.WXK_HOME
536WXK_LEFT = wxc.WXK_LEFT
537WXK_UP = wxc.WXK_UP
538WXK_RIGHT = wxc.WXK_RIGHT
539WXK_DOWN = wxc.WXK_DOWN
540WXK_SELECT = wxc.WXK_SELECT
541WXK_PRINT = wxc.WXK_PRINT
542WXK_EXECUTE = wxc.WXK_EXECUTE
543WXK_SNAPSHOT = wxc.WXK_SNAPSHOT
544WXK_INSERT = wxc.WXK_INSERT
545WXK_HELP = wxc.WXK_HELP
546WXK_NUMPAD0 = wxc.WXK_NUMPAD0
547WXK_NUMPAD1 = wxc.WXK_NUMPAD1
548WXK_NUMPAD2 = wxc.WXK_NUMPAD2
549WXK_NUMPAD3 = wxc.WXK_NUMPAD3
550WXK_NUMPAD4 = wxc.WXK_NUMPAD4
551WXK_NUMPAD5 = wxc.WXK_NUMPAD5
552WXK_NUMPAD6 = wxc.WXK_NUMPAD6
553WXK_NUMPAD7 = wxc.WXK_NUMPAD7
554WXK_NUMPAD8 = wxc.WXK_NUMPAD8
555WXK_NUMPAD9 = wxc.WXK_NUMPAD9
556WXK_MULTIPLY = wxc.WXK_MULTIPLY
557WXK_ADD = wxc.WXK_ADD
558WXK_SEPARATOR = wxc.WXK_SEPARATOR
559WXK_SUBTRACT = wxc.WXK_SUBTRACT
560WXK_DECIMAL = wxc.WXK_DECIMAL
561WXK_DIVIDE = wxc.WXK_DIVIDE
562WXK_F1 = wxc.WXK_F1
563WXK_F2 = wxc.WXK_F2
564WXK_F3 = wxc.WXK_F3
565WXK_F4 = wxc.WXK_F4
566WXK_F5 = wxc.WXK_F5
567WXK_F6 = wxc.WXK_F6
568WXK_F7 = wxc.WXK_F7
569WXK_F8 = wxc.WXK_F8
570WXK_F9 = wxc.WXK_F9
571WXK_F10 = wxc.WXK_F10
572WXK_F11 = wxc.WXK_F11
573WXK_F12 = wxc.WXK_F12
574WXK_F13 = wxc.WXK_F13
575WXK_F14 = wxc.WXK_F14
576WXK_F15 = wxc.WXK_F15
577WXK_F16 = wxc.WXK_F16
578WXK_F17 = wxc.WXK_F17
579WXK_F18 = wxc.WXK_F18
580WXK_F19 = wxc.WXK_F19
581WXK_F20 = wxc.WXK_F20
582WXK_F21 = wxc.WXK_F21
583WXK_F22 = wxc.WXK_F22
584WXK_F23 = wxc.WXK_F23
585WXK_F24 = wxc.WXK_F24
586WXK_NUMLOCK = wxc.WXK_NUMLOCK
587WXK_SCROLL = wxc.WXK_SCROLL
588WXK_PAGEUP = wxc.WXK_PAGEUP
589WXK_PAGEDOWN = wxc.WXK_PAGEDOWN
65fe3842
RD
590WXK_NUMPAD_SPACE = wxc.WXK_NUMPAD_SPACE
591WXK_NUMPAD_TAB = wxc.WXK_NUMPAD_TAB
592WXK_NUMPAD_ENTER = wxc.WXK_NUMPAD_ENTER
593WXK_NUMPAD_F1 = wxc.WXK_NUMPAD_F1
594WXK_NUMPAD_F2 = wxc.WXK_NUMPAD_F2
595WXK_NUMPAD_F3 = wxc.WXK_NUMPAD_F3
596WXK_NUMPAD_F4 = wxc.WXK_NUMPAD_F4
597WXK_NUMPAD_HOME = wxc.WXK_NUMPAD_HOME
598WXK_NUMPAD_LEFT = wxc.WXK_NUMPAD_LEFT
599WXK_NUMPAD_UP = wxc.WXK_NUMPAD_UP
600WXK_NUMPAD_RIGHT = wxc.WXK_NUMPAD_RIGHT
601WXK_NUMPAD_DOWN = wxc.WXK_NUMPAD_DOWN
602WXK_NUMPAD_PRIOR = wxc.WXK_NUMPAD_PRIOR
603WXK_NUMPAD_PAGEUP = wxc.WXK_NUMPAD_PAGEUP
604WXK_NUMPAD_NEXT = wxc.WXK_NUMPAD_NEXT
605WXK_NUMPAD_PAGEDOWN = wxc.WXK_NUMPAD_PAGEDOWN
606WXK_NUMPAD_END = wxc.WXK_NUMPAD_END
607WXK_NUMPAD_BEGIN = wxc.WXK_NUMPAD_BEGIN
608WXK_NUMPAD_INSERT = wxc.WXK_NUMPAD_INSERT
609WXK_NUMPAD_DELETE = wxc.WXK_NUMPAD_DELETE
610WXK_NUMPAD_EQUAL = wxc.WXK_NUMPAD_EQUAL
611WXK_NUMPAD_MULTIPLY = wxc.WXK_NUMPAD_MULTIPLY
612WXK_NUMPAD_ADD = wxc.WXK_NUMPAD_ADD
613WXK_NUMPAD_SEPARATOR = wxc.WXK_NUMPAD_SEPARATOR
614WXK_NUMPAD_SUBTRACT = wxc.WXK_NUMPAD_SUBTRACT
615WXK_NUMPAD_DECIMAL = wxc.WXK_NUMPAD_DECIMAL
616WXK_NUMPAD_DIVIDE = wxc.WXK_NUMPAD_DIVIDE
0a651eb8
RD
617wxBITMAP_TYPE_INVALID = wxc.wxBITMAP_TYPE_INVALID
618wxBITMAP_TYPE_BMP = wxc.wxBITMAP_TYPE_BMP
619wxBITMAP_TYPE_BMP_RESOURCE = wxc.wxBITMAP_TYPE_BMP_RESOURCE
620wxBITMAP_TYPE_RESOURCE = wxc.wxBITMAP_TYPE_RESOURCE
621wxBITMAP_TYPE_ICO = wxc.wxBITMAP_TYPE_ICO
622wxBITMAP_TYPE_ICO_RESOURCE = wxc.wxBITMAP_TYPE_ICO_RESOURCE
623wxBITMAP_TYPE_CUR = wxc.wxBITMAP_TYPE_CUR
624wxBITMAP_TYPE_CUR_RESOURCE = wxc.wxBITMAP_TYPE_CUR_RESOURCE
625wxBITMAP_TYPE_XBM = wxc.wxBITMAP_TYPE_XBM
626wxBITMAP_TYPE_XBM_DATA = wxc.wxBITMAP_TYPE_XBM_DATA
627wxBITMAP_TYPE_XPM = wxc.wxBITMAP_TYPE_XPM
628wxBITMAP_TYPE_XPM_DATA = wxc.wxBITMAP_TYPE_XPM_DATA
629wxBITMAP_TYPE_TIF = wxc.wxBITMAP_TYPE_TIF
630wxBITMAP_TYPE_TIF_RESOURCE = wxc.wxBITMAP_TYPE_TIF_RESOURCE
631wxBITMAP_TYPE_GIF = wxc.wxBITMAP_TYPE_GIF
632wxBITMAP_TYPE_GIF_RESOURCE = wxc.wxBITMAP_TYPE_GIF_RESOURCE
633wxBITMAP_TYPE_PNG = wxc.wxBITMAP_TYPE_PNG
634wxBITMAP_TYPE_PNG_RESOURCE = wxc.wxBITMAP_TYPE_PNG_RESOURCE
635wxBITMAP_TYPE_JPEG = wxc.wxBITMAP_TYPE_JPEG
636wxBITMAP_TYPE_JPEG_RESOURCE = wxc.wxBITMAP_TYPE_JPEG_RESOURCE
637wxBITMAP_TYPE_PNM = wxc.wxBITMAP_TYPE_PNM
638wxBITMAP_TYPE_PNM_RESOURCE = wxc.wxBITMAP_TYPE_PNM_RESOURCE
639wxBITMAP_TYPE_PCX = wxc.wxBITMAP_TYPE_PCX
640wxBITMAP_TYPE_PCX_RESOURCE = wxc.wxBITMAP_TYPE_PCX_RESOURCE
641wxBITMAP_TYPE_PICT = wxc.wxBITMAP_TYPE_PICT
642wxBITMAP_TYPE_PICT_RESOURCE = wxc.wxBITMAP_TYPE_PICT_RESOURCE
643wxBITMAP_TYPE_ICON = wxc.wxBITMAP_TYPE_ICON
644wxBITMAP_TYPE_ICON_RESOURCE = wxc.wxBITMAP_TYPE_ICON_RESOURCE
68320e40 645wxBITMAP_TYPE_ANI = wxc.wxBITMAP_TYPE_ANI
0a651eb8
RD
646wxBITMAP_TYPE_MACCURSOR = wxc.wxBITMAP_TYPE_MACCURSOR
647wxBITMAP_TYPE_MACCURSOR_RESOURCE = wxc.wxBITMAP_TYPE_MACCURSOR_RESOURCE
648wxBITMAP_TYPE_ANY = wxc.wxBITMAP_TYPE_ANY
b8b8dda7
RD
649wxCURSOR_NONE = wxc.wxCURSOR_NONE
650wxCURSOR_ARROW = wxc.wxCURSOR_ARROW
651wxCURSOR_BULLSEYE = wxc.wxCURSOR_BULLSEYE
652wxCURSOR_CHAR = wxc.wxCURSOR_CHAR
653wxCURSOR_CROSS = wxc.wxCURSOR_CROSS
654wxCURSOR_HAND = wxc.wxCURSOR_HAND
655wxCURSOR_IBEAM = wxc.wxCURSOR_IBEAM
656wxCURSOR_LEFT_BUTTON = wxc.wxCURSOR_LEFT_BUTTON
657wxCURSOR_MAGNIFIER = wxc.wxCURSOR_MAGNIFIER
658wxCURSOR_MIDDLE_BUTTON = wxc.wxCURSOR_MIDDLE_BUTTON
659wxCURSOR_NO_ENTRY = wxc.wxCURSOR_NO_ENTRY
660wxCURSOR_PAINT_BRUSH = wxc.wxCURSOR_PAINT_BRUSH
661wxCURSOR_PENCIL = wxc.wxCURSOR_PENCIL
662wxCURSOR_POINT_LEFT = wxc.wxCURSOR_POINT_LEFT
663wxCURSOR_POINT_RIGHT = wxc.wxCURSOR_POINT_RIGHT
664wxCURSOR_QUESTION_ARROW = wxc.wxCURSOR_QUESTION_ARROW
665wxCURSOR_RIGHT_BUTTON = wxc.wxCURSOR_RIGHT_BUTTON
666wxCURSOR_SIZENESW = wxc.wxCURSOR_SIZENESW
667wxCURSOR_SIZENS = wxc.wxCURSOR_SIZENS
668wxCURSOR_SIZENWSE = wxc.wxCURSOR_SIZENWSE
669wxCURSOR_SIZEWE = wxc.wxCURSOR_SIZEWE
670wxCURSOR_SIZING = wxc.wxCURSOR_SIZING
671wxCURSOR_SPRAYCAN = wxc.wxCURSOR_SPRAYCAN
672wxCURSOR_WAIT = wxc.wxCURSOR_WAIT
673wxCURSOR_WATCH = wxc.wxCURSOR_WATCH
674wxCURSOR_BLANK = wxc.wxCURSOR_BLANK
0a651eb8
RD
675wxCURSOR_DEFAULT = wxc.wxCURSOR_DEFAULT
676wxCURSOR_ARROWWAIT = wxc.wxCURSOR_ARROWWAIT
677wxCURSOR_MAX = wxc.wxCURSOR_MAX
cf694132
RD
678wxPAPER_NONE = wxc.wxPAPER_NONE
679wxPAPER_LETTER = wxc.wxPAPER_LETTER
680wxPAPER_LEGAL = wxc.wxPAPER_LEGAL
681wxPAPER_A4 = wxc.wxPAPER_A4
682wxPAPER_CSHEET = wxc.wxPAPER_CSHEET
683wxPAPER_DSHEET = wxc.wxPAPER_DSHEET
684wxPAPER_ESHEET = wxc.wxPAPER_ESHEET
685wxPAPER_LETTERSMALL = wxc.wxPAPER_LETTERSMALL
686wxPAPER_TABLOID = wxc.wxPAPER_TABLOID
687wxPAPER_LEDGER = wxc.wxPAPER_LEDGER
688wxPAPER_STATEMENT = wxc.wxPAPER_STATEMENT
689wxPAPER_EXECUTIVE = wxc.wxPAPER_EXECUTIVE
690wxPAPER_A3 = wxc.wxPAPER_A3
691wxPAPER_A4SMALL = wxc.wxPAPER_A4SMALL
692wxPAPER_A5 = wxc.wxPAPER_A5
693wxPAPER_B4 = wxc.wxPAPER_B4
694wxPAPER_B5 = wxc.wxPAPER_B5
695wxPAPER_FOLIO = wxc.wxPAPER_FOLIO
696wxPAPER_QUARTO = wxc.wxPAPER_QUARTO
697wxPAPER_10X14 = wxc.wxPAPER_10X14
698wxPAPER_11X17 = wxc.wxPAPER_11X17
699wxPAPER_NOTE = wxc.wxPAPER_NOTE
700wxPAPER_ENV_9 = wxc.wxPAPER_ENV_9
701wxPAPER_ENV_10 = wxc.wxPAPER_ENV_10
702wxPAPER_ENV_11 = wxc.wxPAPER_ENV_11
703wxPAPER_ENV_12 = wxc.wxPAPER_ENV_12
704wxPAPER_ENV_14 = wxc.wxPAPER_ENV_14
705wxPAPER_ENV_DL = wxc.wxPAPER_ENV_DL
706wxPAPER_ENV_C5 = wxc.wxPAPER_ENV_C5
707wxPAPER_ENV_C3 = wxc.wxPAPER_ENV_C3
708wxPAPER_ENV_C4 = wxc.wxPAPER_ENV_C4
709wxPAPER_ENV_C6 = wxc.wxPAPER_ENV_C6
710wxPAPER_ENV_C65 = wxc.wxPAPER_ENV_C65
711wxPAPER_ENV_B4 = wxc.wxPAPER_ENV_B4
712wxPAPER_ENV_B5 = wxc.wxPAPER_ENV_B5
713wxPAPER_ENV_B6 = wxc.wxPAPER_ENV_B6
714wxPAPER_ENV_ITALY = wxc.wxPAPER_ENV_ITALY
715wxPAPER_ENV_MONARCH = wxc.wxPAPER_ENV_MONARCH
716wxPAPER_ENV_PERSONAL = wxc.wxPAPER_ENV_PERSONAL
717wxPAPER_FANFOLD_US = wxc.wxPAPER_FANFOLD_US
718wxPAPER_FANFOLD_STD_GERMAN = wxc.wxPAPER_FANFOLD_STD_GERMAN
719wxPAPER_FANFOLD_LGL_GERMAN = wxc.wxPAPER_FANFOLD_LGL_GERMAN
720wxPAPER_ISO_B4 = wxc.wxPAPER_ISO_B4
721wxPAPER_JAPANESE_POSTCARD = wxc.wxPAPER_JAPANESE_POSTCARD
722wxPAPER_9X11 = wxc.wxPAPER_9X11
723wxPAPER_10X11 = wxc.wxPAPER_10X11
724wxPAPER_15X11 = wxc.wxPAPER_15X11
725wxPAPER_ENV_INVITE = wxc.wxPAPER_ENV_INVITE
726wxPAPER_LETTER_EXTRA = wxc.wxPAPER_LETTER_EXTRA
727wxPAPER_LEGAL_EXTRA = wxc.wxPAPER_LEGAL_EXTRA
728wxPAPER_TABLOID_EXTRA = wxc.wxPAPER_TABLOID_EXTRA
729wxPAPER_A4_EXTRA = wxc.wxPAPER_A4_EXTRA
730wxPAPER_LETTER_TRANSVERSE = wxc.wxPAPER_LETTER_TRANSVERSE
731wxPAPER_A4_TRANSVERSE = wxc.wxPAPER_A4_TRANSVERSE
732wxPAPER_LETTER_EXTRA_TRANSVERSE = wxc.wxPAPER_LETTER_EXTRA_TRANSVERSE
733wxPAPER_A_PLUS = wxc.wxPAPER_A_PLUS
734wxPAPER_B_PLUS = wxc.wxPAPER_B_PLUS
735wxPAPER_LETTER_PLUS = wxc.wxPAPER_LETTER_PLUS
736wxPAPER_A4_PLUS = wxc.wxPAPER_A4_PLUS
737wxPAPER_A5_TRANSVERSE = wxc.wxPAPER_A5_TRANSVERSE
738wxPAPER_B5_TRANSVERSE = wxc.wxPAPER_B5_TRANSVERSE
739wxPAPER_A3_EXTRA = wxc.wxPAPER_A3_EXTRA
740wxPAPER_A5_EXTRA = wxc.wxPAPER_A5_EXTRA
741wxPAPER_B5_EXTRA = wxc.wxPAPER_B5_EXTRA
742wxPAPER_A2 = wxc.wxPAPER_A2
743wxPAPER_A3_TRANSVERSE = wxc.wxPAPER_A3_TRANSVERSE
744wxPAPER_A3_EXTRA_TRANSVERSE = wxc.wxPAPER_A3_EXTRA_TRANSVERSE
bb0054cd
RD
745wxDUPLEX_SIMPLEX = wxc.wxDUPLEX_SIMPLEX
746wxDUPLEX_HORIZONTAL = wxc.wxDUPLEX_HORIZONTAL
747wxDUPLEX_VERTICAL = wxc.wxDUPLEX_VERTICAL
b8b8dda7
RD
748FALSE = wxc.FALSE
749false = wxc.false
750TRUE = wxc.TRUE
751true = wxc.true
11765138 752wxVERSION_STRING = wxc.wxVERSION_STRING
b8b8dda7
RD
753wxEVT_NULL = wxc.wxEVT_NULL
754wxEVT_FIRST = wxc.wxEVT_FIRST
755wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED
756wxEVT_COMMAND_CHECKBOX_CLICKED = wxc.wxEVT_COMMAND_CHECKBOX_CLICKED
757wxEVT_COMMAND_CHOICE_SELECTED = wxc.wxEVT_COMMAND_CHOICE_SELECTED
758wxEVT_COMMAND_LISTBOX_SELECTED = wxc.wxEVT_COMMAND_LISTBOX_SELECTED
759wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
760wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3af4e610 761wxEVT_COMMAND_SPINCTRL_UPDATED = wxc.wxEVT_COMMAND_SPINCTRL_UPDATED
b8b8dda7
RD
762wxEVT_COMMAND_TEXT_UPDATED = wxc.wxEVT_COMMAND_TEXT_UPDATED
763wxEVT_COMMAND_TEXT_ENTER = wxc.wxEVT_COMMAND_TEXT_ENTER
00b6c4e3
RD
764wxEVT_COMMAND_TEXT_URL = wxc.wxEVT_COMMAND_TEXT_URL
765wxEVT_COMMAND_TEXT_MAXLEN = wxc.wxEVT_COMMAND_TEXT_MAXLEN
b8b8dda7
RD
766wxEVT_COMMAND_MENU_SELECTED = wxc.wxEVT_COMMAND_MENU_SELECTED
767wxEVT_COMMAND_SLIDER_UPDATED = wxc.wxEVT_COMMAND_SLIDER_UPDATED
768wxEVT_COMMAND_RADIOBOX_SELECTED = wxc.wxEVT_COMMAND_RADIOBOX_SELECTED
769wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxc.wxEVT_COMMAND_RADIOBUTTON_SELECTED
770wxEVT_COMMAND_SCROLLBAR_UPDATED = wxc.wxEVT_COMMAND_SCROLLBAR_UPDATED
771wxEVT_COMMAND_VLBOX_SELECTED = wxc.wxEVT_COMMAND_VLBOX_SELECTED
772wxEVT_COMMAND_COMBOBOX_SELECTED = wxc.wxEVT_COMMAND_COMBOBOX_SELECTED
773wxEVT_COMMAND_TOOL_CLICKED = wxc.wxEVT_COMMAND_TOOL_CLICKED
774wxEVT_COMMAND_TOOL_RCLICKED = wxc.wxEVT_COMMAND_TOOL_RCLICKED
775wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER
776wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS
777wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS
7b7ac0ab 778wxEVT_CHILD_FOCUS = wxc.wxEVT_CHILD_FOCUS
d1679124 779wxEVT_MOUSEWHEEL = wxc.wxEVT_MOUSEWHEEL
b8b8dda7
RD
780wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN
781wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP
782wxEVT_MIDDLE_DOWN = wxc.wxEVT_MIDDLE_DOWN
783wxEVT_MIDDLE_UP = wxc.wxEVT_MIDDLE_UP
784wxEVT_RIGHT_DOWN = wxc.wxEVT_RIGHT_DOWN
785wxEVT_RIGHT_UP = wxc.wxEVT_RIGHT_UP
786wxEVT_MOTION = wxc.wxEVT_MOTION
787wxEVT_ENTER_WINDOW = wxc.wxEVT_ENTER_WINDOW
788wxEVT_LEAVE_WINDOW = wxc.wxEVT_LEAVE_WINDOW
789wxEVT_LEFT_DCLICK = wxc.wxEVT_LEFT_DCLICK
790wxEVT_MIDDLE_DCLICK = wxc.wxEVT_MIDDLE_DCLICK
791wxEVT_RIGHT_DCLICK = wxc.wxEVT_RIGHT_DCLICK
792wxEVT_NC_LEFT_DOWN = wxc.wxEVT_NC_LEFT_DOWN
793wxEVT_NC_LEFT_UP = wxc.wxEVT_NC_LEFT_UP
794wxEVT_NC_MIDDLE_DOWN = wxc.wxEVT_NC_MIDDLE_DOWN
795wxEVT_NC_MIDDLE_UP = wxc.wxEVT_NC_MIDDLE_UP
796wxEVT_NC_RIGHT_DOWN = wxc.wxEVT_NC_RIGHT_DOWN
797wxEVT_NC_RIGHT_UP = wxc.wxEVT_NC_RIGHT_UP
798wxEVT_NC_MOTION = wxc.wxEVT_NC_MOTION
799wxEVT_NC_ENTER_WINDOW = wxc.wxEVT_NC_ENTER_WINDOW
800wxEVT_NC_LEAVE_WINDOW = wxc.wxEVT_NC_LEAVE_WINDOW
801wxEVT_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK
802wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK
803wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK
804wxEVT_CHAR = wxc.wxEVT_CHAR
8bf5d46e
RD
805wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN
806wxEVT_KEY_UP = wxc.wxEVT_KEY_UP
807wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK
b8b8dda7
RD
808wxEVT_SCROLL_TOP = wxc.wxEVT_SCROLL_TOP
809wxEVT_SCROLL_BOTTOM = wxc.wxEVT_SCROLL_BOTTOM
810wxEVT_SCROLL_LINEUP = wxc.wxEVT_SCROLL_LINEUP
811wxEVT_SCROLL_LINEDOWN = wxc.wxEVT_SCROLL_LINEDOWN
812wxEVT_SCROLL_PAGEUP = wxc.wxEVT_SCROLL_PAGEUP
813wxEVT_SCROLL_PAGEDOWN = wxc.wxEVT_SCROLL_PAGEDOWN
814wxEVT_SCROLL_THUMBTRACK = wxc.wxEVT_SCROLL_THUMBTRACK
26b9cf27 815wxEVT_SCROLL_THUMBRELEASE = wxc.wxEVT_SCROLL_THUMBRELEASE
bb0054cd
RD
816wxEVT_SCROLLWIN_TOP = wxc.wxEVT_SCROLLWIN_TOP
817wxEVT_SCROLLWIN_BOTTOM = wxc.wxEVT_SCROLLWIN_BOTTOM
818wxEVT_SCROLLWIN_LINEUP = wxc.wxEVT_SCROLLWIN_LINEUP
819wxEVT_SCROLLWIN_LINEDOWN = wxc.wxEVT_SCROLLWIN_LINEDOWN
820wxEVT_SCROLLWIN_PAGEUP = wxc.wxEVT_SCROLLWIN_PAGEUP
821wxEVT_SCROLLWIN_PAGEDOWN = wxc.wxEVT_SCROLLWIN_PAGEDOWN
822wxEVT_SCROLLWIN_THUMBTRACK = wxc.wxEVT_SCROLLWIN_THUMBTRACK
26b9cf27 823wxEVT_SCROLLWIN_THUMBRELEASE = wxc.wxEVT_SCROLLWIN_THUMBRELEASE
b8b8dda7
RD
824wxEVT_SIZE = wxc.wxEVT_SIZE
825wxEVT_MOVE = wxc.wxEVT_MOVE
826wxEVT_CLOSE_WINDOW = wxc.wxEVT_CLOSE_WINDOW
827wxEVT_END_SESSION = wxc.wxEVT_END_SESSION
828wxEVT_QUERY_END_SESSION = wxc.wxEVT_QUERY_END_SESSION
829wxEVT_ACTIVATE_APP = wxc.wxEVT_ACTIVATE_APP
830wxEVT_POWER = wxc.wxEVT_POWER
b8b8dda7
RD
831wxEVT_ACTIVATE = wxc.wxEVT_ACTIVATE
832wxEVT_CREATE = wxc.wxEVT_CREATE
833wxEVT_DESTROY = wxc.wxEVT_DESTROY
834wxEVT_SHOW = wxc.wxEVT_SHOW
835wxEVT_ICONIZE = wxc.wxEVT_ICONIZE
836wxEVT_MAXIMIZE = wxc.wxEVT_MAXIMIZE
837wxEVT_MOUSE_CAPTURE_CHANGED = wxc.wxEVT_MOUSE_CAPTURE_CHANGED
838wxEVT_PAINT = wxc.wxEVT_PAINT
839wxEVT_ERASE_BACKGROUND = wxc.wxEVT_ERASE_BACKGROUND
840wxEVT_NC_PAINT = wxc.wxEVT_NC_PAINT
841wxEVT_PAINT_ICON = wxc.wxEVT_PAINT_ICON
842wxEVT_MENU_CHAR = wxc.wxEVT_MENU_CHAR
843wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT
844wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT
845wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT
b8b8dda7
RD
846wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED
847wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED
848wxEVT_QUERY_NEW_PALETTE = wxc.wxEVT_QUERY_NEW_PALETTE
849wxEVT_PALETTE_CHANGED = wxc.wxEVT_PALETTE_CHANGED
850wxEVT_JOY_BUTTON_DOWN = wxc.wxEVT_JOY_BUTTON_DOWN
851wxEVT_JOY_BUTTON_UP = wxc.wxEVT_JOY_BUTTON_UP
852wxEVT_JOY_MOVE = wxc.wxEVT_JOY_MOVE
853wxEVT_JOY_ZMOVE = wxc.wxEVT_JOY_ZMOVE
854wxEVT_DROP_FILES = wxc.wxEVT_DROP_FILES
855wxEVT_DRAW_ITEM = wxc.wxEVT_DRAW_ITEM
856wxEVT_MEASURE_ITEM = wxc.wxEVT_MEASURE_ITEM
857wxEVT_COMPARE_ITEM = wxc.wxEVT_COMPARE_ITEM
858wxEVT_INIT_DIALOG = wxc.wxEVT_INIT_DIALOG
859wxEVT_IDLE = wxc.wxEVT_IDLE
860wxEVT_UPDATE_UI = wxc.wxEVT_UPDATE_UI
861wxEVT_COMMAND_LEFT_CLICK = wxc.wxEVT_COMMAND_LEFT_CLICK
862wxEVT_COMMAND_LEFT_DCLICK = wxc.wxEVT_COMMAND_LEFT_DCLICK
863wxEVT_COMMAND_RIGHT_CLICK = wxc.wxEVT_COMMAND_RIGHT_CLICK
864wxEVT_COMMAND_RIGHT_DCLICK = wxc.wxEVT_COMMAND_RIGHT_DCLICK
865wxEVT_COMMAND_SET_FOCUS = wxc.wxEVT_COMMAND_SET_FOCUS
866wxEVT_COMMAND_KILL_FOCUS = wxc.wxEVT_COMMAND_KILL_FOCUS
867wxEVT_COMMAND_ENTER = wxc.wxEVT_COMMAND_ENTER
2f90df85 868wxEVT_NAVIGATION_KEY = wxc.wxEVT_NAVIGATION_KEY
f6bcfd97 869wxEVT_TIMER = wxc.wxEVT_TIMER
b8b8dda7
RD
870__version__ = wxc.__version__
871cvar = wxc.cvar
e508a2b6
RD
872wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition)
873wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize)
b8b8dda7
RD
874
875
876#-------------- USER INCLUDE -----------------------
877
878#----------------------------------------------------------------------------
879# Name: _extra.py
880# Purpose: This file is appended to the shadow class file generated
881# by SWIG. We add some unSWIGable things here.
882#
883# Author: Robin Dunn
884#
885# Created: 6/30/97
b8b8dda7
RD
886# Copyright: (c) 1998 by Total Control Software
887# Licence: wxWindows license
888#----------------------------------------------------------------------------
889
890import sys
891
892#----------------------------------------------------------------------
893# This gives this module's dictionary to the C++ extension code...
894
895_wxSetDictionary(vars())
896
897
898#----------------------------------------------------------------------
899#----------------------------------------------------------------------
900# Helper function to link python methods to wxWindows virtual
901# functions by name.
902
c368d904
RD
903def _checkForCallback(obj, name, event, theID=-1):
904 try: cb = getattr(obj, name)
905 except: pass
906 else: obj.Connect(theID, -1, event, cb)
b8b8dda7 907
b8b8dda7
RD
908
909#----------------------------------------------------------------------
910#----------------------------------------------------------------------
911# functions that look and act like the C++ Macros of the same name
912
913
914# Miscellaneous
915def EVT_SIZE(win, func):
916 win.Connect(-1, -1, wxEVT_SIZE, func)
917
918def EVT_MOVE(win, func):
919 win.Connect(-1, -1, wxEVT_MOVE, func)
920
921def EVT_CLOSE(win, func):
922 win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func)
923
924def EVT_PAINT(win, func):
925 win.Connect(-1, -1, wxEVT_PAINT, func)
926
927def EVT_ERASE_BACKGROUND(win, func):
928 win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func)
929
930def EVT_CHAR(win, func):
931 win.Connect(-1, -1, wxEVT_CHAR, func)
932
933def EVT_CHAR_HOOK(win, func):
934 win.Connect(-1, -1, wxEVT_CHAR_HOOK, func)
935
8bf5d46e
RD
936def EVT_KEY_DOWN(win, func):
937 win.Connect(-1, -1, wxEVT_KEY_DOWN, func)
938
939def EVT_KEY_UP(win, func):
940 win.Connect(-1, -1, wxEVT_KEY_UP, func)
941
b8b8dda7
RD
942def EVT_MENU_HIGHLIGHT(win, id, func):
943 win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
944
945def EVT_MENU_HIGHLIGHT_ALL(win, func):
946 win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func)
947
948def EVT_SET_FOCUS(win, func):
949 win.Connect(-1, -1, wxEVT_SET_FOCUS, func)
950
951def EVT_KILL_FOCUS(win, func):
952 win.Connect(-1, -1, wxEVT_KILL_FOCUS, func)
953
7b7ac0ab
RD
954def EVT_CHILD_FOCUS(win, func):
955 win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func)
956
b8b8dda7
RD
957def EVT_ACTIVATE(win, func):
958 win.Connect(-1, -1, wxEVT_ACTIVATE, func)
959
960def EVT_ACTIVATE_APP(win, func):
961 win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func)
962
963def EVT_END_SESSION(win, func):
964 win.Connect(-1, -1, wxEVT_END_SESSION, func)
965
966def EVT_QUERY_END_SESSION(win, func):
967 win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func)
968
969def EVT_DROP_FILES(win, func):
970 win.Connect(-1, -1, wxEVT_DROP_FILES, func)
971
972def EVT_INIT_DIALOG(win, func):
973 win.Connect(-1, -1, wxEVT_INIT_DIALOG, func)
974
975def EVT_SYS_COLOUR_CHANGED(win, func):
976 win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func)
977
978def EVT_SHOW(win, func):
979 win.Connect(-1, -1, wxEVT_SHOW, func)
980
981def EVT_MAXIMIZE(win, func):
982 win.Connect(-1, -1, wxEVT_MAXIMIZE, func)
983
984def EVT_ICONIZE(win, func):
985 win.Connect(-1, -1, wxEVT_ICONIZE, func)
986
987def EVT_NAVIGATION_KEY(win, func):
988 win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func)
989
3af4e610
RD
990def EVT_PALETTE_CHANGED(win, func):
991 win.Connect(-1, -1, wxEVT_PALETTE_CHANGED, func)
992
993def EVT_QUERY_NEW_PALETTE(win, func):
994 win.Connect(-1, -1, wxEVT_QUERY_NEW_PALETTE, func)
995
996def EVT_WINDOW_CREATE(win, func):
b7e72427 997 win.Connect(-1, -1, wxEVT_CREATE, func)
3af4e610
RD
998
999def EVT_WINDOW_DESTROY(win, func):
b7e72427 1000 win.Connect(-1, -1, wxEVT_DESTROY, func)
3af4e610
RD
1001
1002
1003
cf694132
RD
1004def EVT_IDLE(win, func):
1005 win.Connect(-1, -1, wxEVT_IDLE, func)
1006
bb0054cd
RD
1007def EVT_UPDATE_UI(win, id, func):
1008 win.Connect(id, -1, wxEVT_UPDATE_UI, func)
1009
eb715945
RD
1010def EVT_UPDATE_UI_RANGE(win, id, id2, func):
1011 win.Connect(id, id2, wxEVT_UPDATE_UI, func)
1012
b8b8dda7
RD
1013
1014# Mouse Events
1015def EVT_LEFT_DOWN(win, func):
1016 win.Connect(-1, -1, wxEVT_LEFT_DOWN, func)
1017
1018def EVT_LEFT_UP(win, func):
1019 win.Connect(-1, -1, wxEVT_LEFT_UP, func)
1020
1021def EVT_MIDDLE_DOWN(win, func):
1022 win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func)
1023
1024def EVT_MIDDLE_UP(win, func):
1025 win.Connect(-1, -1, wxEVT_MIDDLE_UP, func)
1026
1027def EVT_RIGHT_DOWN(win, func):
1028 win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func)
1029
1030def EVT_RIGHT_UP(win, func):
1031 win.Connect(-1, -1, wxEVT_RIGHT_UP, func)
1032
1033def EVT_MOTION(win, func):
1034 win.Connect(-1, -1, wxEVT_MOTION, func)
1035
1036def EVT_LEFT_DCLICK(win, func):
1037 win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func)
1038
1039def EVT_MIDDLE_DCLICK(win, func):
1040 win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func)
1041
1042def EVT_RIGHT_DCLICK(win, func):
1043 win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func)
1044
1045def EVT_LEAVE_WINDOW(win, func):
1046 win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func)
1047
1048def EVT_ENTER_WINDOW(win, func):
1049 win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func)
1050
d1679124
RD
1051def EVT_MOUSEWHEEL(win, func):
1052 win.Connect(-1, -1, wxEVT_MOUSEWHEEL, func)
b8b8dda7
RD
1053
1054# all mouse events
1055def EVT_MOUSE_EVENTS(win, func):
1056 win.Connect(-1, -1, wxEVT_LEFT_DOWN, func)
1057 win.Connect(-1, -1, wxEVT_LEFT_UP, func)
1058 win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func)
1059 win.Connect(-1, -1, wxEVT_MIDDLE_UP, func)
1060 win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func)
1061 win.Connect(-1, -1, wxEVT_RIGHT_UP, func)
1062 win.Connect(-1, -1, wxEVT_MOTION, func)
1063 win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func)
1064 win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func)
1065 win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func)
1066 win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func)
1067 win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func)
1068
1069# EVT_COMMAND
1070def EVT_COMMAND(win, id, cmd, func):
1071 win.Connect(id, -1, cmd, func)
1072
1073def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
1074 win.Connect(id1, id2, cmd, func)
1075
26b9cf27 1076
b8b8dda7
RD
1077# Scrolling
1078def EVT_SCROLL(win, func):
1079 win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
1080 win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
1081 win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
1082 win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
1083 win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
1084 win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
1085 win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func)
26b9cf27 1086 win.Connect(-1, -1, wxEVT_SCROLL_THUMBRELEASE,func)
b8b8dda7
RD
1087
1088def EVT_SCROLL_TOP(win, func):
1089 win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
1090
1091def EVT_SCROLL_BOTTOM(win, func):
1092 win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
1093
1094def EVT_SCROLL_LINEUP(win, func):
1095 win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
1096
1097def EVT_SCROLL_LINEDOWN(win, func):
1098 win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
1099
1100def EVT_SCROLL_PAGEUP(win, func):
1101 win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
1102
1103def EVT_SCROLL_PAGEDOWN(win, func):
1104 win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
1105
1106def EVT_SCROLL_THUMBTRACK(win, func):
1107 win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func)
1108
26b9cf27
RD
1109def EVT_SCROLL_THUMBRELEASE(win, func):
1110 win.Connect(-1, -1, wxEVT_SCROLL_THUMBRELEASE, func)
1111
b8b8dda7
RD
1112
1113
1114# Scrolling, with an id
1115def EVT_COMMAND_SCROLL(win, id, func):
1116 win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
1117 win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func)
1118 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
1119 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
1120 win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func)
1121 win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
1122 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
26b9cf27 1123 win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE,func)
b8b8dda7
RD
1124
1125def EVT_COMMAND_SCROLL_TOP(win, id, func):
1126 win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
1127
1128def EVT_COMMAND_SCROLL_BOTTOM(win, id, func):
1129 win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func)
1130
1131def EVT_COMMAND_SCROLL_LINEUP(win, id, func):
1132 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
1133
1134def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func):
1135 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
1136
1137def EVT_COMMAND_SCROLL_PAGEUP(win, id, func):
1138 win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func)
1139
1140def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func):
1141 win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
1142
1143def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func):
1144 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func)
1145
26b9cf27
RD
1146def EVT_COMMAND_SCROLL_THUMBRELEASE(win, id, func):
1147 win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE, func)
1148
d426c97e
RD
1149#---
1150def EVT_SCROLLWIN(win, func):
26b9cf27
RD
1151 win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
1152 win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM, func)
1153 win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP, func)
1154 win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
1155 win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP, func)
1156 win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
1157 win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
1158 win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBRELEASE,func)
d426c97e
RD
1159
1160def EVT_SCROLLWIN_TOP(win, func):
1161 win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
1162
1163def EVT_SCROLLWIN_BOTTOM(win, func):
1164 win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM, func)
1165
1166def EVT_SCROLLWIN_LINEUP(win, func):
1167 win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP, func)
1168
1169def EVT_SCROLLWIN_LINEDOWN(win, func):
1170 win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
1171
1172def EVT_SCROLLWIN_PAGEUP(win, func):
1173 win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP, func)
1174
1175def EVT_SCROLLWIN_PAGEDOWN(win, func):
1176 win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
1177
1178def EVT_SCROLLWIN_THUMBTRACK(win, func):
1179 win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
1180
26b9cf27
RD
1181def EVT_SCROLLWIN_THUMBRELEASE(win, func):
1182 win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBRELEASE, func)
1183
d426c97e
RD
1184
1185
1186# Scrolling, with an id
1187def EVT_COMMAND_SCROLLWIN(win, id, func):
26b9cf27
RD
1188 win.Connect(id, -1, wxEVT_SCROLLWIN_TOP, func)
1189 win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM, func)
1190 win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP, func)
1191 win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
1192 win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP, func)
1193 win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
1194 win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
1195 win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBRELEASE,func)
d426c97e
RD
1196
1197def EVT_COMMAND_SCROLLWIN_TOP(win, id, func):
1198 win.Connect(id, -1, wxEVT_SCROLLWIN_TOP, func)
1199
1200def EVT_COMMAND_SCROLLWIN_BOTTOM(win, id, func):
1201 win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM, func)
1202
1203def EVT_COMMAND_SCROLLWIN_LINEUP(win, id, func):
1204 win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP, func)
1205
1206def EVT_COMMAND_SCROLLWIN_LINEDOWN(win, id, func):
1207 win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
1208
1209def EVT_COMMAND_SCROLLWIN_PAGEUP(win, id, func):
1210 win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP, func)
1211
1212def EVT_COMMAND_SCROLLWIN_PAGEDOWN(win, id, func):
1213 win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
1214
1215def EVT_COMMAND_SCROLLWIN_THUMBTRACK(win, id, func):
1216 win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
b8b8dda7 1217
26b9cf27
RD
1218def EVT_COMMAND_SCROLLWIN_THUMBRELEASE(win, id, func):
1219 win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBRELEASE, func)
1220
1221
b8b8dda7
RD
1222# Convenience commands
1223def EVT_BUTTON(win, id, func):
1224 win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func)
1225
1226def EVT_CHECKBOX(win, id, func):
1227 win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func)
1228
1229def EVT_CHOICE(win, id, func):
1230 win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func)
1231
1232def EVT_LISTBOX(win, id, func):
1233 win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func)
1234
1235def EVT_LISTBOX_DCLICK(win, id, func):
1236 win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func)
1237
1238def EVT_TEXT(win, id, func):
1239 win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func)
1240
1241def EVT_TEXT_ENTER(win, id, func):
1242 win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func)
1243
00b6c4e3
RD
1244def EVT_TEXT_URL(win, id, func):
1245 win.Connect(id, -1, wxEVT_COMMAND_TEXT_URL, func)
1246
1247def EVT_TEXT_MAXLEN(win, id, func):
1248 win.Connect(id, -1, wxEVT_COMMAND_TEXT_MAXLEN, func)
1249
b8b8dda7
RD
1250def EVT_MENU(win, id, func):
1251 win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func)
1252
1253def EVT_MENU_RANGE(win, id1, id2, func):
1254 win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func)
1255
1256def EVT_SLIDER(win, id, func):
1257 win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func)
1258
1259def EVT_RADIOBOX(win, id, func):
1260 win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func)
1261
1262def EVT_RADIOBUTTON(win, id, func):
1263 win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func)
1264
1265def EVT_VLBOX(win, id, func):
1266 win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func)
1267
1268def EVT_COMBOBOX(win, id, func):
1269 win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func)
1270
1271def EVT_TOOL(win, id, func):
1272 win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func)
1273
3af4e610
RD
1274def EVT_TOOL_RANGE(win, id, id2, func):
1275 win.Connect(id, id2, wxEVT_COMMAND_TOOL_CLICKED, func)
1276
b8b8dda7
RD
1277def EVT_TOOL_RCLICKED(win, id, func):
1278 win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func)
1279
3af4e610
RD
1280def EVT_TOOL_RCLICKED_RANGE(win, id, id2, func):
1281 win.Connect(id, id2, wxEVT_COMMAND_TOOL_RCLICKED, func)
1282
b8b8dda7
RD
1283def EVT_TOOL_ENTER(win, id, func):
1284 win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func)
1285
1286def EVT_CHECKLISTBOX(win, id, func):
1287 win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func)
1288
3af4e610
RD
1289def EVT_SPINCTRL(win, id, func):
1290 win.Connect(id, -1, wxEVT_COMMAND_SPINCTRL_UPDATED, func)
1291
1292
b8b8dda7
RD
1293
1294# Generic command events
1295
1296def EVT_COMMAND_LEFT_CLICK(win, id, func):
1297 win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func)
1298
1299def EVT_COMMAND_LEFT_DCLICK(win, id, func):
1300 win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func)
1301
1302def EVT_COMMAND_RIGHT_CLICK(win, id, func):
1303 win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func)
1304
1305def EVT_COMMAND_RIGHT_DCLICK(win, id, func):
1306 win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func)
1307
1308def EVT_COMMAND_SET_FOCUS(win, id, func):
1309 win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func)
1310
1311def EVT_COMMAND_KILL_FOCUS(win, id, func):
1312 win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func)
1313
1314def EVT_COMMAND_ENTER(win, id, func):
1315 win.Connect(id, -1, wxEVT_COMMAND_ENTER, func)
1316
1317
1318# wxNotebook events
1319def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func):
1320 win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func)
1321
1322def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func):
1323 win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func)
1324
1325
b8b8dda7
RD
1326# wxSpinButton
1327def EVT_SPIN_UP(win, id, func):
1328 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
1329
1330def EVT_SPIN_DOWN(win, id, func):
f6bcfd97 1331 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
b8b8dda7
RD
1332
1333def EVT_SPIN(win, id, func):
b8b8dda7
RD
1334 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
1335
1336
b8b8dda7
RD
1337# wxTaskBarIcon
1338def EVT_TASKBAR_MOVE(win, func):
1339 win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func)
1340
1341def EVT_TASKBAR_LEFT_DOWN(win, func):
1342 win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func)
1343
1344def EVT_TASKBAR_LEFT_UP(win, func):
1345 win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func)
1346
1347def EVT_TASKBAR_RIGHT_DOWN(win, func):
1348 win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func)
1349
1350def EVT_TASKBAR_RIGHT_UP(win, func):
1351 win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func)
1352
1353def EVT_TASKBAR_LEFT_DCLICK(win, func):
1354 win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func)
1355
1356def EVT_TASKBAR_RIGHT_DCLICK(win, func):
1357 win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func)
1358
1359
08127323
RD
1360# wxSashWindow
1361def EVT_SASH_DRAGGED(win, id, func):
1362 win.Connect(id, -1, wxEVT_SASH_DRAGGED, func)
1363
1364def EVT_SASH_DRAGGED_RANGE(win, id1, id2, func):
1365 win.Connect(id1, id2, wxEVT_SASH_DRAGGED, func)
1366
1367def EVT_QUERY_LAYOUT_INFO(win, func):
1368 win.Connect(-1, -1, wxEVT_EVT_QUERY_LAYOUT_INFO, func)
1369
1370def EVT_CALCULATE_LAYOUT(win, func):
1371 win.Connect(-1, -1, wxEVT_EVT_CALCULATE_LAYOUT, func)
1372
1373
bb0054cd
RD
1374#wxSplitterWindow
1375def EVT_SPLITTER_SASH_POS_CHANGING(win, id, func):
1376 win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, func)
1377
1378def EVT_SPLITTER_SASH_POS_CHANGED(win, id, func):
1379 win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, func)
1380
1381def EVT_SPLITTER_UNSPLIT(win, id, func):
1382 win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_UNSPLIT, func)
1383
1384def EVT_SPLITTER_DOUBLECLICKED(win, id, func):
1385 win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, func)
1386
b8b8dda7 1387
f6bcfd97
BP
1388# wxTimer
1389def EVT_TIMER(win, id, func):
1390 win.Connect(id, -1, wxEVT_TIMER, func)
1391
c368d904
RD
1392# wxProcess
1393def EVT_END_PROCESS(eh, id, func):
1394 eh.Connect(id, -1, wxEVT_END_PROCESS, func)
f6bcfd97 1395
185d7c3e
RD
1396
1397# wxJoyStick
1398def EVT_JOY_DOWN(win, func):
ac346f50 1399 win.Connect(-1, -1, wxEVT_JOY_BUTTON_DOWN, func)
185d7c3e
RD
1400
1401def EVT_JOY_UP(win, func):
ac346f50 1402 win.Connect(-1, -1, wxEVT_JOY_BUTTON_UP, func)
185d7c3e
RD
1403
1404def EVT_JOY_MOVE(win, func):
1405 win.Connect(-1, -1, wxEVT_JOY_MOVE, func)
1406
1407def EVT_JOY_ZMOVE(win, func):
1408 win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func)
1409
1410def EVT_JOYSTICK_EVENTS(win, func):
ac346f50
RD
1411 win.Connect(-1, -1, wxEVT_JOY_BUTTON_DOWN, func)
1412 win.Connect(-1, -1, wxEVT_JOY_BUTTON_UP, func)
185d7c3e
RD
1413 win.Connect(-1, -1, wxEVT_JOY_MOVE, func)
1414 win.Connect(-1, -1, wxEVT_JOY_ZMOVE, func)
1415
d1679124
RD
1416
1417def EVT_TOGGLEBUTTON(win, id, func):
1418 win.Connect(id, -1, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, func)
1419
1420
4f3449b4
RD
1421
1422# Help events
1423def EVT_HELP(win, id, func):
1424 win.Connect(id, -1, wxEVT_HELP, func)
1425
1426def EVT_HELP_RANGE(win, id, id2, func):
1427 win.Connect(id, id2, wxEVT_HELP, func)
1428
1429def EVT_DETAILED_HELP(win, id, func):
1430 win.Connect(id, -1, wxEVT_DETAILED_HELP, func)
1431
1432def EVT_DETAILED_HELP_RANGE(win, id, id2, func):
1433 win.Connect(id, id2, wxEVT_DETAILED_HELP, func)
1434
1435def EVT_CONTEXT_MENU(win, func):
1436 win.Connect(-1, -1, wxEVT_CONTEXT_MENU, func)
1437
1438
b8b8dda7
RD
1439#----------------------------------------------------------------------
1440
1441class wxTimer(wxPyTimer):
185d7c3e
RD
1442 def __init__(self, evtHandler = None, id = -1):
1443 if evtHandler is None:
1444 wxPyTimer.__init__(self, self.Notify) # derived class must provide
1445 # Notify(self) method.
1446 else:
1447 wxPyTimer.__init__(self, None)
1448 self.SetOwner(evtHandler, id)
b8b8dda7 1449
b8b8dda7
RD
1450#----------------------------------------------------------------------
1451# aliases
1452
1453wxColor = wxColour
1454wxNamedColor = wxNamedColour
ecc08ead 1455wxPen = wxPyPen
293a0a86
RD
1456wxScrollbar = wxScrollBar
1457
11765138 1458
9b3d3bc4 1459# backwards compatibility
e508a2b6
RD
1460wxNoRefBitmap = wxBitmap
1461wxPyDefaultPosition = wxDefaultPosition
1462wxPyDefaultSize = wxDefaultSize
68320e40
RD
1463NULL = None
1464wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
1465wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
1466wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
00b6c4e3 1467
a3fbed81 1468#----------------------------------------------------------------------
00b6c4e3
RD
1469# wxGTK sets the locale when initialized. Doing this at the Python
1470# level should set it up to match what GTK is doing at the C level.
293a0a86
RD
1471if wxPlatform == "__WXGTK__":
1472 try:
1473 import locale
1474 locale.setlocale(locale.LC_ALL, "")
1475 except:
1476 pass
00b6c4e3
RD
1477
1478
a3fbed81
RD
1479
1480#----------------------------------------------------------------------
1481# wxWindows version numbers. wxPython version is in __version__.
1482
1483wxMAJOR_VERSION = wxc.wxMAJOR_VERSION
1484wxMINOR_VERSION = wxc.wxMINOR_VERSION
1485wxRELEASE_NUMBER = wxc.wxRELEASE_NUMBER
1486wxVERSION_STRING = wxc.wxVERSION_STRING
1487wxVERSION_NUMBER = wxc.wxVERSION_NUMBER
1488
1489wxVERSION = (wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
1490
1491
8bf5d46e
RD
1492#----------------------------------------------------------------------
1493# This helper function will take a wxPython object and convert it to
1494# another wxPython object type. This will not be able to create objects
f581a26d 1495# that are derived from wxPython classes by the user, only those that are
8bf5d46e
RD
1496# actually part of wxPython and directly corespond to C++ objects.
1497#
1498# This is useful in situations where some method returns a generic
1499# type such as wxWindow, but you know that it is actually some
1500# derived type such as a wxTextCtrl. You can't call wxTextCtrl specific
1501# methods on a wxWindow object, but you can use this function to
1502# create a wxTextCtrl object that will pass the same pointer to
1503# the C++ code. You use it like this:
1504#
1505# textCtrl = wxPyTypeCast(window, "wxTextCtrl")
1506#
1507#
1508# WARNING: Using this function to type cast objects into types that
1509# they are not is not recommended and is likely to cause your
1510# program to crash... Hard.
1511#
1512
1513def wxPyTypeCast(obj, typeStr):
83b18bab
RD
1514 if obj is None:
1515 return None
9416aa89
RD
1516 theClass = globals()[typeStr+"Ptr"]
1517 typeStr = __wxPyPtrTypeMap.get(typeStr, typeStr)
8bf5d46e 1518 if hasattr(obj, "this"):
2aab8f16
RD
1519 # if already the right type then just return it
1520 if isinstance(obj, theClass) or obj.__class__ is theClass:
9416aa89 1521 return obj
8bf5d46e
RD
1522 newPtr = ptrcast(obj.this, typeStr+"_p")
1523 else:
1524 newPtr = ptrcast(obj, typeStr+"_p")
8bf5d46e 1525 theObj = theClass(newPtr)
9b3d3bc4
RD
1526 if hasattr(obj, "this"):
1527 theObj.thisown = obj.thisown
8bf5d46e
RD
1528 return theObj
1529
1530
c856d372 1531#----------------------------------------------------------------------
b8b8dda7
RD
1532#----------------------------------------------------------------------
1533
2f90df85
RD
1534class wxPyOnDemandOutputWindow:
1535 def __init__(self, title = "wxPython: stdout/stderr"):
1536 self.frame = None
1537 self.title = title
c856d372 1538 self.parent = None
cf694132 1539
2f90df85
RD
1540 def SetParent(self, parent):
1541 self.parent = parent
b8b8dda7 1542
2f90df85
RD
1543 def OnCloseWindow(self, event):
1544 if self.frame != None:
1545 self.frame.Destroy()
1546 self.frame = None
1547 self.text = None
1548
6e18ca6c 1549 # These methods provide the file-like output behaviour.
2f90df85 1550 def write(self, str):
6e18ca6c
RD
1551 if not wxThread_IsMain():
1552 # Aquire the GUI mutex before making GUI calls. Mutex is released
0a651eb8 1553 # when locker is deleted at the end of this function.
6e18ca6c
RD
1554 locker = wxMutexGuiLocker()
1555
2f90df85 1556 if not self.frame:
0a651eb8
RD
1557 self.frame = wxFrame(self.parent, -1, self.title,
1558 style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
2f90df85
RD
1559 self.text = wxTextCtrl(self.frame, -1, "",
1560 style = wxTE_MULTILINE|wxTE_READONLY)
1561 self.frame.SetSize(wxSize(450, 300))
1562 self.frame.Show(true)
1563 EVT_CLOSE(self.frame, self.OnCloseWindow)
1564 self.text.AppendText(str)
1565
1566 def close(self):
eec92d76 1567 if self.frame != None:
6e18ca6c
RD
1568 if not wxThread_IsMain():
1569 locker = wxMutexGuiLocker()
c856d372 1570 self.frame.Close()
b8b8dda7 1571
b8b8dda7 1572
b8b8dda7
RD
1573_defRedirect = (wxPlatform == '__WXMSW__')
1574
1575#----------------------------------------------------------------------
1576# The main application class. Derive from this and implement an OnInit
1577# method that creates a frame and then calls self.SetTopWindow(frame)
1578
1579class wxApp(wxPyApp):
1580 error = 'wxApp.error'
2f90df85 1581 outputWindowClass = wxPyOnDemandOutputWindow
b8b8dda7
RD
1582
1583 def __init__(self, redirect=_defRedirect, filename=None):
1584 wxPyApp.__init__(self)
1585 self.stdioWin = None
1586 self.saveStdio = (sys.stdout, sys.stderr)
1587 if redirect:
1588 self.RedirectStdio(filename)
b8b8dda7
RD
1589 # this initializes wxWindows and then calls our OnInit
1590 _wxStart(self.OnInit)
1591
1592
1593 def __del__(self):
1594 try:
1595 self.RestoreStdio()
1596 except:
1597 pass
1598
2f90df85
RD
1599
1600 def SetTopWindow(self, frame):
1601 if self.stdioWin:
1602 self.stdioWin.SetParent(frame)
2f90df85
RD
1603 wxPyApp.SetTopWindow(self, frame)
1604
eec92d76 1605
2f90df85
RD
1606 def MainLoop(self):
1607 wxPyApp.MainLoop(self)
1608 self.RestoreStdio()
1609
eec92d76 1610
b8b8dda7
RD
1611 def RedirectStdio(self, filename):
1612 if filename:
1613 sys.stdout = sys.stderr = open(filename, 'a')
1614 else:
2f90df85 1615 self.stdioWin = self.outputWindowClass() # wxPyOnDemandOutputWindow
c856d372 1616 sys.stdout = sys.stderr = self.stdioWin
b8b8dda7 1617
eec92d76 1618
b8b8dda7
RD
1619 def RestoreStdio(self):
1620 sys.stdout, sys.stderr = self.saveStdio
c856d372 1621
b8b8dda7 1622
9b3d3bc4
RD
1623#----------------------------------------------------------------------------
1624
1625class wxPySimpleApp(wxApp):
83b18bab
RD
1626 def __init__(self, flag=0):
1627 wxApp.__init__(self, flag)
9b3d3bc4
RD
1628 def OnInit(self):
1629 return true
b8b8dda7 1630
2f90df85 1631
f6bcfd97
BP
1632class wxPyWidgetTester(wxApp):
1633 def __init__(self, size = (250, 100)):
1634 self.size = size
1635 wxApp.__init__(self, 0)
1636
1637 def OnInit(self):
1638 self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
1639 self.SetTopWindow(self.frame)
1640 return true
1641
1642 def SetWidget(self, widgetClass, *args):
1643 w = apply(widgetClass, (self.frame,) + args)
1644 self.frame.Show(true)
1645
b8b8dda7 1646#----------------------------------------------------------------------------
8bf5d46e 1647# DO NOT hold any other references to this object. This is how we know when
b1462dfa
RD
1648# to cleanup system resources that wxWin is holding. When this module is
1649# unloaded, the refcount on __cleanMeUp goes to zero and it calls the
1650# wxApp_CleanUp function.
1651
1652class __wxPyCleanup:
1653 def __init__(self):
1654 self.cleanup = wxc.wxApp_CleanUp
1655 def __del__(self):
1656 self.cleanup()
1657
8bf5d46e 1658__cleanMeUp = __wxPyCleanup()
9416aa89
RD
1659
1660#----------------------------------------------------------------------------
8bf5d46e 1661#----------------------------------------------------------------------------