SWIGged updates for wxMSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-02-26 20:48:05 +00:00
parent 473419f996
commit 8258ba4fc1
2 changed files with 24 additions and 21 deletions

View File

@@ -809,10 +809,6 @@ wxHT_WINDOW_VERT_SCROLLBAR = wxc.wxHT_WINDOW_VERT_SCROLLBAR
wxHT_WINDOW_HORZ_SCROLLBAR = wxc.wxHT_WINDOW_HORZ_SCROLLBAR
wxHT_WINDOW_CORNER = wxc.wxHT_WINDOW_CORNER
wxHT_MAX = wxc.wxHT_MAX
FALSE = wxc.FALSE
false = wxc.false
TRUE = wxc.TRUE
true = wxc.true
wxEVT_NULL = wxc.wxEVT_NULL
wxEVT_FIRST = wxc.wxEVT_FIRST
wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED
@@ -1541,14 +1537,25 @@ wxPen = wxPyPen
wxScrollbar = wxScrollBar
wxPoint2D = wxPoint2DDouble
# Use Python's bool constants if available, make aliases if not
try:
True
except NameError:
True = 1==1
False = 1==0
# backwards compatibility
wxNoRefBitmap = wxBitmap
wxPyDefaultPosition = wxDefaultPosition
wxPyDefaultSize = wxDefaultSize
NULL = None
wxNoRefBitmap = wxBitmap
wxPyDefaultPosition = wxDefaultPosition
wxPyDefaultSize = wxDefaultSize
NULL = None
wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
false = FALSE = False
true = TRUE = True
# workarounds for bad wxRTTI names
__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
@@ -1625,8 +1632,8 @@ def wxPy_isinstance(obj, klasses):
import types
if sys.version[:3] < "2.2" and type(klasses) in [types.TupleType, types.ListType]:
for klass in klasses:
if isinstance(obj, klass): return true
return false
if isinstance(obj, klass): return True
return False
else:
return isinstance(obj, klasses)
@@ -1716,7 +1723,7 @@ class wxPyOnDemandOutputWindow:
self.text = wxTextCtrl(self.frame, -1, "",
style = wxTE_MULTILINE|wxTE_READONLY)
self.frame.SetSize(wxSize(450, 300))
self.frame.Show(true)
self.frame.Show(True)
EVT_CLOSE(self.frame, self.OnCloseWindow)
self.text.AppendText(str)
@@ -1737,7 +1744,7 @@ class wxApp(wxPyApp):
error = 'wxApp.error'
outputWindowClass = wxPyOnDemandOutputWindow
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=false):
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False):
wxPyApp.__init__(self)
self.stdioWin = None
self.saveStdio = (sys.stdout, sys.stderr)
@@ -1789,7 +1796,7 @@ class wxPySimpleApp(wxApp):
wxApp.__init__(self, flag)
def OnInit(self):
wxInitAllImageHandlers()
return true
return True
class wxPyWidgetTester(wxApp):
@@ -1800,11 +1807,11 @@ class wxPyWidgetTester(wxApp):
def OnInit(self):
self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
self.SetTopWindow(self.frame)
return true
return True
def SetWidget(self, widgetClass, *args):
w = apply(widgetClass, (self.frame,) + args)
self.frame.Show(true)
self.frame.Show(True)
#----------------------------------------------------------------------------
# DO NOT hold any other references to this object. This is how we