]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
Added ability to also do a remote build on the Jaguar machine
[wxWidgets.git] / wxPython / src / gtk / _core.py
index 4ee56633ca7dfb0f459e317d0a95cf294f62183e..38a522bc43bd3a47e535c386a55e276bf4e4dc1d 100644 (file)
@@ -2553,6 +2553,42 @@ class TIFFHandlerPtr(TIFFHandler):
         self.__class__ = TIFFHandler
 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
 
+QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
+QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
+class Quantize(object):
+    """Performs quantization, or colour reduction, on a wxImage."""
+    def __init__(self): raise RuntimeError, "No constructor defined"
+    def __repr__(self):
+        return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def Quantize(*args, **kwargs):
+        """
+        Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
+
+        Reduce the colours in the source image and put the result into the
+        destination image, setting the palette in the destination if
+        needed. Both images may be the same, to overwrite the source image.
+        """
+        return _core_.Quantize_Quantize(*args, **kwargs)
+
+    Quantize = staticmethod(Quantize)
+
+class QuantizePtr(Quantize):
+    def __init__(self, this):
+        self.this = this
+        if not hasattr(self,"thisown"): self.thisown = 0
+        self.__class__ = Quantize
+_core_.Quantize_swigregister(QuantizePtr)
+
+def Quantize_Quantize(*args, **kwargs):
+    """
+    Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
+
+    Reduce the colours in the source image and put the result into the
+    destination image, setting the palette in the destination if
+    needed. Both images may be the same, to overwrite the source image.
+    """
+    return _core_.Quantize_Quantize(*args, **kwargs)
+
 #---------------------------------------------------------------------------
 
 class EvtHandler(Object):
@@ -3376,6 +3412,20 @@ class MouseEvent(Event):
         """ShiftDown(self) -> bool"""
         return _core_.MouseEvent_ShiftDown(*args, **kwargs)
 
+    def CmdDown(*args, **kwargs):
+        """
+        CmdDown(self) -> bool
+
+        "Cmd" is a pseudo key which is the same as Control for PC and Unix
+        platforms but the special "Apple" (a.k.a as "Command") key on
+        Macs: it makes often sense to use it instead of, say, `ControlDown`
+        because Cmd key is used for the same thing under Mac as Ctrl
+        elsewhere. The Ctrl still exists, it's just not used for this
+        purpose. So for non-Mac platforms this is the same as `ControlDown`
+        and Macs this is the same as `MetaDown`.
+        """
+        return _core_.MouseEvent_CmdDown(*args, **kwargs)
+
     def LeftDown(*args, **kwargs):
         """LeftDown(self) -> bool"""
         return _core_.MouseEvent_LeftDown(*args, **kwargs)
@@ -3572,6 +3622,20 @@ class KeyEvent(Event):
         """ShiftDown(self) -> bool"""
         return _core_.KeyEvent_ShiftDown(*args, **kwargs)
 
+    def CmdDown(*args, **kwargs):
+        """
+        CmdDown(self) -> bool
+
+        "Cmd" is a pseudo key which is the same as Control for PC and Unix
+        platforms but the special "Apple" (a.k.a as "Command") key on
+        Macs: it makes often sense to use it instead of, say, `ControlDown`
+        because Cmd key is used for the same thing under Mac as Ctrl
+        elsewhere. The Ctrl still exists, it's just not used for this
+        purpose. So for non-Mac platforms this is the same as `ControlDown`
+        and Macs this is the same as `MetaDown`.
+        """
+        return _core_.KeyEvent_CmdDown(*args, **kwargs)
+
     def HasModifiers(*args, **kwargs):
         """HasModifiers(self) -> bool"""
         return _core_.KeyEvent_HasModifiers(*args, **kwargs)
@@ -4295,6 +4359,7 @@ class NavigationKeyEvent(Event):
         """SetCurrentFocus(self, Window win)"""
         return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
 
+    IsBackward = _core_.NavigationKeyEvent_IsBackward
     IsForward = _core_.NavigationKeyEvent_IsForward
     WinChange = _core_.NavigationKeyEvent_WinChange
 
@@ -5003,6 +5068,8 @@ class PyOnDemandOutputWindow:
     def __init__(self, title = "wxPython: stdout/stderr"):
         self.frame  = None
         self.title  = title
+        self.pos    = wx.DefaultPosition
+        self.size   = (450, 300)
         self.parent = None
 
     def SetParent(self, parent):
@@ -5011,12 +5078,11 @@ class PyOnDemandOutputWindow:
 
 
     def CreateOutputWindow(self, st):
-        self.frame = wx.Frame(self.parent, -1, self.title,
-                              style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
+        self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
+                              style=wx.DEFAULT_FRAME_STYLE)
         self.text  = wx.TextCtrl(self.frame, -1, "",
-                                 style = wx.TE_MULTILINE | wx.TE_READONLY)
+                                 style=wx.TE_MULTILINE|wx.TE_READONLY)
         self.text.AppendText(st)
