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