]> git.saurik.com Git - wxWidgets.git/commitdiff
Lots of little bug fixes, API updates, etc.
authorRobin Dunn <robin@alldunn.com>
Sat, 22 Nov 2003 22:57:49 +0000 (22:57 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 22 Nov 2003 22:57:49 +0000 (22:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

46 files changed:
wxPython/demo/ColourDB.py
wxPython/demo/ContextHelp.py
wxPython/demo/CustomDragAndDrop.py
wxPython/demo/DrawXXXList.py
wxPython/demo/EventManager.py
wxPython/demo/Layoutf.py
wxPython/demo/Main.py
wxPython/demo/PrintFramework.py
wxPython/demo/Sizers.py
wxPython/demo/Threads.py
wxPython/demo/URLDragAndDrop.py
wxPython/demo/run.py
wxPython/demo/wxArtProvider.py
wxPython/demo/wxCalendar.py
wxPython/demo/wxCalendarCtrl.py
wxPython/demo/wxDragImage.py
wxPython/demo/wxHtmlWindow.py
wxPython/demo/wxIntCtrl.py
wxPython/demo/wxMask.py
wxPython/demo/wxScrolledPanel.py
wxPython/demo/wxTimeCtrl.py
wxPython/src/_artprov.i
wxPython/src/_combobox.i
wxPython/src/_dc.i
wxPython/src/_dnd.i
wxPython/src/_printfw.i
wxPython/src/_tipwin.i
wxPython/src/_window.i
wxPython/src/drawlist.cpp
wxPython/src/gtk/controls.py
wxPython/src/gtk/controls_wrap.cpp
wxPython/src/gtk/core.py
wxPython/src/gtk/gdi.py
wxPython/src/gtk/html_wrap.cpp
wxPython/src/gtk/misc.py
wxPython/src/gtk/misc_wrap.cpp
wxPython/src/gtk/windows.py
wxPython/src/gtk/windows_wrap.cpp
wxPython/wx/lib/anchors.py
wxPython/wx/lib/calendar.py
wxPython/wx/lib/evtmgr.py
wxPython/wx/lib/rcsizer.py
wxPython/wx/lib/throbber.py
wxPython/wx/lib/timectrl.py
wxPython/wxPython/lib/calendar.py
wxPython/wxPython/lib/evtmgr.py

index e4995cfefabcf61a561256cafe8559fe36ef97fb..e07a27bf27bc00b0ee63ad52ab7396e1bc77b822 100644 (file)
@@ -47,7 +47,7 @@ class TestWindow(wxScrolledWindow):
         while x < sz.width:
             y = -dy
             while y < sz.height:
-                dc.DrawBitmap(self.bg_bmp, x, y)
+                dc.DrawBitmap(self.bg_bmp, (x, y))
                 y = y + h
             x = x + w
 
@@ -89,11 +89,12 @@ class TestWindow(wxScrolledWindow):
         for line in range(max(0,start), min(stop,numColours)):
             clr = colours[line]
             y = (line+1) * self.lineHeight + 2
-            dc.DrawText(clr, self.cellWidth, y)
+            dc.DrawText(clr, (self.cellWidth, y))
 
             brush = wxBrush(clr, wxSOLID)
             dc.SetBrush(brush)
-            dc.DrawRectangle(12 * self.cellWidth, y, 6 * self.cellWidth, self.textHeight)
+            dc.DrawRectangle((12 * self.cellWidth, y),
+                             (6 * self.cellWidth, self.textHeight))
 
         dc.EndDrawing()
 
index 044e36dbe60f6b7511e5c1db38eeb30b0b0c4c49..505d2130f85afefa18208a53dc518733ff8bdfbc 100644 (file)
@@ -1,6 +1,5 @@
 
 from wxPython.wx import *
-from wxPython.help import *
 
 #----------------------------------------------------------------------
 # We first have to set an application-wide help provider.  Normally you
@@ -27,25 +26,25 @@ class TestPanel(wxPanel):
         s = wxBoxSizer(wxHORIZONTAL)
         s.Add(cBtn, 0, wxALL, 5)
         s.Add(cBtnText, 0, wxALL, 5)
-        sizer.Add(20,20)
+        sizer.Add((20,20))
         sizer.Add(s)
 
         text = wxTextCtrl(self, -1, "Each sub-window can have its own help message",
                           size=(240, 60), style = wxTE_MULTILINE)
         text.SetHelpText("This is my very own help message.  This is a really long long long long long long long long long long long long long long long long long long long long message!")
-        sizer.Add(20,20)
+        sizer.Add((20,20))
         sizer.Add(text)
 
         text = wxTextCtrl(self, -1, "You can also intercept the help event if you like.  Watch the log window when you click here...",
                           size=(240, 60), style = wxTE_MULTILINE)
         text.SetHelpText("Yet another context help message.")
-        sizer.Add(20,20)
+        sizer.Add((20,20))
         sizer.Add(text)
         EVT_HELP(text, text.GetId(), self.OnCtxHelp)
 
         text = wxTextCtrl(self, -1, "This one displays the tip itself...",
                           size=(240, 60), style = wxTE_MULTILINE)
-        sizer.Add(20,20)
+        sizer.Add((20,20))
         sizer.Add(text)
         EVT_HELP(text, text.GetId(), self.OnCtxHelp2)
 
index 3fb49e5d02e20da6b86684f99f8ce199eb86a78e..eb8ffa3472ff773c5af898a567278d3c5e11e036 100644 (file)
@@ -39,7 +39,7 @@ class DoodlePad(wxWindow):
         dc.SetPen(wxPen(wxBLUE, 3))
         for line in self.lines:
             for coords in line:
-                apply(dc.DrawLine, coords)
+                dc.DrawLineXY(*coords)
         dc.EndDrawing()
 
 
@@ -71,7 +71,7 @@ class DoodlePad(wxWindow):
             dc.SetPen(wxPen(wxBLUE, 3))
             coords = (self.x, self.y) + event.GetPositionTuple()
             self.curLine.append(coords)
-            apply(dc.DrawLine, coords)
+            dc.DrawLineXY(*coords)
             self.x, self.y = event.GetPositionTuple()
             dc.EndDrawing()
 
@@ -197,7 +197,7 @@ class DoodleViewer(wxWindow):
         dc.SetPen(wxPen(wxRED, 3))
         for line in self.lines:
             for coords in line:
-                apply(dc.DrawLine, coords)
+                dc.DrawLineXY(*coords)
         dc.EndDrawing()
 
 #----------------------------------------------------------------------
@@ -239,7 +239,7 @@ class CustomDnDPanel(wxPanel):
         rbox.Add(rb2)
         box.Add(text1, 0, wxALL, 10)
         box.Add(rbox, 0, wxALIGN_CENTER)
-        box.Add(10,90)
+        box.Add((10,90))
         box.Add(text2, 0, wxALL, 10)
 
         sizer.Add(box)
index f22ec2e2d2bfcada458b21b9b3ee444cb0313b8f..0091b68c2a323c03e9525e241aa30f1c5f54e3fc 100644 (file)
@@ -108,7 +108,7 @@ def makeRandomColors(num):
     colors = []
     for i in range(num):
         c = whrandom.choice(colours)
-        colors.append(wxNamedColor(c))
+        colors.append(wxNamedColour(c))
     return colors
 
 
index 25da54f2cb8aeba2e3017c76d7993d84d54b43ef..0e99c94b47c93534cdbe8a97717db2aede17ebcc 100644 (file)
@@ -52,17 +52,17 @@ class TestPanel(wxPanel):
         message2 = wxStaticText(self, -1, txt)
         message2.SetFont(f1)
 
-        targetPanel = Tile(self, log, bgColor=wxColor(80,10,10), active=0)
+        targetPanel = Tile(self, log, bgColor=wxColour(80,10,10), active=0)
         buttonPanel = wxPanel(self ,-1)
         sizer       = wxBoxSizer(wxHORIZONTAL)
         target      = targetPanel.tile
 
-        sizer.Add(0,0,1)
+        sizer.Add((0,0), 1)
         for factor in [0.2, 0.3, 0.4, 0.5, 0.6, 0.7]:
             sizer.Add(Tile(buttonPanel, log, factor-0.05, target), 0, wxALIGN_CENTER)
-            sizer.Add(0,0,1)
+            sizer.Add((0,0),1)
             sizer.Add(Tile(buttonPanel, log, factor,      target), 0, wxALIGN_CENTER)
-            sizer.Add(0,0,1)
+            sizer.Add((0,0),1)
 
         buttonPanel.SetAutoLayout(1)
         buttonPanel.SetSizer(sizer)
@@ -88,9 +88,9 @@ class Tile(wxPanel):
     its border color in response to certain mouse
     events over its contained 'InnerTile'.
     """
-    normal = wxColor(150,150,150)
-    active = wxColor(250,245,245)
-    hover  = wxColor(210,220,210)
+    normal = wxColour(150,150,150)
+    active = wxColour(250,245,245)
+    hover  = wxColour(210,220,210)
 
     def __init__(self, parent, log, factor=1, thingToWatch=None, bgColor=None, active=1, size=(38,38), borderWidth=3):
         wxPanel.__init__(self, parent, -1, size=size, style=wxCLIP_CHILDREN)
@@ -128,10 +128,10 @@ class Tile(wxPanel):
 
 
 class InnerTile(wxPanel):
-    IDLE_COLOR  = wxColor( 80, 10, 10)
-    START_COLOR = wxColor(200, 70, 50)
-    FINAL_COLOR = wxColor( 20, 80,240)
-    OFF_COLOR   = wxColor(185,190,185)
+    IDLE_COLOR  = wxColour( 80, 10, 10)
+    START_COLOR = wxColour(200, 70, 50)
+    FINAL_COLOR = wxColour( 20, 80,240)
+    OFF_COLOR   = wxColour(185,190,185)
     # Some pre-computation.
     DELTAS            = map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get())
     START_COLOR_TUPLE = START_COLOR.Get()
@@ -188,7 +188,7 @@ class InnerTile(wxPanel):
         r = InnerTile.START_COLOR_TUPLE[0] + (InnerTile.DELTAS[0] * percent)
         g = InnerTile.START_COLOR_TUPLE[1] + (InnerTile.DELTAS[1] * percent)
         b = InnerTile.START_COLOR_TUPLE[2] + (InnerTile.DELTAS[2] * percent)
-        self.setColor(wxColor(int(r), int(g), int(b)))
+        self.setColor(wxColour(int(r), int(g), int(b)))
 
 
 
index b92faffedab377b1fe8ef5575bb9ce890ca315be..8a80e8a34fa66066dafb8b563c49199e16e53e9e 100644 (file)
@@ -11,15 +11,15 @@ class TestLayoutf(wxPanel):
         self.SetAutoLayout(True)
         EVT_BUTTON(self, 100, self.OnButton)
 
-        self.panelA = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
+        self.panelA = wxWindow(self, -1, style=wxSIMPLE_BORDER)
         self.panelA.SetBackgroundColour(wxBLUE)
         self.panelA.SetConstraints(Layoutf('t=t10#1;l=l10#1;b=b10#1;r%r50#1',(self,)))
 
-        self.panelB = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
+        self.panelB = wxWindow(self, -1, style=wxSIMPLE_BORDER)
         self.panelB.SetBackgroundColour(wxRED)
         self.panelB.SetConstraints(Layoutf('t=t10#1;r=r10#1;b%b30#1;l>10#2', (self,self.panelA)))
 
-        self.panelC = wxWindow(self, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
+        self.panelC = wxWindow(self, -1, style=wxSIMPLE_BORDER)
         self.panelC.SetBackgroundColour(wxWHITE)
         self.panelC.SetConstraints(Layoutf('t_10#3;r=r10#1;b=b10#1;l>10#2', (self,self.panelA,self.panelB)))
 
@@ -29,7 +29,7 @@ class TestLayoutf(wxPanel):
         b = wxButton(self.panelB, 100, ' Panel B ')
         b.SetConstraints(Layoutf('t=t2#1;r=r4#1;h*;w*', (self.panelB,)))
 
-        self.panelD = wxWindow(self.panelC, -1, wxPyDefaultPosition, wxPyDefaultSize, wxSIMPLE_BORDER)
+        self.panelD = wxWindow(self.panelC, -1, style=wxSIMPLE_BORDER)
         self.panelD.SetBackgroundColour(wxGREEN)
         self.panelD.SetConstraints(Layoutf('b%h50#1;r%w50#1;h=h#2;w=w#2', (self.panelC, b)))
 
index 70fdd3f0d1a0c30f191e74f8981b193156fd4859..d7c11064b9547a0503a6a789a477e25ca8ad1407 100644 (file)
@@ -143,6 +143,7 @@ _treeList = [
         'wxIntCtrl',
         'wxMimeTypesManager',
         'wxMaskedNumCtrl',
+        'wxScrolledPanel',
         'wxStyledTextCtrl_1',
         'wxStyledTextCtrl_2',
         'wxTimeCtrl',
index e0fdd41aa9ae794c4bec74a9edab619c4cb41358..58e40f8dab6e8f78b0a41d2f46b68ba002ebd299 100644 (file)
@@ -80,7 +80,7 @@ class MyPrintout(wxPrintout):
         #-------------------------------------------
 
         self.canvas.DoDrawing(dc, True)
-        dc.DrawText("Page: %d" % page, marginX/2, maxY-marginY)
+        dc.DrawText("Page: %d" % page, (marginX/2, maxY-marginY))
 
         return True
 
index 5bdcd38b3da1651db6c43281fb2c8bc2f2b7c8b9..609a13f043aa5f8cbe0202bdd114837c29dacb1f 100644 (file)
@@ -82,7 +82,7 @@ def makeSimpleBox7(win):
     box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
     box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND)
     box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND)
-    box.Add(60, 20, 0, wxEXPAND)
+    box.Add((60, 20), 0, wxEXPAND)
     box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND)
 
     return box
@@ -92,9 +92,9 @@ def makeSimpleBox7(win):
 def makeSimpleBox8(win):
     box = wxBoxSizer(wxVERTICAL)
     box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
-    box.Add(0,0, 1)
+    box.Add((0,0), 1)
     box.Add(wxButton(win, 1010, "two"), 0, wxALIGN_CENTER)
-    box.Add(0,0, 1)
+    box.Add((0,0), 1)
     box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND)
     box.Add(wxButton(win, 1010, "four"), 0, wxEXPAND)
 #    box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND)
index 25440e5106a18ba75363c0804cc96f3b5d57bf25..7da3ac6b5c2da66773da7944a2947f1c96be1f6a 100644 (file)
@@ -98,18 +98,18 @@ class GraphWindow(wxWindow):
         dc.SetBackground(wxBrush(self.GetBackgroundColour()))
         dc.Clear()
         dc.SetPen(wxPen(wxBLACK, 3, wxSOLID))
-        dc.DrawLine(self.linePos, 0, self.linePos, size.height-10)
+        dc.DrawLine((self.linePos, 0), (self.linePos, size.height-10))
 
         bh = ypos = self.barHeight
         for x in range(len(self.values)):
             label, val = self.values[x]
-            dc.DrawText(label, 5, ypos)
+            dc.DrawText(label, (5, ypos))
 
             if val:
                 color = self.colors[ x % len(self.colors) ]
                 dc.SetPen(wxPen(color))
                 dc.SetBrush(wxBrush(color))
-                dc.DrawRectangle(self.linePos+3, ypos, val, bh)
+                dc.DrawRectangle((self.linePos+3, ypos), (val, bh))
 
             ypos = ypos + 2*bh
             if ypos > size.height-10:
@@ -125,7 +125,7 @@ class GraphWindow(wxWindow):
 
         wdc = wxPaintDC(self)
         wdc.BeginDrawing()
-        wdc.Blit(0,0, size.width, size.height, dc, 0,0)
+        wdc.Blit((0,0), size, dc, (0,0))
         wdc.EndDrawing()
 
         dc.SelectObject(wxNullBitmap)
index 51c1a340ad6c6de7a3e235fbfcc160eb2afc72ec..bb93b95e122f0c3a40cd53c7725f51c41da7c12a 100644 (file)
@@ -42,15 +42,15 @@ class TestPanel(wxPanel):
         text.SetForegroundColour(wxBLUE)
         outsideSizer.Add(text, 0, wxEXPAND|wxALL, 5)
         outsideSizer.Add(wxStaticLine(self, -1), 0, wxEXPAND)
-        outsideSizer.Add(20,20)
+        outsideSizer.Add((20,20))
 
         self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, False))
 
         inSizer = wxFlexGridSizer(2, 2, 5, 5)
         inSizer.AddGrowableCol(0)
 
-        inSizer.Add(20,20)
-        inSizer.Add(20,20)
+        inSizer.Add((20,20))
+        inSizer.Add((20,20))
         inSizer.Add(wxStaticText(self, -1,
                                  "Drag URLs from your browser to\nthis window:",
                                  style = wxALIGN_RIGHT),
index 5ab859892898578ca83e9c83d5eb63a900a1609d..c3de97bec5b8322b83803d9c9797994c2847899d 100755 (executable)
@@ -48,7 +48,7 @@ class RunDemoApp(wx.App):
 
         self.SetAssertMode(assertMode)
 
-        frame = wx.Frame(None, -1, "RunDemo: " + self.name, pos=(50,50), size=(0,0),
+        frame = wx.Frame(None, -1, "RunDemo: " + self.name, pos=(50,50), size=(200,100),
                         style=wx.NO_FULL_REPAINT_ON_RESIZE|wx.DEFAULT_FRAME_STYLE)
         frame.CreateStatusBar()
         menuBar = wx.MenuBar()
index 5edd83d3a3c87483a67704681d948b66688c7413..3f0c02d75aeec1ad7503b923631b4b223ef61f23 100644 (file)
@@ -126,9 +126,9 @@ class TestPanel(wxPanel):
         fgs.AddWindow(cb, 0, wxALIGN_CENTRE|wxALL, 5)
         EVT_CHECKBOX(self, cb.GetId(), self.OnUseCustom)
 
-        fgs.AddSpacer(10, 10, 0, wxALIGN_CENTRE|wxALL, 5)
-        fgs.AddSpacer(10, 10, 0, wxALIGN_CENTRE|wxALL, 5)
-        fgs.AddSpacer(10, 10, 0, wxALIGN_CENTRE|wxALL, 5)
+        fgs.Add((10, 10), 0, wxALIGN_CENTRE|wxALL, 5)
+        fgs.Add((10, 10), 0, wxALIGN_CENTRE|wxALL, 5)
+        fgs.Add((10, 10), 0, wxALIGN_CENTRE|wxALL, 5)
 
         box = wxBoxSizer(wxVERTICAL)
         bmp = wxEmptyBitmap(16,16)
index 501e02c71c8c17e0a03b0db80ce5f50b2bfa15c8..f2d5c7057a3e78198f1ac6e4080891d23e1babfd 100644 (file)
@@ -612,17 +612,6 @@ def MessageDlg(self, message, type = 'Message'):
 
 #---------------------------------------------------------------------------
 
-def main():
-    app = MyApp(0)
-    app.MainLoop()
-
-
-if __name__ == '__main__':
-    main()
-
-
-#---------------------------------------------------------------------------
-
 def runTest(frame, nb, log):
     win = TestPanel(nb, log, frame)
     return win
@@ -640,3 +629,12 @@ See example for various methods used to set display month, year, and highlighted
 by Lorne White
 
 """
+
+
+
+
+if __name__ == '__main__':
+    import sys,os
+    import run
+    run.main(['', os.path.basename(sys.argv[0])])
+
index 21f1d9434f7eeb205cb07cc3cd4cc178fc1e5804..59d3cec76e1e04d140597c5d7167e5fd45d4abc5 100644 (file)
@@ -1,7 +1,7 @@
 
 from wxPython.wx import *
 from wxPython.calendar import *
-from wxPython.utils import *
+
 
 #----------------------------------------------------------------------
 
index 74ade7e0eaad69eca0d5a3431d5f4afaa2c2837f..8506fb72006003552128407a255d709fb46e58f7 100644 (file)
@@ -29,9 +29,9 @@ class DragShape:
             memDC = wxMemoryDC()
             memDC.SelectObject(self.bmp)
 
-            dc.Blit(self.pos.x, self.pos.y,
-                    self.bmp.GetWidth(), self.bmp.GetHeight(),
-                    memDC, 0, 0, op, True)
+            dc.Blit((self.pos.x, self.pos.y),
+                    (self.bmp.GetWidth(), self.bmp.GetHeight()),
+                    memDC, (0, 0), op, True)
 
             return True
         else:
@@ -74,7 +74,7 @@ class DragCanvas(wxScrolledWindow):
         dc.Clear()
         dc.SetTextForeground(wxRED)
         dc.SetFont(font)
-        dc.DrawText(text, 0, 0)
+        dc.DrawText(text, (0, 0))
         dc.SelectObject(wxNullBitmap)
         mask = wxMaskColour(bmp, bg_colour)
         bmp.SetMask(mask)
@@ -117,7 +117,7 @@ class DragCanvas(wxScrolledWindow):
         while x < sz.width:
             y = 0
             while y < sz.height:
-                dc.DrawBitmap(self.bg_bmp, x, y)
+                dc.DrawBitmap(self.bg_bmp, (x, y))
                 y = y + h
             x = x + w
 
index dc87749b14b964f3e3eafe66a9596a962ac38171..dd2819545bfb4fa474e940b511702feaaa242062 100644 (file)
@@ -7,6 +7,8 @@ import wxPython.lib.wxpTag
 
 from Main import opj
 
+##wxTrap()
+
 #----------------------------------------------------------------------
 
 # This shows how to catch the OnLinkClicked non-event.  (It's a virtual
index 8e86487d97dc8bd713c35171201543ca9374f88d..d4c48a1cd31306c5c25e2d6129dc88ece44bcac9 100644 (file)
@@ -33,14 +33,14 @@ class TestPanel( wxPanel ):
         grid.AddWindow( self.max, 0, wxALIGN_LEFT|wxALL, 5 )
 
         grid.AddWindow( self.limit_target, 0, wxALIGN_LEFT|wxALL, 5 )
-        grid.AddSpacer( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
+        grid.AddSpacer( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
         grid.AddWindow( self.allow_none, 0, wxALIGN_LEFT|wxALL, 5 )
-        grid.AddSpacer( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
+        grid.AddSpacer( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
         grid.AddWindow( self.allow_long, 0, wxALIGN_LEFT|wxALL, 5 )
-        grid.AddSpacer( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
+        grid.AddSpacer( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
 
-        grid.AddSpacer( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
-        grid.AddSpacer( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
+        grid.AddSpacer( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
+        grid.AddSpacer( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
 
         grid.AddWindow( label, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
         grid.AddWindow( self.target_ctl, 0, wxALIGN_LEFT|wxALL, 5 )
index 68b8468a867bf75560982f9b3e62ce986a6e1ca1..fb4f453497eae5d3c00e0c0089a045d666466254 100644 (file)
@@ -65,17 +65,17 @@ class TestMaskWindow(wxScrolledWindow):
         # make an interesting background...
         dc.SetPen(wxMEDIUM_GREY_PEN)
         for i in range(100):
-            dc.DrawLine(0,i*10,i*10,0)
+            dc.DrawLine((0,i*10), (i*10,0))
 
         # draw raw image, mask, and masked images
-        dc.DrawText('original image', 0,0)
-        dc.DrawBitmap(self.bmp_nomask, 0,20, 0)
-        dc.DrawText('with colour mask', 0,100)
-        dc.DrawBitmap(self.bmp_withcolourmask, 0,120, 1)
-        dc.DrawText('the mask image', 0,200)
-        dc.DrawBitmap(self.bmp_themask, 0,220, 0)
-        dc.DrawText('masked image', 0,300)
-        dc.DrawBitmap(self.bmp_withmask, 0,320, 1)
+        dc.DrawText('original image', (0,0))
+        dc.DrawBitmap(self.bmp_nomask, (0,20), 0)
+        dc.DrawText('with colour mask', (0,100))
+        dc.DrawBitmap(self.bmp_withcolourmask, (0,120), 1)
+        dc.DrawText('the mask image', (0,200))
+        dc.DrawBitmap(self.bmp_themask, (0,220), 0)
+        dc.DrawText('masked image', (0,300))
+        dc.DrawBitmap(self.bmp_withmask, (0,320), 1)
 
         cx,cy = self.bmp_themask.GetWidth(), self.bmp_themask.GetHeight()
 
@@ -84,9 +84,9 @@ class TestMaskWindow(wxScrolledWindow):
         i = 0
         for text, code in logicList:
             x,y = 120+150*(i%4), 20+100*(i/4)
-            dc.DrawText(text, x, y-20)
+            dc.DrawText(text, (x, y-20))
             mdc.SelectObject(self.bmp_withcolourmask)
-            dc.Blit(x,y, cx,cy, mdc, 0,0, code, True)
+            dc.Blit((x,y), (cx,cy), mdc, (0,0), code, True)
             i = i + 1
 
 
index c6b14bcca9ccfbd2ef5daf2517188559c19f0217..a0e89ae4214a946abeaad6cc9a630b6da4701cbd 100644 (file)
@@ -23,7 +23,7 @@ class TestPanel(wxScrolledPanel):
         desc.SetForegroundColour("Blue")
         vbox.Add(desc, 0, wxALIGN_LEFT|wxALL, 5)
         vbox.Add(wxStaticLine(self, -1, size=(1024,-1)), 0, wxALL, 5)
-        vbox.AddSpacer(20,20)
+        vbox.Add((20,20))
 
         words = text.split()
 
@@ -71,16 +71,16 @@ class TestPanel(wxScrolledPanel):
         panel3.SetupScrolling()
 
         hbox = wxBoxSizer(wxHORIZONTAL)
-        hbox.AddSpacer(20,20)
+        hbox.Add((20,20))
         hbox.Add(panel1, 0)
-        hbox.AddSpacer(40, 10)
+        hbox.Add((40, 10))
 
         vbox2 = wxBoxSizer(wxVERTICAL)
         vbox2.Add(panel2, 0)
-        vbox2.AddSpacer(20, 50)
+        vbox2.Add((20, 50))
 
         vbox2.Add(panel3, 0)
-        vbox2.AddSpacer(20, 10)
+        vbox2.Add((20, 10))
         hbox.Add(vbox2)
 
         vbox.AddSizer(hbox, 0)
index e6a5aeed2f463838e040318691bfd2b4304a6d08..c92640c1d09f4a2ad658edb87ace66d7a9791049 100644 (file)
@@ -81,8 +81,8 @@ class TestPanel( wxScrolledPanel ):
         self.target_ctrl = wxTimeCtrl( self, -1, name="new" )
 
         grid2 = wxFlexGridSizer( 0, 2, 0, 0 )
-        grid2.Add( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
-        grid2.Add( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
+        grid2.Add( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
+        grid2.Add( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
 
         grid2.Add( self.set_bounds, 0, wxALIGN_LEFT|wxALL, 5 )
         grid3 = wxFlexGridSizer( 0, 2, 5, 5 )
@@ -93,16 +93,16 @@ class TestPanel( wxScrolledPanel ):
         grid2.Add(grid3, 0, wxALIGN_LEFT )
 
         grid2.Add( self.limit_check, 0, wxALIGN_LEFT|wxALL, 5 )
-        grid2.Add( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
+        grid2.Add( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
 
-        grid2.Add( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
-        grid2.Add( 20, 0, 0, wxALIGN_LEFT|wxALL, 5 )
+        grid2.Add( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
+        grid2.Add( (20, 0), 0, wxALIGN_LEFT|wxALL, 5 )
         grid2.Add( label, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5 )
         grid2.Add( self.target_ctrl, 0, wxALIGN_LEFT|wxALL, 5 )
         boundsbox.Add(grid2, 0, wxALIGN_CENTER|wxEXPAND|wxALL, 5)
 
         vbox = wxBoxSizer( wxVERTICAL )
-        vbox.AddSpacer(20, 20)
+        vbox.Add( (20, 20) )
         vbox.Add( hbox, 0, wxALIGN_LEFT|wxALL, 5)
         vbox.Add( boundsbox, 0, wxALIGN_LEFT|wxALL, 5 )
 
index b8e9bbdd80bb39bd2956fe6328cf7bf377cf1542..70f1de40a9ead076cd1d1caf876bf26d4a026492 100644 (file)
@@ -108,7 +108,7 @@ public:
 
     %addtofunc wxPyArtProvider "self._setCallbackInfo(self, ArtProvider)"
     wxPyArtProvider();
-    ~wxPyArtProvider();
+//    ~wxPyArtProvider();
     
     void _setCallbackInfo(PyObject* self, PyObject* _class);
 
index 22aba5bff20f1a0e5958d3363cd9ddb939cf9977..1cc6d1c0d9d3a7f979cfdadc4fa692e9a6526568 100644 (file)
@@ -64,6 +64,7 @@ public:
     virtual long GetInsertionPoint() const;
     virtual long GetLastPosition() const;
     virtual void Replace(long from, long to, const wxString& value);
+    void SetSelection(int n);
     %name(SetMark) virtual void SetSelection(long from, long to);
     virtual void SetEditable(bool editable);
 
index b2ddce26ea0a4d2006834e4e993ef5044c07b391..da92e4ada93f371a5fbca894d98d4c888c504523 100644 (file)
@@ -513,13 +513,13 @@ public:
            raise ValueError('textlist and coords must have same length')
         if foregrounds is None:
            foregrounds = []
-        elif isinstance(foregrounds, wxColour):
+        elif isinstance(foregrounds, wx.Colour):
            foregrounds = [foregrounds]
         elif len(foregrounds) != len(coords):
            raise ValueError('foregrounds and coords must have same length')
         if backgrounds is None:
            backgrounds = []
-        elif isinstance(backgrounds, wxColour):
+        elif isinstance(backgrounds, wx.Colour):
            backgrounds = [backgrounds]
         elif len(backgrounds) != len(coords):
            raise ValueError('backgrounds and coords must have same length')
index 8e2ce47ab7b94f001ee1641744fcbc96c4abf64a..15f0f187776fd814111ad906c736bce90df3f2ef 100644 (file)
@@ -121,7 +121,9 @@ IMP_PYCALLBACK_BOOL_INTINT(wxPyDropTarget, wxDropTarget, OnDrop);
 %name(DropTarget) class wxPyDropTarget // : public wxDropTarget
 {
 public:
-    %addtofunc wxPyDropTarget "if args: args[1].thisown = 0; self._setCallbackInfo(self, DropTarget)"
+    %addtofunc wxPyDropTarget
+       "if args: args[0].thisown = 0;
+        self._setCallbackInfo(self, DropTarget)"
 
     wxPyDropTarget(wxDataObject *dataObject = NULL);
     void _setCallbackInfo(PyObject* self, PyObject* _class);
index f91b876a0bc37f0b7398775b93b9d035588f8432..81365330a0e380f10ef59eb24a9fc6a8a8acbe8a 100644 (file)
@@ -376,7 +376,7 @@ public:
 class wxPreviewCanvas: public wxScrolledWindow
 {
 public:
-    %addtofunc wxPreviewCanvas   "self._self._setOORInfo(self)"
+    %addtofunc wxPreviewCanvas   "self._setOORInfo(self)"
 
     wxPreviewCanvas(wxPrintPreview *preview,
                     wxWindow *parent,
@@ -389,7 +389,7 @@ public:
 
 class wxPreviewFrame : public wxFrame {
 public:
-    %addtofunc wxPreviewFrame   "self._self._setOORInfo(self)"
+    %addtofunc wxPreviewFrame   "self._setOORInfo(self)"
 
     wxPreviewFrame(wxPrintPreview* preview, wxFrame* parent, const wxString& title,
                    const wxPoint& pos = wxDefaultPosition,
@@ -429,7 +429,7 @@ enum {
 class wxPreviewControlBar: public wxPanel
 {
 public:
-    %addtofunc wxPreviewControlBar   "self._self._setOORInfo(self)"
+    %addtofunc wxPreviewControlBar   "self._setOORInfo(self)"
 
     wxPreviewControlBar(wxPrintPreview *preview,
                         long buttons,
index 5c908e258783435bcab117e89ec65cd9bd733e83..cb9b94187975ab3bc900b3ade1fd3a0f2493806f 100644 (file)
@@ -35,11 +35,10 @@ public:
     
     %extend {
         wxTipWindow(wxWindow *parent,
-                    const wxString* text,
+                    const wxString& text,
                     wxCoord maxLength = 100,
                     wxRect* rectBound = NULL) {
-            wxString tmp = *text;
-            return new wxTipWindow(parent, tmp, maxLength, NULL, rectBound);
+            return new wxTipWindow(parent, text, maxLength, NULL, rectBound);
         }
     }
 
index 5c0cf3a0e1fc9a644a35bf2c5603a3e4a5fb98f7..6bd8cd52646dd8d8215fa936e5eb844e286cafbe 100644 (file)
@@ -762,13 +762,13 @@ def DLG_PNT(win, point_or_x, y=None):
     if y is None:
         return win.ConvertDialogPointToPixels(point_or_x)
     else:
-        return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
+        return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
 
 def DLG_SZE(win, size_width, height=None):
     if height is None:
         return win.ConvertDialogSizeToPixels(size_width)
     else:
-        return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
+        return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
 }
 
 
index 0ec57b0ec5d5efb51bf622721466805173e6e422..b0516571e915c3d283644a3065c0e6be6f017abd 100644 (file)
@@ -274,7 +274,7 @@ PyObject* wxPyDrawTextList(wxDC& dc, PyObject* textList, PyObject* pyPoints, PyO
             else {
                 obj = PySequence_GetItem(foregroundList, i);
             }
-            if (! wxPyConvertSwigPtr(obj, (void **) &color, wxT("wxColour_p"))) {
+            if (! wxPyConvertSwigPtr(obj, (void **) &color, wxT("wxColour"))) {
                 if (!isFastForeground)
                     Py_DECREF(obj);
                 goto err2;
index 179008b47c417b5be6ff60a8534d47d6c95caf6a..92991f3e06de2a16053c0e56b0f8d5d966c193cd 100644 (file)
@@ -334,6 +334,10 @@ class ComboBox(core.Control,core.ItemContainer):
         """Replace(long from, long to, wxString value)"""
         return _controls.ComboBox_Replace(*args, **kwargs)
 
+    def SetSelection(*args, **kwargs):
+        """SetSelection(int n)"""
+        return _controls.ComboBox_SetSelection(*args, **kwargs)
+
     def SetMark(*args, **kwargs):
         """SetMark(long from, long to)"""
         return _controls.ComboBox_SetMark(*args, **kwargs)
index 17542875107479ea0378593e490fca6fbff32873..742edaf82e70fc79585cce1053b19e7b5f491501 100644 (file)
@@ -2855,6 +2855,31 @@ static PyObject *_wrap_ComboBox_Replace(PyObject *self, PyObject *args, PyObject
 }
 
 
+static PyObject *_wrap_ComboBox_SetSelection(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxComboBox *arg1 = (wxComboBox *) 0 ;
+    int arg2 ;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "n", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi:ComboBox_SetSelection",kwnames,&obj0,&arg2)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxComboBox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        (arg1)->SetSelection(arg2);
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_ComboBox_SetMark(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxComboBox *arg1 = (wxComboBox *) 0 ;
@@ -25790,6 +25815,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"ComboBox_GetInsertionPoint", (PyCFunction) _wrap_ComboBox_GetInsertionPoint, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_GetLastPosition", (PyCFunction) _wrap_ComboBox_GetLastPosition, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_Replace", (PyCFunction) _wrap_ComboBox_Replace, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"ComboBox_SetSelection", (PyCFunction) _wrap_ComboBox_SetSelection, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_SetMark", (PyCFunction) _wrap_ComboBox_SetMark, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_SetEditable", (PyCFunction) _wrap_ComboBox_SetEditable, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ComboBox_SetInsertionPointEnd", (PyCFunction) _wrap_ComboBox_SetInsertionPointEnd, METH_VARARGS | METH_KEYWORDS },
index 4c89e589a6716f6013ccf2ed23ebe0f4382a3fd6..93006e547cf45198333087d9884cbc0e17616509 100644 (file)
@@ -5827,13 +5827,13 @@ def DLG_PNT(win, point_or_x, y=None):
     if y is None:
         return win.ConvertDialogPointToPixels(point_or_x)
     else:
-        return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
+        return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
 
 def DLG_SZE(win, size_width, height=None):
     if height is None:
         return win.ConvertDialogSizeToPixels(size_width)
     else:
-        return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
+        return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
 
 
 def FindWindowById(*args, **kwargs):
index 12c7400274270988e7d171c8903fa6e807f20676..ed359ec5b64a6920ad201ab375dddbcf64dcc7c2 100644 (file)
@@ -2584,13 +2584,13 @@ Get the DC size in milimeters."""
            raise ValueError('textlist and coords must have same length')
         if foregrounds is None:
            foregrounds = []
-        elif isinstance(foregrounds, wxColour):
+        elif isinstance(foregrounds, wx.Colour):
            foregrounds = [foregrounds]
         elif len(foregrounds) != len(coords):
            raise ValueError('foregrounds and coords must have same length')
         if backgrounds is None:
            backgrounds = []
-        elif isinstance(backgrounds, wxColour):
+        elif isinstance(backgrounds, wx.Colour):
            backgrounds = [backgrounds]
         elif len(backgrounds) != len(coords):
            raise ValueError('backgrounds and coords must have same length')
index a2f15dc94a6f9db900d8bb83003e6294d623bc26..ad01de3decd1c0ac9afc92c5c39e4d539ccf2cc2 100644 (file)
@@ -372,15 +372,17 @@ public:
 
         // First, make a new instance of the tag handler
         wxPyBeginBlockThreads();
-        PyObject* arg = Py_BuildValue("()");
-        PyObject* obj = PyInstance_New(m_tagHandlerClass, arg, NULL);
+        PyObject* arg = PyTuple_New(0);
+        PyObject* obj = PyObject_CallObject(m_tagHandlerClass, arg);
         Py_DECREF(arg);
-        wxPyEndBlockThreads();
-
+        
         // now figure out where it's C++ object is...
         wxPyHtmlWinTagHandler* thPtr;
-        if (! wxPyConvertSwigPtr(obj, (void **)&thPtr, wxT("wxPyHtmlWinTagHandler")))
+        if (! wxPyConvertSwigPtr(obj, (void **)&thPtr, wxT("wxPyHtmlWinTagHandler"))) {
+            wxPyEndBlockThreads();
             return;
+        }
+        wxPyEndBlockThreads();
 
         // add it,
         parser->AddTagHandler(thPtr);
index 07acb98b3b5b01d65ee7a0faa3577fb0c92db0bf..5b449c75686f8f0187fc71e8b478da7dae09130b 100644 (file)
@@ -2302,12 +2302,6 @@ class ArtProvider(object):
         del newobj.thisown
         self._setCallbackInfo(self, ArtProvider)
 
-    def __del__(self, destroy=_misc.delete_ArtProvider):
-        """__del__()"""
-        try:
-            if self.thisown: destroy(self)
-        except: pass
-
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(PyObject self, PyObject _class)"""
         return _misc.ArtProvider__setCallbackInfo(*args, **kwargs)
@@ -4372,7 +4366,8 @@ class DropTarget(object):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        if args: args[1].thisown = 0; self._setCallbackInfo(self, DropTarget)
+        if args: args[0].thisown = 0;
+        self._setCallbackInfo(self, DropTarget)
 
     def _setCallbackInfo(*args, **kwargs):
         """_setCallbackInfo(PyObject self, PyObject _class)"""
index 6233be06a901a53a7594c20a5361890e6c8b25b4..f4335042daf1f422302dba11cabe3aa1dc1cc418 100644 (file)
@@ -12840,30 +12840,6 @@ static PyObject *_wrap_new_ArtProvider(PyObject *self, PyObject *args, PyObject
 }
 
 
-static PyObject *_wrap_delete_ArtProvider(PyObject *self, PyObject *args, PyObject *kwargs) {
-    PyObject *resultobj;
-    wxPyArtProvider *arg1 = (wxPyArtProvider *) 0 ;
-    PyObject * obj0 = 0 ;
-    char *kwnames[] = {
-        (char *) "self", NULL 
-    };
-    
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_ArtProvider",kwnames,&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPyArtProvider,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        delete arg1;
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    Py_INCREF(Py_None); resultobj = Py_None;
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
 static PyObject *_wrap_ArtProvider__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxPyArtProvider *arg1 = (wxPyArtProvider *) 0 ;
@@ -24689,7 +24665,6 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"delete_MimeTypesManager", (PyCFunction) _wrap_delete_MimeTypesManager, METH_VARARGS | METH_KEYWORDS },
         { (char *)"MimeTypesManager_swigregister", MimeTypesManager_swigregister, METH_VARARGS },
         { (char *)"new_ArtProvider", (PyCFunction) _wrap_new_ArtProvider, METH_VARARGS | METH_KEYWORDS },
-        { (char *)"delete_ArtProvider", (PyCFunction) _wrap_delete_ArtProvider, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ArtProvider__setCallbackInfo", (PyCFunction) _wrap_ArtProvider__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ArtProvider_PushProvider", (PyCFunction) _wrap_ArtProvider_PushProvider, METH_VARARGS | METH_KEYWORDS },
         { (char *)"ArtProvider_PopProvider", (PyCFunction) _wrap_ArtProvider_PopProvider, METH_VARARGS | METH_KEYWORDS },
index 3688c79ea96a0d8e76fca53f0fed24da0db12275..e3b968406c52843c43f060f5a146c295fe90f60a 100644 (file)
@@ -3388,7 +3388,7 @@ class PreviewCanvas(ScrolledWindow):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._self._setOORInfo(self)
+        self._setOORInfo(self)
 
 
 class PreviewCanvasPtr(PreviewCanvas):
@@ -3410,7 +3410,7 @@ class PreviewFrame(Frame):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._self._setOORInfo(self)
+        self._setOORInfo(self)
 
     def Initialize(*args, **kwargs):
         """Initialize()"""
@@ -3464,7 +3464,7 @@ class PreviewControlBar(Panel):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
-        self._self._setOORInfo(self)
+        self._setOORInfo(self)
 
     def GetZoomControl(*args, **kwargs):
         """GetZoomControl() -> int"""
index b8f0ec3dd940a05cbb3efffc092b5c3441512a46..683ab69f9b84ab228d6628561e6ca41ab17a5ba1 100644 (file)
@@ -405,9 +405,8 @@ IMP_PYCALLBACK_BOOL_(wxPyPopupTransientWindow, wxPopupTransientWindow, CanDismis
 
 #include <wx/tipwin.h>
 
-wxTipWindow *new_wxTipWindow(wxWindow *parent,wxString const *text,int maxLength,wxRect *rectBound){
-            wxString tmp = *text;
-            return new wxTipWindow(parent, tmp, maxLength, NULL, rectBound);
+wxTipWindow *new_wxTipWindow(wxWindow *parent,wxString const &text,int maxLength,wxRect *rectBound){
+            return new wxTipWindow(parent, text, maxLength, NULL, rectBound);
         }
 
 #include <wx/tipwin.h>
@@ -7862,10 +7861,11 @@ static PyObject * PopupTransientWindow_swigregister(PyObject *self, PyObject *ar
 static PyObject *_wrap_new_TipWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxWindow *arg1 = (wxWindow *) 0 ;
-    wxString *arg2 = (wxString *) 0 ;
+    wxString *arg2 = 0 ;
     int arg3 = (int) 100 ;
     wxRect *arg4 = (wxRect *) NULL ;
     wxTipWindow *result;
+    bool temp2 = False ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
     PyObject * obj3 = 0 ;
@@ -7875,20 +7875,32 @@ static PyObject *_wrap_new_TipWindow(PyObject *self, PyObject *args, PyObject *k
     
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|iO:new_TipWindow",kwnames,&obj0,&obj1,&arg3,&obj3)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxWindow,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxString,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    {
+        arg2 = wxString_in_helper(obj1);
+        if (arg2 == NULL) SWIG_fail;
+        temp2 = True;
+    }
     if (obj3) {
         if ((SWIG_ConvertPtr(obj3,(void **) &arg4, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
     }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (wxTipWindow *)new_wxTipWindow(arg1,(wxString const *)arg2,arg3,arg4);
+        result = (wxTipWindow *)new_wxTipWindow(arg1,(wxString const &)*arg2,arg3,arg4);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
     }
     resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_wxTipWindow, 1);
+    {
+        if (temp2)
+        delete arg2;
+    }
     return resultobj;
     fail:
+    {
+        if (temp2)
+        delete arg2;
+    }
     return NULL;
 }
 
index c2e52c433df5daac1d354300873c6a112f919061..1553f2701a374f1f144a4daf0712d5a08a7fd6d0 100644 (file)
@@ -67,12 +67,12 @@ class LayoutAnchors(wxLayoutConstraints):
         self.setConstraintSides(self.left, wxLeft, left,
                                 self.right, wxRight, right,
                                 self.width, wxWidth, self.centreX,
-                                cPos.x, cSize.x, pSize.x, parent)
+                                cPos.x, cSize.width, pSize.width, parent)
 
         self.setConstraintSides(self.top, wxTop, top,
                                 self.bottom, wxBottom, bottom,
                                 self.height, wxHeight, self.centreY,
-                                cPos.y, cSize.y, pSize.y, parent)
+                                cPos.y, cSize.height, pSize.height, parent)
 
     def setConstraintSides(self, side1, side1Edge, side1Anchor,
                                  side2, side2Edge, side2Anchor,
index f5247dc2be3b015d85b8f15b3cfe2676c25f9675..c7b02089abe46cca426f726f8e81cf27521fbd34 100644 (file)
@@ -155,7 +155,7 @@ class CalDraw:
 
         if self.outer_border is True:
             rect = wxRect(self.cx_st, self.cy_st, self.sizew, self.sizeh)  # full display window area
-            self.DC.DrawRectangle(rect.x, rect.y, rect.width, rect.height)
+            self.DC.DrawRectangleRect(rect)
 
     def DrawNumVal(self):
         self.DrawNum()
@@ -226,7 +226,7 @@ class CalDraw:
 
         tw,th = self.DC.GetTextExtent(month)
         adjust = self.cx_st + (self.sizew-tw)/2
-        self.DC.DrawText(month, adjust, self.cy_st + th)
+        self.DC.DrawText(month, (adjust, self.cy_st + th))
 
         year = str(self.year)
         tw,th = self.DC.GetTextExtent(year)
@@ -236,7 +236,7 @@ class CalDraw:
 
         f = wxFont(sizef, self.font, wxNORMAL, self.bold)
         self.DC.SetFont(f)
-        self.DC.DrawText(year, self.cx_st + adjust, self.cy_st + th)
+        self.DC.DrawText(year, (self.cx_st + adjust, self.cy_st + th))
 
     def DrawWeek(self):     # draw the week days
         width = self.gridx[1]-self.gridx[0]
@@ -265,7 +265,7 @@ class CalDraw:
 
         brush = wxBrush(wxNamedColour(self.week_color), wxSOLID)
         self.DC.SetBrush(brush)
-#        self.DC.DrawRectangle(self.gridx[0], self.gridy[0], rect_w+1, height)
+#        self.DC.DrawRectangle((self.gridx[0], self.gridy[0]), (rect_w+1, height))
 
         if self.cal_type == "NORMAL":
             cal_days = CalDays
@@ -282,8 +282,8 @@ class CalDraw:
 
             x = self.gridx[cnt_x]
             y = self.gridy[cnt_y]
-            self.DC.DrawRectangle(self.gridx[cnt_x], self.gridy[0], width+1, height)
-            self.DC.DrawText(day, x+diffx, y+diffy)
+            self.DC.DrawRectangle((self.gridx[cnt_x], self.gridy[0]), (width+1, height))
+            self.DC.DrawText(day, (x+diffx, y+diffy))
             cnt_x = cnt_x + 1
 
     def DrawNum(self):      # draw the day numbers
@@ -337,7 +337,7 @@ class CalDraw:
 
             adj_v = adj_v + self.num_indent_vert
 
-            self.DC.DrawText(val, x+adj_h, y+adj_v)
+            self.DC.DrawText(val, (x+adj_h, y+adj_v))
             if cnt_x < 6:
                 cnt_x = cnt_x + 1
             else:
@@ -367,7 +367,7 @@ class CalDraw:
                 self.DC.SetPen(wxPen(wxNamedColour(self.back_color), 0))
             nkey = key + self.st_pos -1
             rect = self.rg[nkey]
-            self.DC.DrawRectangle(rect.x, rect.y, rect.width+1, rect.height+1)
+            self.DC.DrawRectangle((rect.x, rect.y), (rect.width+1, rect.height+1))
 
     def DrawGrid(self):         # calculate and draw the grid lines
         self.DC.SetPen(wxPen(wxNamedColour(self.grid_color), 0))
@@ -384,7 +384,7 @@ class CalDraw:
         y2 = y1 + self.cheight
         for i in range(8):
             if self.hide_grid is False:
-                self.DC.DrawLine(x1, y1, x1, y2)
+                self.DC.DrawLine((x1, y1), (x1, y2))
             self.gridx.append(x1)
             x1 = x1 + self.dl_w
 
@@ -394,7 +394,7 @@ class CalDraw:
         x2 = x1 + self.cwidth
         for i in range(8):
             if self.hide_grid is False:
-                self.DC.DrawLine(x1, y1, x2, y1)
+                self.DC.DrawLine((x1, y1), (x2, y1))
             self.gridy.append(y1)
             if i == 0:
                 y1 = y1 + self.dl_th
@@ -439,7 +439,7 @@ class wxCalendar(wxWindow):
 
         self.select_list = []
 
-        self.SetBackgroundColour(wxNamedColor(self.back_color))
+        self.SetBackgroundColour(wxNamedColour(self.back_color))
         self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftEvent)
         self.Connect(-1, -1, wxEVT_LEFT_DCLICK, self.OnLeftDEvent)
         self.Connect(-1, -1, wxEVT_RIGHT_DOWN, self.OnRightEvent)
@@ -671,7 +671,7 @@ class wxCalendar(wxWindow):
         DC.SetPen(wxPen(wxNamedColour(color), width))
 
         rect = self.rg[key]
-        DC.DrawRectangle(rect.x, rect.y, rect.width+1, rect.height+1)
+        DC.DrawRectangle((rect.x, rect.y), (rect.width+1, rect.height+1))
 
         DC.EndDrawing()
 
@@ -696,7 +696,7 @@ class wxCalendar(wxWindow):
 
 class CalenDlg(wxDialog):
     def __init__(self, parent, month=None, day = None, year=None):
-        wxDialog.__init__(self, parent, -1, "Event Calendar", wxPyDefaultPosition, wxSize(280, 360))
+        wxDialog.__init__(self, parent, -1, "Event Calendar", wxDefaultPosition, wxSize(280, 360))
 
     # set the calendar and attributes
         self.calend = wxCalendar(self, -1, wxPoint(20, 60), wxSize(240, 200))
index 4ea2795342926839d57586e373a9c48cf092ec4a..236c37f5fc77a80bed5f79a543897fe9781ff18c 100644 (file)
@@ -316,7 +316,7 @@ class EventMacroInfo:
             win = FakeWindow()
             try:
                 eventMacro(win, None, None)
-            except TypeError:
+            except (TypeError, AssertionError):
                 eventMacro(win, None)
             self.lookupTable[eventMacro] = win.eventTypes
             return win.eventTypes
@@ -406,7 +406,7 @@ class EventAdapter:
         try:
             func(win, id, self.handleEvent)
             self.callStyle = 3
-        except TypeError:
+        except (TypeError, AssertionError):
             func(win, self.handleEvent)
             self.callStyle = 2
 
index 482e4a706610f219c4a84bc7fed12b6bf79a3075..752f3203fcd0eb2dee46e4045c6b9b5f7ef8e9fe 100644 (file)
@@ -85,7 +85,7 @@ class RowColSizer(wxPySizer):
         assert row != -1, "Row must be specified"
         assert col != -1, "Column must be specified"
 
-        wxPySizer.AddSpacer(self, width, height, option, flag, border,
+        wxPySizer.AddSpacer(self, (width, height), option, flag, border,
                             userData=(row, col, row+rowspan, col+colspan))
 
     #--------------------------------------------------
index d1a8695235a5ffba706e83eaa8390156a5325e7f..a4063d4be5fc440d23975c9d68ff7f9aa8d1a90b 100644 (file)
@@ -21,6 +21,7 @@ import os
 import wx
 
 # ------------------------------------------------------------------------------
+
 THROBBER_EVENT = wx.NewEventType()
 def EVT_UPDATE_THROBBER(win, func):
     win.Connect(-1, -1, THROBBER_EVENT, func)
@@ -134,13 +135,13 @@ class Throbber(wx.Panel):
 
 
     def Draw(self, dc):
-        dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True)
+        dc.DrawBitmap(self.submaps[self.sequence[self.current]], (0, 0), True)
         if self.overlay and self.showOverlay:
-            dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True)
+            dc.DrawBitmap(self.overlay, (self.overlayX, self.overlayY), True)
         if self.label and self.showLabel:
-            dc.DrawText(self.label, self.labelX, self.labelY)
+            dc.DrawText(self.label, (self.labelX, self.labelY))
             dc.SetTextForeground(wx.WHITE)
-            dc.DrawText(self.label, self.labelX-1, self.labelY-1)
+            dc.DrawText(self.label, (self.labelX-1, self.labelY-1))
 
 
     def OnPaint(self, event):
@@ -194,7 +195,7 @@ class Throbber(wx.Panel):
         """Start the animation"""
         if not self.running:
             self.running = not self.running
-            self.timer.Start(self.frameDelay * 1000)
+            self.timer.Start(int(self.frameDelay * 1000))
 
 
     def Stop(self):
index e0d52116b25c84e17397c3adef5368efe51ea147..8a0384476e8731976bfc8f7ada108e9616401826 100644 (file)
@@ -239,7 +239,7 @@ value to fall within the current bounds.
 </body></html>
 """
 
-import string, copy
+import string, copy, types
 from wxPython.wx import *
 from wxPython.tools.dbg import Logger
 from wxPython.lib.maskededit import wxMaskedTextCtrl, Field
index d36356367d3fcdae6cf0507df56d318ec92e76f3..931feb3bf0f5149039c2ec07c7d3675822b82705 100644 (file)
@@ -6,8 +6,26 @@ import wx.lib.calendar
 
 __doc__ =  wx.lib.calendar.__doc__
 
+Date = wx.lib.calendar.Date
+FillDate = wx.lib.calendar.FillDate
+FormatDay = wx.lib.calendar.FormatDay
+FromJulian = wx.lib.calendar.FromJulian
+TodayDay = wx.lib.calendar.TodayDay
+dayOfWeek = wx.lib.calendar.dayOfWeek
+daysPerMonth = wx.lib.calendar.daysPerMonth
+isleap = wx.lib.calendar.isleap
+julianDay = wx.lib.calendar.julianDay
+leapdays = wx.lib.calendar.leapdays
+now = wx.lib.calendar.now
+Month = wx.lib.calendar.Month
+mdays = wx.lib.calendar.mdays
+day_name = wx.lib.calendar.day_name
+day_abbr = wx.lib.calendar.day_abbr
+
+
 CalDraw = wx.lib.calendar.CalDraw
 CalenDlg = wx.lib.calendar.CalenDlg
 GetMonthList = wx.lib.calendar.GetMonthList
 PrtCalDraw = wx.lib.calendar.PrtCalDraw
 wxCalendar = wx.lib.calendar.wxCalendar
+
index b999958b5604825951add49459da8d9d3f7b2345..d0799b04eccb23518b2bbf94fab989079808a052 100644 (file)
@@ -11,3 +11,4 @@ EventMacroInfo = wx.lib.evtmgr.EventMacroInfo
 EventManager = wx.lib.evtmgr.EventManager
 FakeWindow = wx.lib.evtmgr.FakeWindow
 MessageAdapter = wx.lib.evtmgr.MessageAdapter
+eventManager  = wx.lib.evtmgr.eventManager