-        self.frame.SetSize((450, 300))
         self.frame.Show(True)
         EVT_CLOSE(self.frame, self.OnCloseWindow)
         
@@ -5194,6 +5260,22 @@ your Mac."""
         _sys.stdout, _sys.stderr = self.saveStdio
 
 
+    def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
+        """
+        Set the title, position and/or size of the output window if
+        the stdio has been redirected.  This should be called before
+        any output would cause the output window to be created.
+        """
+        if self.stdioWin:
+            if title is not None:
+                self.stdioWin.title = title
+            if pos is not None:
+                self.stdioWin.pos = pos
+            if size is not None:
+                self.stdioWin.size = size
+            
+
+
 
 # change from wx.PyApp_XX to wx.App_XX
 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
@@ -5934,9 +6016,8 @@ class Window(EvtHandler):
         """
         return _core_.Window_FitInside(*args, **kwargs)
 
-    def SetSizeHints(*args):
+    def SetSizeHints(*args, **kwargs):
         """
-        SetSizeHints(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
         SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, 
             int incH=-1)
 
@@ -5949,11 +6030,25 @@ class Window(EvtHandler):
 
         The resizing increments are only significant under Motif or Xt.
         """
-        return _core_.Window_SetSizeHints(*args)
+        return _core_.Window_SetSizeHints(*args, **kwargs)
+
+    def SetSizeHintsSz(*args, **kwargs):
+        """
+        SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
+
+        Allows specification of minimum and maximum window sizes, and window
+        size increments. If a pair of values is not set (or set to -1), the
+        default values will be used.  If this function is called, the user
+        will not be able to size the window outside the given bounds (if it is
+        a top-level window.)  Sizers will also inspect the minimum window size
+        and will use that value if set when calculating layout.
+
+        The resizing increments are only significant under Motif or Xt.
+        """
+        return _core_.Window_SetSizeHintsSz(*args, **kwargs)
 
-    def SetVirtualSizeHints(*args):
+    def SetVirtualSizeHints(*args, **kwargs):
         """
-        SetVirtualSizeHints(self, Size minSize, Size maxSize=DefaultSize)
         SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
 
         Allows specification of minimum and maximum virtual window sizes. If a
@@ -5961,7 +6056,18 @@ class Window(EvtHandler):
         used.  If this function is called, the user will not be able to size
         the virtual area of the window outside the given bounds.
         """
-        return _core_.Window_SetVirtualSizeHints(*args)
+        return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
+
+    def SetVirtualSizeHintsSz(*args, **kwargs):
+        """
+        SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
+
+        Allows specification of minimum and maximum virtual window sizes. If a
+        pair of values is not set (or set to -1), the default values will be
+        used.  If this function is called, the user will not be able to size
+        the virtual area of the window outside the given bounds.
+        """
+        return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
 
     def GetMaxSize(*args, **kwargs):
         """GetMaxSize(self) -> Size"""
@@ -6279,6 +6385,30 @@ class Window(EvtHandler):
         """
         return _core_.Window_Navigate(*args, **kwargs)
 
+    def MoveAfterInTabOrder(*args, **kwargs):
+        """
+        MoveAfterInTabOrder(self, Window win)
+
+        Moves this window in the tab navigation order after the specified
+        sibling window.  This means that when the user presses the TAB key on
+        that other window, the focus switches to this window.
+
+        The default tab order is the same as creation order.  This function
+        and `MoveBeforeInTabOrder` allow to change it after creating all the
+        windows.
+
+        """
+        return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
+
+    def MoveBeforeInTabOrder(*args, **kwargs):
+        """
+        MoveBeforeInTabOrder(self, Window win)
+
+        Same as `MoveAfterInTabOrder` except that it inserts this window just
+        before win instead of putting it right after it.
+        """
+        return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
+
     def GetChildren(*args, **kwargs):
         """
         GetChildren(self) -> PyObject
@@ -6820,9 +6950,9 @@ class Window(EvtHandler):
         """
         return _core_.Window_SetBackgroundColour(*args, **kwargs)
 
-    def SetOwnBackroundColour(*args, **kwargs):
-        """SetOwnBackroundColour(self, Colour colour)"""
-        return _core_.Window_SetOwnBackroundColour(*args, **kwargs)
+    def SetOwnBackgroundColour(*args, **kwargs):
+        """SetOwnBackgroundColour(self, Colour colour)"""
+        return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
 
     def SetForegroundColour(*args, **kwargs):
         """
@@ -8294,7 +8424,7 @@ class ItemContainer(object):
 
     def AppendItems(*args, **kwargs):
         """
-        AppendItems(self, wxArrayString strings)
+        AppendItems(self, List strings)
 
         Apend several items at once to the control.  Notice that calling this
         method may be much faster than appending the items one by one if you