Version 0.4 of wxPython for MSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,6 +11,10 @@ from events import *
|
||||
|
||||
from mdi import *
|
||||
|
||||
from frames import *
|
||||
|
||||
from stattool import *
|
||||
|
||||
from controls import *
|
||||
|
||||
from controls2 import *
|
||||
@@ -108,7 +112,6 @@ _wxSetDictionary = wxpc._wxSetDictionary
|
||||
wxMAJOR_VERSION = wxpc.wxMAJOR_VERSION
|
||||
wxMINOR_VERSION = wxpc.wxMINOR_VERSION
|
||||
wxRELEASE_NUMBER = wxpc.wxRELEASE_NUMBER
|
||||
UNKNOWN = wxpc.UNKNOWN
|
||||
NOT_FOUND = wxpc.NOT_FOUND
|
||||
wxVSCROLL = wxpc.wxVSCROLL
|
||||
wxHSCROLL = wxpc.wxHSCROLL
|
||||
@@ -149,6 +152,7 @@ wxBACKINGSTORE = wxpc.wxBACKINGSTORE
|
||||
wxTB_3DBUTTONS = wxpc.wxTB_3DBUTTONS
|
||||
wxTB_HORIZONTAL = wxpc.wxTB_HORIZONTAL
|
||||
wxTB_VERTICAL = wxpc.wxTB_VERTICAL
|
||||
wxTB_FLAT = wxpc.wxTB_FLAT
|
||||
wxCOLOURED = wxpc.wxCOLOURED
|
||||
wxFIXED_LENGTH = wxpc.wxFIXED_LENGTH
|
||||
wxALIGN_LEFT = wxpc.wxALIGN_LEFT
|
||||
@@ -451,6 +455,7 @@ WXK_NUMLOCK = wxpc.WXK_NUMLOCK
|
||||
WXK_SCROLL = wxpc.WXK_SCROLL
|
||||
WXK_PAGEUP = wxpc.WXK_PAGEUP
|
||||
WXK_PAGEDOWN = wxpc.WXK_PAGEDOWN
|
||||
wxCURSOR_NONE = wxpc.wxCURSOR_NONE
|
||||
wxCURSOR_ARROW = wxpc.wxCURSOR_ARROW
|
||||
wxCURSOR_BULLSEYE = wxpc.wxCURSOR_BULLSEYE
|
||||
wxCURSOR_CHAR = wxpc.wxCURSOR_CHAR
|
||||
@@ -665,6 +670,15 @@ def _StdFrameCallbacks(win):
|
||||
_checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
|
||||
|
||||
|
||||
def _StdDialogCallbacks(win):
|
||||
_StdWindowCallbacks(win)
|
||||
_checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK)
|
||||
_checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY)
|
||||
_checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL)
|
||||
_checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
|
||||
_checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK)
|
||||
|
||||
|
||||
def _StdOnScrollCallback(win):
|
||||
try: cb = getattr(win, "OnScroll")
|
||||
except: pass
|
||||
@@ -959,336 +973,8 @@ def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func):
|
||||
|
||||
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------
|
||||
# We need to add to the shadow classes a bit to facilitate callbacks via
|
||||
# virtual functions. These classes replace the shadows generated by SWIG.
|
||||
|
||||
class wxWindow(wxWindowPtr):
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(windowsc.new_wxWindow,(arg0.this,arg1,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
|
||||
class wxFrame(wxFramePtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(windowsc.new_wxFrame,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdFrameCallbacks(self)
|
||||
|
||||
|
||||
if wxPlatform == '__WXMSW__':
|
||||
class wxMiniFrame(wxMiniFramePtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(windowsc.new_wxMiniFrame,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdFrameCallbacks(self)
|
||||
|
||||
|
||||
class wxPanel(wxPanelPtr):
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(windowsc.new_wxPanel,(arg0.this,arg1,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
|
||||
class wxDialog(wxDialogPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(windowsc.new_wxDialog,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
_checkForCallback(self, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK)
|
||||
_checkForCallback(self, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY)
|
||||
_checkForCallback(self, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL)
|
||||
_checkForCallback(self, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
|
||||
_checkForCallback(self, "OnCharHook", wxEVT_CHAR_HOOK)
|
||||
|
||||
|
||||
class wxScrolledWindow(wxScrolledWindowPtr):
|
||||
def __init__(self,arg0,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
try: argl[2] = argl[2].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(windowsc.new_wxScrolledWindow,(arg0.this,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
_StdOnScrollCallback(self)
|
||||
|
||||
|
||||
|
||||
class wxMDIParentFrame(wxMDIParentFramePtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(mdic.new_wxMDIParentFrame,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdFrameCallbacks(self)
|
||||
|
||||
|
||||
class wxMDIChildFrame(wxMDIChildFramePtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(mdic.new_wxMDIChildFrame,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdFrameCallbacks(self)
|
||||
|
||||
|
||||
class wxMDIClientWindow(wxMDIClientWindowPtr):
|
||||
def __init__(self,arg0,*args) :
|
||||
self.this = apply(mdic.new_wxMDIClientWindow,(arg0.this,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
_StdOnScrollCallback(self)
|
||||
|
||||
|
||||
|
||||
class wxControl(wxControlPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxButton(wxButtonPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxButton,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxBitmapButton(wxBitmapButtonPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxBitmapButton,(arg0.this,arg1,arg2.this,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxCheckBox(wxCheckBoxPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxCheckBox,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
|
||||
|
||||
class wxChoice(wxChoicePtr):
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxChoice,(arg0.this,arg1,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxComboBox(wxComboBoxPtr):
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
try: argl[2] = argl[2].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxComboBox,(arg0.this,arg1,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxGauge(wxGaugePtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxGauge,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxStaticBox(wxStaticBoxPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxStaticBox,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxStaticText(wxStaticTextPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxStaticText,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxListBox(wxListBoxPtr):
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxListBox,(arg0.this,arg1,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxTextCtrl(wxTextCtrlPtr):
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
try: argl[2] = argl[2].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxTextCtrl,(arg0.this,arg1,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxScrollBar(wxScrollBarPtr):
|
||||
def __init__(self,arg0,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
try: argl[2] = argl[2].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxScrollBar,(arg0.this,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
if wxPlatform == '__WXMSW__':
|
||||
class wxSpinButton(wxSpinButtonPtr):
|
||||
def __init__(self,arg0,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
try: argl[2] = argl[2].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxSpinButton,(arg0.this,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxStaticBitmap(wxStaticBitmapPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxStaticBitmap,(arg0.this,arg1,arg2.this,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxRadioBox(wxRadioBoxPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxRadioBox,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxRadioButton(wxRadioButtonPtr):
|
||||
def __init__(self,arg0,arg1,arg2,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxRadioButton,(arg0.this,arg1,arg2,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
class wxSlider(wxSliderPtr):
|
||||
def __init__(self,arg0,arg1,arg2,arg3,arg4,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(controlsc.new_wxSlider,(arg0.this,arg1,arg2,arg3,arg4,)+args)
|
||||
self.thisown = 1
|
||||
_StdWindowCallbacks(self)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class wxTimer(wxPyTimer):
|
||||
def __init__(self):
|
||||
@@ -1382,8 +1068,8 @@ class wxApp(wxPyApp):
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.1 1998/08/18 21:52:31 RD
|
||||
# MSW version of the SWIG-generated files
|
||||
# Revision 1.2 1998/10/02 06:42:04 RD
|
||||
# Version 0.4 of wxPython for MSW.
|
||||
#
|
||||
# Revision 1.2 1998/08/18 19:48:12 RD
|
||||
# more wxGTK compatibility things.
|
||||
|
Reference in New Issue
Block a user