]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/msw/wxp.py
Some chicken-and-egg problems solved for wxPython on wxGTK
[wxWidgets.git] / utils / wxPython / src / msw / wxp.py
CommitLineData
8ab979d7
RD
1# This file was created automatically by SWIG.
2import wxpc
3
4from misc import *
5
6from windows import *
7
8from gdi import *
9
10from events import *
11
12from mdi import *
13
14from controls import *
15
16from controls2 import *
17
18from windows2 import *
19
20from cmndlgs import *
21class wxPyAppPtr(wxEvtHandlerPtr):
22 def __init__(self,this):
23 self.this = this
24 self.thisown = 0
25 def GetAppName(self):
26 val = wxpc.wxPyApp_GetAppName(self.this)
27 return val
28 def GetAuto3D(self):
29 val = wxpc.wxPyApp_GetAuto3D(self.this)
30 return val
31 def GetClassName(self):
32 val = wxpc.wxPyApp_GetClassName(self.this)
33 return val
34 def GetExitOnFrameDelete(self):
35 val = wxpc.wxPyApp_GetExitOnFrameDelete(self.this)
36 return val
37 def GetPrintMode(self):
38 val = wxpc.wxPyApp_GetPrintMode(self.this)
39 return val
40 def GetTopWindow(self):
41 val = wxpc.wxPyApp_GetTopWindow(self.this)
42 val = wxWindowPtr(val)
43 return val
44 def GetVendorName(self):
45 val = wxpc.wxPyApp_GetVendorName(self.this)
46 return val
47 def Dispatch(self):
48 val = wxpc.wxPyApp_Dispatch(self.this)
49 return val
50 def ExitMainLoop(self):
51 val = wxpc.wxPyApp_ExitMainLoop(self.this)
52 return val
53 def Initialized(self):
54 val = wxpc.wxPyApp_Initialized(self.this)
55 return val
56 def MainLoop(self):
57 val = wxpc.wxPyApp_MainLoop(self.this)
58 return val
59 def Pending(self):
60 val = wxpc.wxPyApp_Pending(self.this)
61 return val
62 def SetAppName(self,arg0):
63 val = wxpc.wxPyApp_SetAppName(self.this,arg0)
64 return val
65 def SetAuto3D(self,arg0):
66 val = wxpc.wxPyApp_SetAuto3D(self.this,arg0)
67 return val
68 def SetClassName(self,arg0):
69 val = wxpc.wxPyApp_SetClassName(self.this,arg0)
70 return val
71 def SetExitOnFrameDelete(self,arg0):
72 val = wxpc.wxPyApp_SetExitOnFrameDelete(self.this,arg0)
73 return val
74 def SetPrintMode(self,arg0):
75 val = wxpc.wxPyApp_SetPrintMode(self.this,arg0)
76 return val
77 def SetTopWindow(self,arg0):
78 val = wxpc.wxPyApp_SetTopWindow(self.this,arg0.this)
79 return val
80 def SetVendorName(self,arg0):
81 val = wxpc.wxPyApp_SetVendorName(self.this,arg0)
82 return val
83 def AfterMainLoop(self):
84 val = wxpc.wxPyApp_AfterMainLoop(self.this)
85 return val
86 def __repr__(self):
87 return "<C wxPyApp instance>"
88class wxPyApp(wxPyAppPtr):
89 def __init__(self) :
90 self.this = wxpc.new_wxPyApp()
91 self.thisown = 1
92
93
94
95
96
97
98#-------------- FUNCTION WRAPPERS ------------------
99
100_wxStart = wxpc._wxStart
101
102_wxSetDictionary = wxpc._wxSetDictionary
103
104
105
106#-------------- VARIABLE WRAPPERS ------------------
107
108wxMAJOR_VERSION = wxpc.wxMAJOR_VERSION
109wxMINOR_VERSION = wxpc.wxMINOR_VERSION
110wxRELEASE_NUMBER = wxpc.wxRELEASE_NUMBER
111UNKNOWN = wxpc.UNKNOWN
112NOT_FOUND = wxpc.NOT_FOUND
113wxVSCROLL = wxpc.wxVSCROLL
114wxHSCROLL = wxpc.wxHSCROLL
115wxCAPTION = wxpc.wxCAPTION
116wxDOUBLE_BORDER = wxpc.wxDOUBLE_BORDER
117wxSUNKEN_BORDER = wxpc.wxSUNKEN_BORDER
118wxRAISED_BORDER = wxpc.wxRAISED_BORDER
119wxBORDER = wxpc.wxBORDER
120wxSIMPLE_BORDER = wxpc.wxSIMPLE_BORDER
121wxSTATIC_BORDER = wxpc.wxSTATIC_BORDER
122wxTRANSPARENT_WINDOW = wxpc.wxTRANSPARENT_WINDOW
123wxNO_BORDER = wxpc.wxNO_BORDER
124wxUSER_COLOURS = wxpc.wxUSER_COLOURS
125wxNO_3D = wxpc.wxNO_3D
126wxTAB_TRAVERSAL = wxpc.wxTAB_TRAVERSAL
127wxHORIZONTAL = wxpc.wxHORIZONTAL
128wxVERTICAL = wxpc.wxVERTICAL
129wxBOTH = wxpc.wxBOTH
130wxCENTER_FRAME = wxpc.wxCENTER_FRAME
131wxSTAY_ON_TOP = wxpc.wxSTAY_ON_TOP
132wxICONIZE = wxpc.wxICONIZE
133wxMINIMIZE = wxpc.wxMINIMIZE
134wxMAXIMIZE = wxpc.wxMAXIMIZE
135wxTHICK_FRAME = wxpc.wxTHICK_FRAME
136wxSYSTEM_MENU = wxpc.wxSYSTEM_MENU
137wxMINIMIZE_BOX = wxpc.wxMINIMIZE_BOX
138wxMAXIMIZE_BOX = wxpc.wxMAXIMIZE_BOX
139wxTINY_CAPTION_HORIZ = wxpc.wxTINY_CAPTION_HORIZ
140wxTINY_CAPTION_VERT = wxpc.wxTINY_CAPTION_VERT
141wxRESIZE_BOX = wxpc.wxRESIZE_BOX
142wxRESIZE_BORDER = wxpc.wxRESIZE_BORDER
143wxDIALOG_MODAL = wxpc.wxDIALOG_MODAL
144wxDIALOG_MODELESS = wxpc.wxDIALOG_MODELESS
145wxDEFAULT_FRAME_STYLE = wxpc.wxDEFAULT_FRAME_STYLE
146wxDEFAULT_DIALOG_STYLE = wxpc.wxDEFAULT_DIALOG_STYLE
147wxRETAINED = wxpc.wxRETAINED
148wxBACKINGSTORE = wxpc.wxBACKINGSTORE
149wxTB_3DBUTTONS = wxpc.wxTB_3DBUTTONS
150wxTB_HORIZONTAL = wxpc.wxTB_HORIZONTAL
151wxTB_VERTICAL = wxpc.wxTB_VERTICAL
152wxCOLOURED = wxpc.wxCOLOURED
153wxFIXED_LENGTH = wxpc.wxFIXED_LENGTH
154wxALIGN_LEFT = wxpc.wxALIGN_LEFT
155wxALIGN_CENTER = wxpc.wxALIGN_CENTER
156wxALIGN_CENTRE = wxpc.wxALIGN_CENTRE
157wxALIGN_RIGHT = wxpc.wxALIGN_RIGHT
158wxLB_NEEDED_SB = wxpc.wxLB_NEEDED_SB
159wxLB_ALWAYS_SB = wxpc.wxLB_ALWAYS_SB
160wxLB_SORT = wxpc.wxLB_SORT
161wxLB_SINGLE = wxpc.wxLB_SINGLE
162wxLB_MULTIPLE = wxpc.wxLB_MULTIPLE
163wxLB_EXTENDED = wxpc.wxLB_EXTENDED
164wxLB_OWNERDRAW = wxpc.wxLB_OWNERDRAW
165wxLB_HSCROLL = wxpc.wxLB_HSCROLL
166wxPROCESS_ENTER = wxpc.wxPROCESS_ENTER
167wxPASSWORD = wxpc.wxPASSWORD
168wxTE_PROCESS_ENTER = wxpc.wxTE_PROCESS_ENTER
169wxTE_PASSWORD = wxpc.wxTE_PASSWORD
170wxTE_READONLY = wxpc.wxTE_READONLY
171wxTE_MULTILINE = wxpc.wxTE_MULTILINE
172wxCB_SIMPLE = wxpc.wxCB_SIMPLE
173wxCB_DROPDOWN = wxpc.wxCB_DROPDOWN
174wxCB_SORT = wxpc.wxCB_SORT
175wxCB_READONLY = wxpc.wxCB_READONLY
176wxRA_HORIZONTAL = wxpc.wxRA_HORIZONTAL
177wxRA_VERTICAL = wxpc.wxRA_VERTICAL
178wxRB_GROUP = wxpc.wxRB_GROUP
179wxGA_PROGRESSBAR = wxpc.wxGA_PROGRESSBAR
180wxGA_HORIZONTAL = wxpc.wxGA_HORIZONTAL
181wxGA_VERTICAL = wxpc.wxGA_VERTICAL
182wxSL_HORIZONTAL = wxpc.wxSL_HORIZONTAL
183wxSL_VERTICAL = wxpc.wxSL_VERTICAL
184wxSL_AUTOTICKS = wxpc.wxSL_AUTOTICKS
185wxSL_LABELS = wxpc.wxSL_LABELS
186wxSL_LEFT = wxpc.wxSL_LEFT
187wxSL_TOP = wxpc.wxSL_TOP
188wxSL_RIGHT = wxpc.wxSL_RIGHT
189wxSL_BOTTOM = wxpc.wxSL_BOTTOM
190wxSL_BOTH = wxpc.wxSL_BOTH
191wxSL_SELRANGE = wxpc.wxSL_SELRANGE
192wxSB_HORIZONTAL = wxpc.wxSB_HORIZONTAL
193wxSB_VERTICAL = wxpc.wxSB_VERTICAL
194wxBU_AUTODRAW = wxpc.wxBU_AUTODRAW
195wxBU_NOAUTODRAW = wxpc.wxBU_NOAUTODRAW
196wxTR_HAS_BUTTONS = wxpc.wxTR_HAS_BUTTONS
197wxTR_EDIT_LABELS = wxpc.wxTR_EDIT_LABELS
198wxLC_ICON = wxpc.wxLC_ICON
199wxLC_SMALL_ICON = wxpc.wxLC_SMALL_ICON
200wxLC_LIST = wxpc.wxLC_LIST
201wxLC_REPORT = wxpc.wxLC_REPORT
202wxLC_ALIGN_TOP = wxpc.wxLC_ALIGN_TOP
203wxLC_ALIGN_LEFT = wxpc.wxLC_ALIGN_LEFT
204wxLC_AUTOARRANGE = wxpc.wxLC_AUTOARRANGE
205wxLC_USER_TEXT = wxpc.wxLC_USER_TEXT
206wxLC_EDIT_LABELS = wxpc.wxLC_EDIT_LABELS
207wxLC_NO_HEADER = wxpc.wxLC_NO_HEADER
208wxLC_NO_SORT_HEADER = wxpc.wxLC_NO_SORT_HEADER
209wxLC_SINGLE_SEL = wxpc.wxLC_SINGLE_SEL
210wxLC_SORT_ASCENDING = wxpc.wxLC_SORT_ASCENDING
211wxLC_SORT_DESCENDING = wxpc.wxLC_SORT_DESCENDING
212wxLC_MASK_TYPE = wxpc.wxLC_MASK_TYPE
213wxLC_MASK_ALIGN = wxpc.wxLC_MASK_ALIGN
214wxLC_MASK_SORT = wxpc.wxLC_MASK_SORT
215wxSP_VERTICAL = wxpc.wxSP_VERTICAL
216wxSP_HORIZONTAL = wxpc.wxSP_HORIZONTAL
217wxSP_ARROW_KEYS = wxpc.wxSP_ARROW_KEYS
218wxSP_WRAP = wxpc.wxSP_WRAP
219wxSP_NOBORDER = wxpc.wxSP_NOBORDER
220wxSP_3D = wxpc.wxSP_3D
221wxSP_BORDER = wxpc.wxSP_BORDER
222wxTAB_MULTILINE = wxpc.wxTAB_MULTILINE
223wxTAB_RIGHTJUSTIFY = wxpc.wxTAB_RIGHTJUSTIFY
224wxTAB_FIXEDWIDTH = wxpc.wxTAB_FIXEDWIDTH
225wxTAB_OWNERDRAW = wxpc.wxTAB_OWNERDRAW
226wxFLOOD_SURFACE = wxpc.wxFLOOD_SURFACE
227wxFLOOD_BORDER = wxpc.wxFLOOD_BORDER
228wxODDEVEN_RULE = wxpc.wxODDEVEN_RULE
229wxWINDING_RULE = wxpc.wxWINDING_RULE
230wxTOOL_TOP = wxpc.wxTOOL_TOP
231wxTOOL_BOTTOM = wxpc.wxTOOL_BOTTOM
232wxTOOL_LEFT = wxpc.wxTOOL_LEFT
233wxTOOL_RIGHT = wxpc.wxTOOL_RIGHT
234wxOK = wxpc.wxOK
235wxYES_NO = wxpc.wxYES_NO
236wxCANCEL = wxpc.wxCANCEL
237wxYES = wxpc.wxYES
238wxNO = wxpc.wxNO
239wxICON_EXCLAMATION = wxpc.wxICON_EXCLAMATION
240wxICON_HAND = wxpc.wxICON_HAND
241wxICON_QUESTION = wxpc.wxICON_QUESTION
242wxICON_INFORMATION = wxpc.wxICON_INFORMATION
243wxICON_STOP = wxpc.wxICON_STOP
244wxICON_ASTERISK = wxpc.wxICON_ASTERISK
245wxICON_MASK = wxpc.wxICON_MASK
246wxCENTRE = wxpc.wxCENTRE
247wxCENTER = wxpc.wxCENTER
248wxSIZE_AUTO_WIDTH = wxpc.wxSIZE_AUTO_WIDTH
249wxSIZE_AUTO_HEIGHT = wxpc.wxSIZE_AUTO_HEIGHT
250wxSIZE_AUTO = wxpc.wxSIZE_AUTO
251wxSIZE_USE_EXISTING = wxpc.wxSIZE_USE_EXISTING
252wxSIZE_ALLOW_MINUS_ONE = wxpc.wxSIZE_ALLOW_MINUS_ONE
253wxDF_TEXT = wxpc.wxDF_TEXT
254wxDF_BITMAP = wxpc.wxDF_BITMAP
255wxDF_METAFILE = wxpc.wxDF_METAFILE
256wxDF_DIB = wxpc.wxDF_DIB
257wxDF_OEMTEXT = wxpc.wxDF_OEMTEXT
258wxDF_FILENAME = wxpc.wxDF_FILENAME
259wxPORTRAIT = wxpc.wxPORTRAIT
260wxLANDSCAPE = wxpc.wxLANDSCAPE
261wxID_OPEN = wxpc.wxID_OPEN
262wxID_CLOSE = wxpc.wxID_CLOSE
263wxID_NEW = wxpc.wxID_NEW
264wxID_SAVE = wxpc.wxID_SAVE
265wxID_SAVEAS = wxpc.wxID_SAVEAS
266wxID_REVERT = wxpc.wxID_REVERT
267wxID_EXIT = wxpc.wxID_EXIT
268wxID_UNDO = wxpc.wxID_UNDO
269wxID_REDO = wxpc.wxID_REDO
270wxID_HELP = wxpc.wxID_HELP
271wxID_PRINT = wxpc.wxID_PRINT
272wxID_PRINT_SETUP = wxpc.wxID_PRINT_SETUP
273wxID_PREVIEW = wxpc.wxID_PREVIEW
274wxID_ABOUT = wxpc.wxID_ABOUT
275wxID_HELP_CONTENTS = wxpc.wxID_HELP_CONTENTS
276wxID_HELP_COMMANDS = wxpc.wxID_HELP_COMMANDS
277wxID_HELP_PROCEDURES = wxpc.wxID_HELP_PROCEDURES
278wxID_HELP_CONTEXT = wxpc.wxID_HELP_CONTEXT
279wxID_CUT = wxpc.wxID_CUT
280wxID_COPY = wxpc.wxID_COPY
281wxID_PASTE = wxpc.wxID_PASTE
282wxID_CLEAR = wxpc.wxID_CLEAR
283wxID_FIND = wxpc.wxID_FIND
284wxID_FILE1 = wxpc.wxID_FILE1
285wxID_FILE2 = wxpc.wxID_FILE2
286wxID_FILE3 = wxpc.wxID_FILE3
287wxID_FILE4 = wxpc.wxID_FILE4
288wxID_FILE5 = wxpc.wxID_FILE5
289wxID_FILE6 = wxpc.wxID_FILE6
290wxID_FILE7 = wxpc.wxID_FILE7
291wxID_FILE8 = wxpc.wxID_FILE8
292wxID_FILE9 = wxpc.wxID_FILE9
293wxID_OK = wxpc.wxID_OK
294wxID_CANCEL = wxpc.wxID_CANCEL
295wxID_APPLY = wxpc.wxID_APPLY
296wxID_YES = wxpc.wxID_YES
297wxID_NO = wxpc.wxID_NO
298wxBITMAP_TYPE_BMP = wxpc.wxBITMAP_TYPE_BMP
299wxBITMAP_TYPE_BMP_RESOURCE = wxpc.wxBITMAP_TYPE_BMP_RESOURCE
300wxBITMAP_TYPE_ICO = wxpc.wxBITMAP_TYPE_ICO
301wxBITMAP_TYPE_ICO_RESOURCE = wxpc.wxBITMAP_TYPE_ICO_RESOURCE
302wxBITMAP_TYPE_CUR = wxpc.wxBITMAP_TYPE_CUR
303wxBITMAP_TYPE_CUR_RESOURCE = wxpc.wxBITMAP_TYPE_CUR_RESOURCE
304wxBITMAP_TYPE_XBM = wxpc.wxBITMAP_TYPE_XBM
305wxBITMAP_TYPE_XBM_DATA = wxpc.wxBITMAP_TYPE_XBM_DATA
306wxBITMAP_TYPE_XPM = wxpc.wxBITMAP_TYPE_XPM
307wxBITMAP_TYPE_XPM_DATA = wxpc.wxBITMAP_TYPE_XPM_DATA
308wxBITMAP_TYPE_TIF = wxpc.wxBITMAP_TYPE_TIF
309wxBITMAP_TYPE_TIF_RESOURCE = wxpc.wxBITMAP_TYPE_TIF_RESOURCE
310wxBITMAP_TYPE_GIF = wxpc.wxBITMAP_TYPE_GIF
311wxBITMAP_TYPE_GIF_RESOURCE = wxpc.wxBITMAP_TYPE_GIF_RESOURCE
312wxBITMAP_TYPE_PNG = wxpc.wxBITMAP_TYPE_PNG
313wxBITMAP_TYPE_PNG_RESOURCE = wxpc.wxBITMAP_TYPE_PNG_RESOURCE
314wxBITMAP_TYPE_ANY = wxpc.wxBITMAP_TYPE_ANY
315wxBITMAP_TYPE_RESOURCE = wxpc.wxBITMAP_TYPE_RESOURCE
316wxOPEN = wxpc.wxOPEN
317wxSAVE = wxpc.wxSAVE
318wxHIDE_READONLY = wxpc.wxHIDE_READONLY
319wxOVERWRITE_PROMPT = wxpc.wxOVERWRITE_PROMPT
320wxACCEL_ALT = wxpc.wxACCEL_ALT
321wxACCEL_CTRL = wxpc.wxACCEL_CTRL
322wxACCEL_SHIFT = wxpc.wxACCEL_SHIFT
323ERR_PARAM = wxpc.ERR_PARAM
324ERR_NODATA = wxpc.ERR_NODATA
325ERR_CANCEL = wxpc.ERR_CANCEL
326ERR_SUCCESS = wxpc.ERR_SUCCESS
327wxDEFAULT = wxpc.wxDEFAULT
328wxDECORATIVE = wxpc.wxDECORATIVE
329wxROMAN = wxpc.wxROMAN
330wxSCRIPT = wxpc.wxSCRIPT
331wxSWISS = wxpc.wxSWISS
332wxMODERN = wxpc.wxMODERN
333wxTELETYPE = wxpc.wxTELETYPE
334wxVARIABLE = wxpc.wxVARIABLE
335wxFIXED = wxpc.wxFIXED
336wxNORMAL = wxpc.wxNORMAL
337wxLIGHT = wxpc.wxLIGHT
338wxBOLD = wxpc.wxBOLD
339wxITALIC = wxpc.wxITALIC
340wxSLANT = wxpc.wxSLANT
341wxSOLID = wxpc.wxSOLID
342wxDOT = wxpc.wxDOT
343wxLONG_DASH = wxpc.wxLONG_DASH
344wxSHORT_DASH = wxpc.wxSHORT_DASH
345wxDOT_DASH = wxpc.wxDOT_DASH
346wxUSER_DASH = wxpc.wxUSER_DASH
347wxTRANSPARENT = wxpc.wxTRANSPARENT
348wxSTIPPLE = wxpc.wxSTIPPLE
349wxBDIAGONAL_HATCH = wxpc.wxBDIAGONAL_HATCH
350wxCROSSDIAG_HATCH = wxpc.wxCROSSDIAG_HATCH
351wxFDIAGONAL_HATCH = wxpc.wxFDIAGONAL_HATCH
352wxCROSS_HATCH = wxpc.wxCROSS_HATCH
353wxHORIZONTAL_HATCH = wxpc.wxHORIZONTAL_HATCH
354wxVERTICAL_HATCH = wxpc.wxVERTICAL_HATCH
355wxJOIN_BEVEL = wxpc.wxJOIN_BEVEL
356wxJOIN_MITER = wxpc.wxJOIN_MITER
357wxJOIN_ROUND = wxpc.wxJOIN_ROUND
358wxCAP_ROUND = wxpc.wxCAP_ROUND
359wxCAP_PROJECTING = wxpc.wxCAP_PROJECTING
360wxCAP_BUTT = wxpc.wxCAP_BUTT
361wxCLEAR = wxpc.wxCLEAR
362wxXOR = wxpc.wxXOR
363wxINVERT = wxpc.wxINVERT
364wxOR_REVERSE = wxpc.wxOR_REVERSE
365wxAND_REVERSE = wxpc.wxAND_REVERSE
366wxCOPY = wxpc.wxCOPY
367wxAND = wxpc.wxAND
368wxAND_INVERT = wxpc.wxAND_INVERT
369wxNO_OP = wxpc.wxNO_OP
370wxNOR = wxpc.wxNOR
371wxEQUIV = wxpc.wxEQUIV
372wxSRC_INVERT = wxpc.wxSRC_INVERT
373wxOR_INVERT = wxpc.wxOR_INVERT
374wxNAND = wxpc.wxNAND
375wxOR = wxpc.wxOR
376wxSET = wxpc.wxSET
377wxSRC_OR = wxpc.wxSRC_OR
378wxSRC_AND = wxpc.wxSRC_AND
379WXK_BACK = wxpc.WXK_BACK
380WXK_TAB = wxpc.WXK_TAB
381WXK_RETURN = wxpc.WXK_RETURN
382WXK_ESCAPE = wxpc.WXK_ESCAPE
383WXK_SPACE = wxpc.WXK_SPACE
384WXK_DELETE = wxpc.WXK_DELETE
385WXK_START = wxpc.WXK_START
386WXK_LBUTTON = wxpc.WXK_LBUTTON
387WXK_RBUTTON = wxpc.WXK_RBUTTON
388WXK_CANCEL = wxpc.WXK_CANCEL
389WXK_MBUTTON = wxpc.WXK_MBUTTON
390WXK_CLEAR = wxpc.WXK_CLEAR
391WXK_SHIFT = wxpc.WXK_SHIFT
392WXK_CONTROL = wxpc.WXK_CONTROL
393WXK_MENU = wxpc.WXK_MENU
394WXK_PAUSE = wxpc.WXK_PAUSE
395WXK_CAPITAL = wxpc.WXK_CAPITAL
396WXK_PRIOR = wxpc.WXK_PRIOR
397WXK_NEXT = wxpc.WXK_NEXT
398WXK_END = wxpc.WXK_END
399WXK_HOME = wxpc.WXK_HOME
400WXK_LEFT = wxpc.WXK_LEFT
401WXK_UP = wxpc.WXK_UP
402WXK_RIGHT = wxpc.WXK_RIGHT
403WXK_DOWN = wxpc.WXK_DOWN
404WXK_SELECT = wxpc.WXK_SELECT
405WXK_PRINT = wxpc.WXK_PRINT
406WXK_EXECUTE = wxpc.WXK_EXECUTE
407WXK_SNAPSHOT = wxpc.WXK_SNAPSHOT
408WXK_INSERT = wxpc.WXK_INSERT
409WXK_HELP = wxpc.WXK_HELP
410WXK_NUMPAD0 = wxpc.WXK_NUMPAD0
411WXK_NUMPAD1 = wxpc.WXK_NUMPAD1
412WXK_NUMPAD2 = wxpc.WXK_NUMPAD2
413WXK_NUMPAD3 = wxpc.WXK_NUMPAD3
414WXK_NUMPAD4 = wxpc.WXK_NUMPAD4
415WXK_NUMPAD5 = wxpc.WXK_NUMPAD5
416WXK_NUMPAD6 = wxpc.WXK_NUMPAD6
417WXK_NUMPAD7 = wxpc.WXK_NUMPAD7
418WXK_NUMPAD8 = wxpc.WXK_NUMPAD8
419WXK_NUMPAD9 = wxpc.WXK_NUMPAD9
420WXK_MULTIPLY = wxpc.WXK_MULTIPLY
421WXK_ADD = wxpc.WXK_ADD
422WXK_SEPARATOR = wxpc.WXK_SEPARATOR
423WXK_SUBTRACT = wxpc.WXK_SUBTRACT
424WXK_DECIMAL = wxpc.WXK_DECIMAL
425WXK_DIVIDE = wxpc.WXK_DIVIDE
426WXK_F1 = wxpc.WXK_F1
427WXK_F2 = wxpc.WXK_F2
428WXK_F3 = wxpc.WXK_F3
429WXK_F4 = wxpc.WXK_F4
430WXK_F5 = wxpc.WXK_F5
431WXK_F6 = wxpc.WXK_F6
432WXK_F7 = wxpc.WXK_F7
433WXK_F8 = wxpc.WXK_F8
434WXK_F9 = wxpc.WXK_F9
435WXK_F10 = wxpc.WXK_F10
436WXK_F11 = wxpc.WXK_F11
437WXK_F12 = wxpc.WXK_F12
438WXK_F13 = wxpc.WXK_F13
439WXK_F14 = wxpc.WXK_F14
440WXK_F15 = wxpc.WXK_F15
441WXK_F16 = wxpc.WXK_F16
442WXK_F17 = wxpc.WXK_F17
443WXK_F18 = wxpc.WXK_F18
444WXK_F19 = wxpc.WXK_F19
445WXK_F20 = wxpc.WXK_F20
446WXK_F21 = wxpc.WXK_F21
447WXK_F22 = wxpc.WXK_F22
448WXK_F23 = wxpc.WXK_F23
449WXK_F24 = wxpc.WXK_F24
450WXK_NUMLOCK = wxpc.WXK_NUMLOCK
451WXK_SCROLL = wxpc.WXK_SCROLL
452WXK_PAGEUP = wxpc.WXK_PAGEUP
453WXK_PAGEDOWN = wxpc.WXK_PAGEDOWN
454wxCURSOR_ARROW = wxpc.wxCURSOR_ARROW
455wxCURSOR_BULLSEYE = wxpc.wxCURSOR_BULLSEYE
456wxCURSOR_CHAR = wxpc.wxCURSOR_CHAR
457wxCURSOR_CROSS = wxpc.wxCURSOR_CROSS
458wxCURSOR_HAND = wxpc.wxCURSOR_HAND
459wxCURSOR_IBEAM = wxpc.wxCURSOR_IBEAM
460wxCURSOR_LEFT_BUTTON = wxpc.wxCURSOR_LEFT_BUTTON
461wxCURSOR_MAGNIFIER = wxpc.wxCURSOR_MAGNIFIER
462wxCURSOR_MIDDLE_BUTTON = wxpc.wxCURSOR_MIDDLE_BUTTON
463wxCURSOR_NO_ENTRY = wxpc.wxCURSOR_NO_ENTRY
464wxCURSOR_PAINT_BRUSH = wxpc.wxCURSOR_PAINT_BRUSH
465wxCURSOR_PENCIL = wxpc.wxCURSOR_PENCIL
466wxCURSOR_POINT_LEFT = wxpc.wxCURSOR_POINT_LEFT
467wxCURSOR_POINT_RIGHT = wxpc.wxCURSOR_POINT_RIGHT
468wxCURSOR_QUESTION_ARROW = wxpc.wxCURSOR_QUESTION_ARROW
469wxCURSOR_RIGHT_BUTTON = wxpc.wxCURSOR_RIGHT_BUTTON
470wxCURSOR_SIZENESW = wxpc.wxCURSOR_SIZENESW
471wxCURSOR_SIZENS = wxpc.wxCURSOR_SIZENS
472wxCURSOR_SIZENWSE = wxpc.wxCURSOR_SIZENWSE
473wxCURSOR_SIZEWE = wxpc.wxCURSOR_SIZEWE
474wxCURSOR_SIZING = wxpc.wxCURSOR_SIZING
475wxCURSOR_SPRAYCAN = wxpc.wxCURSOR_SPRAYCAN
476wxCURSOR_WAIT = wxpc.wxCURSOR_WAIT
477wxCURSOR_WATCH = wxpc.wxCURSOR_WATCH
478wxCURSOR_BLANK = wxpc.wxCURSOR_BLANK
479FALSE = wxpc.FALSE
480false = wxpc.false
481TRUE = wxpc.TRUE
482true = wxpc.true
483wxEVT_NULL = wxpc.wxEVT_NULL
484wxEVT_FIRST = wxpc.wxEVT_FIRST
485wxEVT_COMMAND_BUTTON_CLICKED = wxpc.wxEVT_COMMAND_BUTTON_CLICKED
486wxEVT_COMMAND_CHECKBOX_CLICKED = wxpc.wxEVT_COMMAND_CHECKBOX_CLICKED
487wxEVT_COMMAND_CHOICE_SELECTED = wxpc.wxEVT_COMMAND_CHOICE_SELECTED
488wxEVT_COMMAND_LISTBOX_SELECTED = wxpc.wxEVT_COMMAND_LISTBOX_SELECTED
489wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxpc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
490wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxpc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
491wxEVT_COMMAND_TEXT_UPDATED = wxpc.wxEVT_COMMAND_TEXT_UPDATED
492wxEVT_COMMAND_TEXT_ENTER = wxpc.wxEVT_COMMAND_TEXT_ENTER
493wxEVT_COMMAND_MENU_SELECTED = wxpc.wxEVT_COMMAND_MENU_SELECTED
494wxEVT_COMMAND_SLIDER_UPDATED = wxpc.wxEVT_COMMAND_SLIDER_UPDATED
495wxEVT_COMMAND_RADIOBOX_SELECTED = wxpc.wxEVT_COMMAND_RADIOBOX_SELECTED
496wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxpc.wxEVT_COMMAND_RADIOBUTTON_SELECTED
497wxEVT_COMMAND_SCROLLBAR_UPDATED = wxpc.wxEVT_COMMAND_SCROLLBAR_UPDATED
498wxEVT_COMMAND_VLBOX_SELECTED = wxpc.wxEVT_COMMAND_VLBOX_SELECTED
499wxEVT_COMMAND_COMBOBOX_SELECTED = wxpc.wxEVT_COMMAND_COMBOBOX_SELECTED
500wxEVT_COMMAND_TOOL_CLICKED = wxpc.wxEVT_COMMAND_TOOL_CLICKED
501wxEVT_COMMAND_TOOL_RCLICKED = wxpc.wxEVT_COMMAND_TOOL_RCLICKED
502wxEVT_COMMAND_TOOL_ENTER = wxpc.wxEVT_COMMAND_TOOL_ENTER
503wxEVT_SET_FOCUS = wxpc.wxEVT_SET_FOCUS
504wxEVT_KILL_FOCUS = wxpc.wxEVT_KILL_FOCUS
505wxEVT_LEFT_DOWN = wxpc.wxEVT_LEFT_DOWN
506wxEVT_LEFT_UP = wxpc.wxEVT_LEFT_UP
507wxEVT_MIDDLE_DOWN = wxpc.wxEVT_MIDDLE_DOWN
508wxEVT_MIDDLE_UP = wxpc.wxEVT_MIDDLE_UP
509wxEVT_RIGHT_DOWN = wxpc.wxEVT_RIGHT_DOWN
510wxEVT_RIGHT_UP = wxpc.wxEVT_RIGHT_UP
511wxEVT_MOTION = wxpc.wxEVT_MOTION
512wxEVT_ENTER_WINDOW = wxpc.wxEVT_ENTER_WINDOW
513wxEVT_LEAVE_WINDOW = wxpc.wxEVT_LEAVE_WINDOW
514wxEVT_LEFT_DCLICK = wxpc.wxEVT_LEFT_DCLICK
515wxEVT_MIDDLE_DCLICK = wxpc.wxEVT_MIDDLE_DCLICK
516wxEVT_RIGHT_DCLICK = wxpc.wxEVT_RIGHT_DCLICK
517wxEVT_NC_LEFT_DOWN = wxpc.wxEVT_NC_LEFT_DOWN
518wxEVT_NC_LEFT_UP = wxpc.wxEVT_NC_LEFT_UP
519wxEVT_NC_MIDDLE_DOWN = wxpc.wxEVT_NC_MIDDLE_DOWN
520wxEVT_NC_MIDDLE_UP = wxpc.wxEVT_NC_MIDDLE_UP
521wxEVT_NC_RIGHT_DOWN = wxpc.wxEVT_NC_RIGHT_DOWN
522wxEVT_NC_RIGHT_UP = wxpc.wxEVT_NC_RIGHT_UP
523wxEVT_NC_MOTION = wxpc.wxEVT_NC_MOTION
524wxEVT_NC_ENTER_WINDOW = wxpc.wxEVT_NC_ENTER_WINDOW
525wxEVT_NC_LEAVE_WINDOW = wxpc.wxEVT_NC_LEAVE_WINDOW
526wxEVT_NC_LEFT_DCLICK = wxpc.wxEVT_NC_LEFT_DCLICK
527wxEVT_NC_MIDDLE_DCLICK = wxpc.wxEVT_NC_MIDDLE_DCLICK
528wxEVT_NC_RIGHT_DCLICK = wxpc.wxEVT_NC_RIGHT_DCLICK
529wxEVT_CHAR = wxpc.wxEVT_CHAR
530wxEVT_SCROLL_TOP = wxpc.wxEVT_SCROLL_TOP
531wxEVT_SCROLL_BOTTOM = wxpc.wxEVT_SCROLL_BOTTOM
532wxEVT_SCROLL_LINEUP = wxpc.wxEVT_SCROLL_LINEUP
533wxEVT_SCROLL_LINEDOWN = wxpc.wxEVT_SCROLL_LINEDOWN
534wxEVT_SCROLL_PAGEUP = wxpc.wxEVT_SCROLL_PAGEUP
535wxEVT_SCROLL_PAGEDOWN = wxpc.wxEVT_SCROLL_PAGEDOWN
536wxEVT_SCROLL_THUMBTRACK = wxpc.wxEVT_SCROLL_THUMBTRACK
537wxEVT_SIZE = wxpc.wxEVT_SIZE
538wxEVT_MOVE = wxpc.wxEVT_MOVE
539wxEVT_CLOSE_WINDOW = wxpc.wxEVT_CLOSE_WINDOW
540wxEVT_END_SESSION = wxpc.wxEVT_END_SESSION
541wxEVT_QUERY_END_SESSION = wxpc.wxEVT_QUERY_END_SESSION
542wxEVT_ACTIVATE_APP = wxpc.wxEVT_ACTIVATE_APP
543wxEVT_POWER = wxpc.wxEVT_POWER
544wxEVT_CHAR_HOOK = wxpc.wxEVT_CHAR_HOOK
545wxEVT_KEY_UP = wxpc.wxEVT_KEY_UP
546wxEVT_ACTIVATE = wxpc.wxEVT_ACTIVATE
547wxEVT_CREATE = wxpc.wxEVT_CREATE
548wxEVT_DESTROY = wxpc.wxEVT_DESTROY
549wxEVT_SHOW = wxpc.wxEVT_SHOW
550wxEVT_ICONIZE = wxpc.wxEVT_ICONIZE
551wxEVT_MAXIMIZE = wxpc.wxEVT_MAXIMIZE
552wxEVT_MOUSE_CAPTURE_CHANGED = wxpc.wxEVT_MOUSE_CAPTURE_CHANGED
553wxEVT_PAINT = wxpc.wxEVT_PAINT
554wxEVT_ERASE_BACKGROUND = wxpc.wxEVT_ERASE_BACKGROUND
555wxEVT_NC_PAINT = wxpc.wxEVT_NC_PAINT
556wxEVT_PAINT_ICON = wxpc.wxEVT_PAINT_ICON
557wxEVT_MENU_CHAR = wxpc.wxEVT_MENU_CHAR
558wxEVT_MENU_INIT = wxpc.wxEVT_MENU_INIT
559wxEVT_MENU_HIGHLIGHT = wxpc.wxEVT_MENU_HIGHLIGHT
560wxEVT_POPUP_MENU_INIT = wxpc.wxEVT_POPUP_MENU_INIT
561wxEVT_CONTEXT_MENU = wxpc.wxEVT_CONTEXT_MENU
562wxEVT_SYS_COLOUR_CHANGED = wxpc.wxEVT_SYS_COLOUR_CHANGED
563wxEVT_SETTING_CHANGED = wxpc.wxEVT_SETTING_CHANGED
564wxEVT_QUERY_NEW_PALETTE = wxpc.wxEVT_QUERY_NEW_PALETTE
565wxEVT_PALETTE_CHANGED = wxpc.wxEVT_PALETTE_CHANGED
566wxEVT_JOY_BUTTON_DOWN = wxpc.wxEVT_JOY_BUTTON_DOWN
567wxEVT_JOY_BUTTON_UP = wxpc.wxEVT_JOY_BUTTON_UP
568wxEVT_JOY_MOVE = wxpc.wxEVT_JOY_MOVE
569wxEVT_JOY_ZMOVE = wxpc.wxEVT_JOY_ZMOVE
570wxEVT_DROP_FILES = wxpc.wxEVT_DROP_FILES
571wxEVT_DRAW_ITEM = wxpc.wxEVT_DRAW_ITEM
572wxEVT_MEASURE_ITEM = wxpc.wxEVT_MEASURE_ITEM
573wxEVT_COMPARE_ITEM = wxpc.wxEVT_COMPARE_ITEM
574wxEVT_INIT_DIALOG = wxpc.wxEVT_INIT_DIALOG
575wxEVT_IDLE = wxpc.wxEVT_IDLE
576wxEVT_UPDATE_UI = wxpc.wxEVT_UPDATE_UI
577wxEVT_COMMAND_LEFT_CLICK = wxpc.wxEVT_COMMAND_LEFT_CLICK
578wxEVT_COMMAND_LEFT_DCLICK = wxpc.wxEVT_COMMAND_LEFT_DCLICK
579wxEVT_COMMAND_RIGHT_CLICK = wxpc.wxEVT_COMMAND_RIGHT_CLICK
580wxEVT_COMMAND_RIGHT_DCLICK = wxpc.wxEVT_COMMAND_RIGHT_DCLICK
581wxEVT_COMMAND_SET_FOCUS = wxpc.wxEVT_COMMAND_SET_FOCUS
582wxEVT_COMMAND_KILL_FOCUS = wxpc.wxEVT_COMMAND_KILL_FOCUS
583wxEVT_COMMAND_ENTER = wxpc.wxEVT_COMMAND_ENTER
584wxEVT_COMMAND_TREE_BEGIN_DRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_DRAG
585wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_RDRAG
586wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT
587wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_END_LABEL_EDIT
588wxEVT_COMMAND_TREE_DELETE_ITEM = wxpc.wxEVT_COMMAND_TREE_DELETE_ITEM
589wxEVT_COMMAND_TREE_GET_INFO = wxpc.wxEVT_COMMAND_TREE_GET_INFO
590wxEVT_COMMAND_TREE_SET_INFO = wxpc.wxEVT_COMMAND_TREE_SET_INFO
591wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDED
592wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDING
593wxEVT_COMMAND_TREE_SEL_CHANGED = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGED
594wxEVT_COMMAND_TREE_SEL_CHANGING = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGING
595wxEVT_COMMAND_TREE_KEY_DOWN = wxpc.wxEVT_COMMAND_TREE_KEY_DOWN
596wxEVT_COMMAND_LIST_BEGIN_DRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_DRAG
597wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_RDRAG
598wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
599wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_END_LABEL_EDIT
600wxEVT_COMMAND_LIST_DELETE_ITEM = wxpc.wxEVT_COMMAND_LIST_DELETE_ITEM
601wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxpc.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
602wxEVT_COMMAND_LIST_GET_INFO = wxpc.wxEVT_COMMAND_LIST_GET_INFO
603wxEVT_COMMAND_LIST_SET_INFO = wxpc.wxEVT_COMMAND_LIST_SET_INFO
604wxEVT_COMMAND_LIST_ITEM_SELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_SELECTED
605wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_DESELECTED
606wxEVT_COMMAND_LIST_KEY_DOWN = wxpc.wxEVT_COMMAND_LIST_KEY_DOWN
607wxEVT_COMMAND_LIST_INSERT_ITEM = wxpc.wxEVT_COMMAND_LIST_INSERT_ITEM
608wxEVT_COMMAND_LIST_COL_CLICK = wxpc.wxEVT_COMMAND_LIST_COL_CLICK
609wxEVT_COMMAND_TAB_SEL_CHANGED = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGED
610wxEVT_COMMAND_TAB_SEL_CHANGING = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGING
611wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
612wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
613__version__ = wxpc.__version__
614cvar = wxpc.cvar
615wxPyDefaultPosition = wxPointPtr(wxpc.cvar.wxPyDefaultPosition)
616wxPyDefaultSize = wxSizePtr(wxpc.cvar.wxPyDefaultSize)
617
618
619#-------------- USER INCLUDE -----------------------
620
621#----------------------------------------------------------------------------
622# Name: _extra.py
623# Purpose: This file is appended to the shadow class file generated
624# by SWIG. We add some unSWIGable things here.
625#
626# Author: Robin Dunn
627#
628# Created: 6/30/97
629# RCS-ID: $Id$
630# Copyright: (c) 1998 by Total Control Software
631# Licence: wxWindows license
632#----------------------------------------------------------------------------
633
634import sys
635
636#----------------------------------------------------------------------
637# This gives this module's dictionary to the C++ extension code...
638
639_wxSetDictionary(vars())
640
641
642#----------------------------------------------------------------------
643#----------------------------------------------------------------------
644# Helper function to link python methods to wxWindows virtual
645# functions by name.
646
647def _checkForCallback(obj, name, event, theID=-1):
648 try: cb = getattr(obj, name)
649 except: pass
650 else: obj.Connect(theID, -1, event, cb)
651
652def _StdWindowCallbacks(win):
653 _checkForCallback(win, "OnChar", wxEVT_CHAR)
654 _checkForCallback(win, "OnSize", wxEVT_SIZE)
655 _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND)
656 _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED)
657 _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG)
658 _checkForCallback(win, "OnIdle", wxEVT_IDLE)
659 _checkForCallback(win, "OnPaint", wxEVT_PAINT)
660
661def _StdFrameCallbacks(win):
662 _StdWindowCallbacks(win)
663 _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE)
664 _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT)
665 _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
666
667
668def _StdOnScrollCallback(win):
669 try: cb = getattr(win, "OnScroll")
670 except: pass
671 else: EVT_SCROLL(win, cb)
672
673
674
675#----------------------------------------------------------------------
676#----------------------------------------------------------------------
677# functions that look and act like the C++ Macros of the same name
678
679
680# Miscellaneous
681def EVT_SIZE(win, func):
682 win.Connect(-1, -1, wxEVT_SIZE, func)
683
684def EVT_MOVE(win, func):
685 win.Connect(-1, -1, wxEVT_MOVE, func)
686
687def EVT_CLOSE(win, func):
688 win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func)
689
690def EVT_PAINT(win, func):
691 win.Connect(-1, -1, wxEVT_PAINT, func)
692
693def EVT_ERASE_BACKGROUND(win, func):
694 win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func)
695
696def EVT_CHAR(win, func):
697 win.Connect(-1, -1, wxEVT_CHAR, func)
698
699def EVT_CHAR_HOOK(win, func):
700 win.Connect(-1, -1, wxEVT_CHAR_HOOK, func)
701
702def EVT_MENU_HIGHLIGHT(win, id, func):
703 win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
704
705def EVT_MENU_HIGHLIGHT_ALL(win, func):
706 win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func)
707
708def EVT_SET_FOCUS(win, func):
709 win.Connect(-1, -1, wxEVT_SET_FOCUS, func)
710
711def EVT_KILL_FOCUS(win, func):
712 win.Connect(-1, -1, wxEVT_KILL_FOCUS, func)
713
714def EVT_ACTIVATE(win, func):
715 win.Connect(-1, -1, wxEVT_ACTIVATE, func)
716
717def EVT_ACTIVATE_APP(win, func):
718 win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func)
719
720def EVT_END_SESSION(win, func):
721 win.Connect(-1, -1, wxEVT_END_SESSION, func)
722
723def EVT_QUERY_END_SESSION(win, func):
724 win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func)
725
726def EVT_DROP_FILES(win, func):
727 win.Connect(-1, -1, wxEVT_DROP_FILES, func)
728
729def EVT_INIT_DIALOG(win, func):
730 win.Connect(-1, -1, wxEVT_INIT_DIALOG, func)
731
732def EVT_SYS_COLOUR_CHANGED(win, func):
733 win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func)
734
735def EVT_SHOW(win, func):
736 win.Connect(-1, -1, wxEVT_SHOW, func)
737
738def EVT_MAXIMIZE(win, func):
739 win.Connect(-1, -1, wxEVT_MAXIMIZE, func)
740
741def EVT_ICONIZE(win, func):
742 win.Connect(-1, -1, wxEVT_ICONIZE, func)
743
744def EVT_NAVIGATION_KEY(win, func):
745 win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func)
746
747
748# Mouse Events
749def EVT_LEFT_DOWN(win, func):
750 win.Connect(-1, -1, wxEVT_LEFT_DOWN, func)
751
752def EVT_LEFT_UP(win, func):
753 win.Connect(-1, -1, wxEVT_LEFT_UP, func)
754
755def EVT_MIDDLE_DOWN(win, func):
756 win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func)
757
758def EVT_MIDDLE_UP(win, func):
759 win.Connect(-1, -1, wxEVT_MIDDLE_UP, func)
760
761def EVT_RIGHT_DOWN(win, func):
762 win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func)
763
764def EVT_RIGHT_UP(win, func):
765 win.Connect(-1, -1, wxEVT_RIGHT_UP, func)
766
767def EVT_MOTION(win, func):
768 win.Connect(-1, -1, wxEVT_MOTION, func)
769
770def EVT_LEFT_DCLICK(win, func):
771 win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func)
772
773def EVT_MIDDLE_DCLICK(win, func):
774 win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func)
775
776def EVT_RIGHT_DCLICK(win, func):
777 win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func)
778
779def EVT_LEAVE_WINDOW(win, func):
780 win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func)
781
782def EVT_ENTER_WINDOW(win, func):
783 win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func)
784
785
786# all mouse events
787def EVT_MOUSE_EVENTS(win, func):
788 win.Connect(-1, -1, wxEVT_LEFT_DOWN, func)
789 win.Connect(-1, -1, wxEVT_LEFT_UP, func)
790 win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func)
791 win.Connect(-1, -1, wxEVT_MIDDLE_UP, func)
792 win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func)
793 win.Connect(-1, -1, wxEVT_RIGHT_UP, func)
794 win.Connect(-1, -1, wxEVT_MOTION, func)
795 win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func)
796 win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func)
797 win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func)
798 win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func)
799 win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func)
800
801# EVT_COMMAND
802def EVT_COMMAND(win, id, cmd, func):
803 win.Connect(id, -1, cmd, func)
804
805def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
806 win.Connect(id1, id2, cmd, func)
807
808# Scrolling
809def EVT_SCROLL(win, func):
810 win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
811 win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
812 win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
813 win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
814 win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
815 win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
816 win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func)
817
818def EVT_SCROLL_TOP(win, func):
819 win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
820
821def EVT_SCROLL_BOTTOM(win, func):
822 win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
823
824def EVT_SCROLL_LINEUP(win, func):
825 win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
826
827def EVT_SCROLL_LINEDOWN(win, func):
828 win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
829
830def EVT_SCROLL_PAGEUP(win, func):
831 win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
832
833def EVT_SCROLL_PAGEDOWN(win, func):
834 win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
835
836def EVT_SCROLL_THUMBTRACK(win, func):
837 win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func)
838
839
840
841# Scrolling, with an id
842def EVT_COMMAND_SCROLL(win, id, func):
843 win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
844 win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func)
845 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
846 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
847 win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func)
848 win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
849 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
850
851def EVT_COMMAND_SCROLL_TOP(win, id, func):
852 win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
853
854def EVT_COMMAND_SCROLL_BOTTOM(win, id, func):
855 win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func)
856
857def EVT_COMMAND_SCROLL_LINEUP(win, id, func):
858 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
859
860def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func):
861 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
862
863def EVT_COMMAND_SCROLL_PAGEUP(win, id, func):
864 win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func)
865
866def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func):
867 win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
868
869def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func):
870 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func)
871
872
873# Convenience commands
874def EVT_BUTTON(win, id, func):
875 win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func)
876
877def EVT_CHECKBOX(win, id, func):
878 win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func)
879
880def EVT_CHOICE(win, id, func):
881 win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func)
882
883def EVT_LISTBOX(win, id, func):
884 win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func)
885
886def EVT_LISTBOX_DCLICK(win, id, func):
887 win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func)
888
889def EVT_TEXT(win, id, func):
890 win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func)
891
892def EVT_TEXT_ENTER(win, id, func):
893 win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func)
894
895def EVT_MENU(win, id, func):
896 win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func)
897
898def EVT_MENU_RANGE(win, id1, id2, func):
899 win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func)
900
901def EVT_SLIDER(win, id, func):
902 win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func)
903
904def EVT_RADIOBOX(win, id, func):
905 win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func)
906
907def EVT_RADIOBUTTON(win, id, func):
908 win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func)
909
910def EVT_VLBOX(win, id, func):
911 win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func)
912
913def EVT_COMBOBOX(win, id, func):
914 win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func)
915
916def EVT_TOOL(win, id, func):
917 win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func)
918
919def EVT_TOOL_RCLICKED(win, id, func):
920 win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func)
921
922def EVT_TOOL_ENTER(win, id, func):
923 win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func)
924
925def EVT_CHECKLISTBOX(win, id, func):
926 win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func)
927
928
929# Generic command events
930
931def EVT_COMMAND_LEFT_CLICK(win, id, func):
932 win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func)
933
934def EVT_COMMAND_LEFT_DCLICK(win, id, func):
935 win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func)
936
937def EVT_COMMAND_RIGHT_CLICK(win, id, func):
938 win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func)
939
940def EVT_COMMAND_RIGHT_DCLICK(win, id, func):
941 win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func)
942
943def EVT_COMMAND_SET_FOCUS(win, id, func):
944 win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func)
945
946def EVT_COMMAND_KILL_FOCUS(win, id, func):
947 win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func)
948
949def EVT_COMMAND_ENTER(win, id, func):
950 win.Connect(id, -1, wxEVT_COMMAND_ENTER, func)
951
952
953
954def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func):
955 win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func)
956
957def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func):
958 win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func)
959
960
961
962#----------------------------------------------------------------------
963#----------------------------------------------------------------------
964# We need to add to the shadow classes a bit to facilitate callbacks via
965# virtual functions. These classes replace the shadows generated by SWIG.
966
967class wxWindow(wxWindowPtr):
968 def __init__(self,arg0,arg1,*args) :
969 argl = map(None,args)
970 try: argl[0] = argl[0].this
971 except: pass
972 try: argl[1] = argl[1].this
973 except: pass
974 args = tuple(argl)
975 self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args)
976 self.thisown = 1
977 _StdWindowCallbacks(self)
978
979
980class wxFrame(wxFramePtr):
981 def __init__(self,arg0,arg1,arg2,*args) :
982 argl = map(None,args)
983 try: argl[0] = argl[0].this
984 except: pass
985 try: argl[1] = argl[1].this
986 except: pass
987 args = tuple(argl)
988 self.this = apply(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args)
989 self.thisown = 1
990 _StdFrameCallbacks(self)
991
992
993if wxPlatform == '__WXMSW__':
994 class wxMiniFrame(wxMiniFramePtr):
995 def __init__(self,arg0,arg1,arg2,*args) :
996 argl = map(None,args)
997 try: argl[0] = argl[0].this
998 except: pass
999 try: argl[1] = argl[1].this
1000 except: pass
1001 args = tuple(argl)
1002 self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args)
1003 self.thisown = 1
1004 _StdFrameCallbacks(self)
1005
1006
1007class wxPanel(wxPanelPtr):
1008 def __init__(self,arg0,arg1,*args) :
1009 argl = map(None,args)
1010 try: argl[0] = argl[0].this
1011 except: pass
1012 try: argl[1] = argl[1].this
1013 except: pass
1014 args = tuple(argl)
1015 self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args)
1016 self.thisown = 1
1017 _StdWindowCallbacks(self)
1018
1019
1020class wxDialog(wxDialogPtr):
1021 def __init__(self,arg0,arg1,arg2,*args) :
1022 argl = map(None,args)
1023 try: argl[0] = argl[0].this
1024 except: pass
1025 try: argl[1] = argl[1].this
1026 except: pass
1027 args = tuple(argl)
1028 self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args)
1029 self.thisown = 1
1030 _StdWindowCallbacks(self)
1031 _checkForCallback(self, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK)
1032 _checkForCallback(self, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY)
1033 _checkForCallback(self, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL)
1034 _checkForCallback(self, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
1035 _checkForCallback(self, "OnCharHook", wxEVT_CHAR_HOOK)
1036
1037
1038class wxScrolledWindow(wxScrolledWindowPtr):
1039 def __init__(self,arg0,*args) :
1040 argl = map(None,args)
1041 try: argl[1] = argl[1].this
1042 except: pass
1043 try: argl[2] = argl[2].this
1044 except: pass
1045 args = tuple(argl)
1046 self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args)
1047 self.thisown = 1
1048 _StdWindowCallbacks(self)
1049 _StdOnScrollCallback(self)
1050
1051
1052
1053class wxMDIParentFrame(wxMDIParentFramePtr):
1054 def __init__(self,arg0,arg1,arg2,*args) :
1055 argl = map(None,args)
1056 try: argl[0] = argl[0].this
1057 except: pass
1058 try: argl[1] = argl[1].this
1059 except: pass
1060 args = tuple(argl)
1061 self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args)
1062 self.thisown = 1
1063 _StdFrameCallbacks(self)
1064
1065
1066class wxMDIChildFrame(wxMDIChildFramePtr):
1067 def __init__(self,arg0,arg1,arg2,*args) :
1068 argl = map(None,args)
1069 try: argl[0] = argl[0].this
1070 except: pass
1071 try: argl[1] = argl[1].this
1072 except: pass
1073 args = tuple(argl)
1074 self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args)
1075 self.thisown = 1
1076 _StdFrameCallbacks(self)
1077
1078
1079class wxMDIClientWindow(wxMDIClientWindowPtr):
1080 def __init__(self,arg0,*args) :
1081 self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args)
1082 self.thisown = 1
1083 _StdWindowCallbacks(self)
1084 _StdOnScrollCallback(self)
1085
1086
1087
1088class wxControl(wxControlPtr):
1089 def __init__(self,this):
1090 self.this = this
1091 _StdWindowCallbacks(self)
1092
1093class wxButton(wxButtonPtr):
1094 def __init__(self,arg0,arg1,arg2,*args) :
1095 argl = map(None,args)
1096 try: argl[0] = argl[0].this
1097 except: pass
1098 try: argl[1] = argl[1].this
1099 except: pass
1100 args = tuple(argl)
1101 self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args)
1102 self.thisown = 1
1103 _StdWindowCallbacks(self)
1104
1105class wxBitmapButton(wxBitmapButtonPtr):
1106 def __init__(self,arg0,arg1,arg2,*args) :
1107 argl = map(None,args)
1108 try: argl[0] = argl[0].this
1109 except: pass
1110 try: argl[1] = argl[1].this
1111 except: pass
1112 args = tuple(argl)
1113 self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args)
1114 self.thisown = 1
1115 _StdWindowCallbacks(self)
1116
1117class wxCheckBox(wxCheckBoxPtr):
1118 def __init__(self,arg0,arg1,arg2,*args) :
1119 argl = map(None,args)
1120 try: argl[0] = argl[0].this
1121 except: pass
1122 try: argl[1] = argl[1].this
1123 except: pass
1124 args = tuple(argl)
1125 self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args)
1126 self.thisown = 1
1127 _StdWindowCallbacks(self)
1128
1129
1130
1131class wxChoice(wxChoicePtr):
1132 def __init__(self,arg0,arg1,*args) :
1133 argl = map(None,args)
1134 try: argl[0] = argl[0].this
1135 except: pass
1136 try: argl[1] = argl[1].this
1137 except: pass
1138 args = tuple(argl)
1139 self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args)
1140 self.thisown = 1
1141 _StdWindowCallbacks(self)
1142
1143class wxComboBox(wxComboBoxPtr):
1144 def __init__(self,arg0,arg1,*args) :
1145 argl = map(None,args)
1146 try: argl[1] = argl[1].this
1147 except: pass
1148 try: argl[2] = argl[2].this
1149 except: pass
1150 args = tuple(argl)
1151 self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args)
1152 self.thisown = 1
1153 _StdWindowCallbacks(self)
1154
1155class wxGauge(wxGaugePtr):
1156 def __init__(self,arg0,arg1,arg2,*args) :
1157 argl = map(None,args)
1158 try: argl[0] = argl[0].this
1159 except: pass
1160 try: argl[1] = argl[1].this
1161 except: pass
1162 args = tuple(argl)
1163 self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args)
1164 self.thisown = 1
1165 _StdWindowCallbacks(self)
1166
1167class wxStaticBox(wxStaticBoxPtr):
1168 def __init__(self,arg0,arg1,arg2,*args) :
1169 argl = map(None,args)
1170 try: argl[0] = argl[0].this
1171 except: pass
1172 try: argl[1] = argl[1].this
1173 except: pass
1174 args = tuple(argl)
1175 self.this = apply(controlsc.new_wxStaticBox,(arg0.this,arg1,arg2,)+args)
1176 self.thisown = 1
1177 _StdWindowCallbacks(self)
1178
1179class wxStaticText(wxStaticTextPtr):
1180 def __init__(self,arg0,arg1,arg2,*args) :
1181 argl = map(None,args)
1182 try: argl[0] = argl[0].this
1183 except: pass
1184 try: argl[1] = argl[1].this
1185 except: pass
1186 args = tuple(argl)
1187 self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args)
1188 self.thisown = 1
1189 _StdWindowCallbacks(self)
1190
1191class wxListBox(wxListBoxPtr):
1192 def __init__(self,arg0,arg1,*args) :
1193 argl = map(None,args)
1194 try: argl[0] = argl[0].this
1195 except: pass
1196 try: argl[1] = argl[1].this
1197 except: pass
1198 args = tuple(argl)
1199 self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args)
1200 self.thisown = 1
1201 _StdWindowCallbacks(self)
1202
1203class wxTextCtrl(wxTextCtrlPtr):
1204 def __init__(self,arg0,arg1,*args) :
1205 argl = map(None,args)
1206 try: argl[1] = argl[1].this
1207 except: pass
1208 try: argl[2] = argl[2].this
1209 except: pass
1210 args = tuple(argl)
1211 self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args)
1212 self.thisown = 1
1213 _StdWindowCallbacks(self)
1214
1215class wxScrollBar(wxScrollBarPtr):
1216 def __init__(self,arg0,*args) :
1217 argl = map(None,args)
1218 try: argl[1] = argl[1].this
1219 except: pass
1220 try: argl[2] = argl[2].this
1221 except: pass
1222 args = tuple(argl)
1223 self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args)
1224 self.thisown = 1
1225 _StdWindowCallbacks(self)
1226
1227if wxPlatform == '__WXMSW__':
1228 class wxSpinButton(wxSpinButtonPtr):
1229 def __init__(self,arg0,*args) :
1230 argl = map(None,args)
1231 try: argl[1] = argl[1].this
1232 except: pass
1233 try: argl[2] = argl[2].this
1234 except: pass
1235 args = tuple(argl)
1236 self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args)
1237 self.thisown = 1
1238 _StdWindowCallbacks(self)
1239
1240class wxStaticBitmap(wxStaticBitmapPtr):
1241 def __init__(self,arg0,arg1,arg2,*args) :
1242 argl = map(None,args)
1243 try: argl[0] = argl[0].this
1244 except: pass
1245 try: argl[1] = argl[1].this
1246 except: pass
1247 args = tuple(argl)
1248 self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args)
1249 self.thisown = 1
1250 _StdWindowCallbacks(self)
1251
1252class wxRadioBox(wxRadioBoxPtr):
1253 def __init__(self,arg0,arg1,arg2,*args) :
1254 argl = map(None,args)
1255 try: argl[0] = argl[0].this
1256 except: pass
1257 try: argl[1] = argl[1].this
1258 except: pass
1259 args = tuple(argl)
1260 self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args)
1261 self.thisown = 1
1262 _StdWindowCallbacks(self)
1263
1264class wxRadioButton(wxRadioButtonPtr):
1265 def __init__(self,arg0,arg1,arg2,*args) :
1266 argl = map(None,args)
1267 try: argl[0] = argl[0].this
1268 except: pass
1269 try: argl[1] = argl[1].this
1270 except: pass
1271 args = tuple(argl)
1272 self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args)
1273 self.thisown = 1
1274 _StdWindowCallbacks(self)
1275
1276class wxSlider(wxSliderPtr):
1277 def __init__(self,arg0,arg1,arg2,arg3,arg4,*args) :
1278 argl = map(None,args)
1279 try: argl[0] = argl[0].this
1280 except: pass
1281 try: argl[1] = argl[1].this
1282 except: pass
1283 args = tuple(argl)
1284 self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args)
1285 self.thisown = 1
1286 _StdWindowCallbacks(self)
1287
1288
1289
1290
1291
1292
1293class wxTimer(wxPyTimer):
1294 def __init__(self):
1295 wxPyTimer.__init__(self, self.Notify) # derived class must provide
1296 # Notify(self) method.
1297
1298#----------------------------------------------------------------------
1299# Some wxWin methods can take "NULL" as parameters, but the shadow classes
1300# expect an object with the SWIG pointer as a 'this' member. This class
1301# and instance fools the shadow into passing the NULL pointer.
1302
1303class NullObj:
1304 this = 'NULL' # SWIG converts this to (void*)0
1305
1306NULL = NullObj()
1307
1308
1309#----------------------------------------------------------------------
1310# aliases
1311
1312wxColor = wxColour
1313wxNamedColor = wxNamedColour
1314
1315wxPyDefaultPosition.Set(-1,-1)
1316wxPyDefaultSize.Set(-1,-1)
1317
1318#----------------------------------------------------------------------
1319
1320## class wxPyStdOutWindow(wxFrame):
1321## def __init__(self, title = "wxPython: stdout/stderr"):
1322## wxFrame.__init__(self, NULL, title)
1323## self.title = title
1324## self.text = wxTextWindow(self)
1325## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD))
1326## self.SetSize(-1,-1,400,200)
1327## self.Show(false)
1328## self.isShown = false
1329
1330## def write(self, str): # with this method,
1331## if not self.isShown:
1332## self.Show(true)
1333## self.isShown = true
1334## self.text.WriteText(str)
1335
1336## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it
1337## self.Show(false)
1338## self.isShown = false
1339
1340
1341_defRedirect = (wxPlatform == '__WXMSW__')
1342
1343#----------------------------------------------------------------------
1344# The main application class. Derive from this and implement an OnInit
1345# method that creates a frame and then calls self.SetTopWindow(frame)
1346
1347class wxApp(wxPyApp):
1348 error = 'wxApp.error'
1349
1350 def __init__(self, redirect=_defRedirect, filename=None):
1351 wxPyApp.__init__(self)
1352 self.stdioWin = None
1353 self.saveStdio = (sys.stdout, sys.stderr)
1354 if redirect:
1355 self.RedirectStdio(filename)
1356
1357 # this initializes wxWindows and then calls our OnInit
1358 _wxStart(self.OnInit)
1359
1360
1361 def __del__(self):
1362 try:
1363 self.RestoreStdio()
1364 except:
1365 pass
1366
1367 def RedirectStdio(self, filename):
1368 if filename:
1369 sys.stdout = sys.stderr = open(filename, 'a')
1370 else:
1371 raise self.error, 'wxPyStdOutWindow not yet implemented.'
1372 #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
1373
1374 def RestoreStdio(self):
1375 sys.stdout, sys.stderr = self.saveStdio
1376 if self.stdioWin != None:
1377 self.stdioWin.Show(false)
1378 self.stdioWin.Destroy()
1379 self.stdioWin = None
1380
1381
1382#----------------------------------------------------------------------------
1383#
1384# $Log$
1385# Revision 1.1 1998/08/18 21:52:31 RD
1386# MSW version of the SWIG-generated files
1387#
1388# Revision 1.2 1998/08/18 19:48:12 RD
1389# more wxGTK compatibility things.
1390#
1391# It builds now but there are serious runtime problems...
1392#
1393# Revision 1.1 1998/08/09 08:25:49 RD
1394# Initial version
1395#
1396#
1397