]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/_extras.py
Added wxNB_LEFT,RIGHT,BOTTOM for notebook tab placement
[wxWidgets.git] / utils / wxPython / src / _extras.py
index 46bea0855f86c238c14fee7f2abcc80705974c19..dc59bb3518261046abc56837e0b63efd4369a0b5 100644 (file)
@@ -277,6 +277,69 @@ def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func):
 def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func):
     win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func)
 
+#---
+def EVT_SCROLLWIN(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP,       func)
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM,    func)
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP,    func)
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN,  func)
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP,    func)
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN,  func)
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK,func)
+
+def EVT_SCROLLWIN_TOP(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
+
+def EVT_SCROLLWIN_BOTTOM(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+
+def EVT_SCROLLWIN_LINEUP(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEUP, func)
+
+def EVT_SCROLLWIN_LINEDOWN(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+
+def EVT_SCROLLWIN_PAGEUP(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+
+def EVT_SCROLLWIN_PAGEDOWN(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+
+def EVT_SCROLLWIN_THUMBTRACK(win, func):
+    win.Connect(-1, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
+
+
+
+# Scrolling, with an id
+def EVT_COMMAND_SCROLLWIN(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_TOP,       func)
+    win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM,    func)
+    win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP,    func)
+    win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN,  func)
+    win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP,    func)
+    win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN,  func)
+    win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK,func)
+
+def EVT_COMMAND_SCROLLWIN_TOP(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_TOP, func)
+
+def EVT_COMMAND_SCROLLWIN_BOTTOM(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_BOTTOM, func)
+
+def EVT_COMMAND_SCROLLWIN_LINEUP(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_LINEUP, func)
+
+def EVT_COMMAND_SCROLLWIN_LINEDOWN(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_LINEDOWN, func)
+
+def EVT_COMMAND_SCROLLWIN_PAGEUP(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEUP, func)
+
+def EVT_COMMAND_SCROLLWIN_PAGEDOWN(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_PAGEDOWN, func)
+
+def EVT_COMMAND_SCROLLWIN_THUMBTRACK(win, id, func):
+    win.Connect(id, -1, wxEVT_SCROLLWIN_THUMBTRACK, func)
 
 # Convenience commands
 def EVT_BUTTON(win, id, func):
@@ -595,7 +658,7 @@ class wxAcceleratorTable(wxAcceleratorTablePtr):
 #----------------------------------------------------------------------
 # This helper function will take a wxPython object and convert it to
 # another wxPython object type.  This will not be able to create objects
-# user that are derived from wxPython classes, only those that are
+# that are derived from wxPython classes by the user, only those that are
 # actually part of wxPython and directly corespond to C++ objects.
 #
 # This is useful in situations where some method returns a generic
@@ -682,8 +745,8 @@ class wxApp(wxPyApp):
         if filename:
             sys.stdout = sys.stderr = open(filename, 'a')
         else:
-            #raise self.error, 'wxPyStdOutWindow not yet implemented.'
-            self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
+            raise self.error, 'wxPyStdOutWindow not yet implemented.'
+            #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
 
     def RestoreStdio(self):
         sys.stdout, sys.stderr = self.saveStdio