]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/_core.py
changed to behave in same way as native win32 control and generic wxListCtrl when...
[wxWidgets.git] / wxPython / src / mac / _core.py
index 22e9ea90516f42a30fe2c79290f5620989703fd3..9a8f5fe49e44eb1f7877fa66c8f08e83ac9c7d91 100644 (file)
@@ -3376,6 +3376,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 +3586,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 +4323,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 +5032,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 +5042,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 +5224,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
@@ -6279,6 +6325,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 +6890,9 @@ class Window(EvtHandler):
         """
         return _core_.Window_SetBackgroundColour(*args, **kwargs)
 
-    def SetDefaultBackgroundColour(*args, **kwargs):
-        """SetDefaultBackgroundColour(self, Colour colour)"""
-        return _core_.Window_SetDefaultBackgroundColour(*args, **kwargs)
+    def SetOwnBackgroundColour(*args, **kwargs):
+        """SetOwnBackgroundColour(self, Colour colour)"""
+        return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
 
     def SetForegroundColour(*args, **kwargs):
         """
@@ -6835,9 +6905,9 @@ class Window(EvtHandler):
         """
         return _core_.Window_SetForegroundColour(*args, **kwargs)
 
-    def SetDefaultForegroundColour(*args, **kwargs):
-        """SetDefaultForegroundColour(self, Colour colour)"""
-        return _core_.Window_SetDefaultForegroundColour(*args, **kwargs)
+    def SetOwnForegroundColour(*args, **kwargs):
+        """SetOwnForegroundColour(self, Colour colour)"""
+        return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
 
     def GetBackgroundColour(*args, **kwargs):
         """
@@ -6885,9 +6955,9 @@ class Window(EvtHandler):
         """
         return _core_.Window_SetFont(*args, **kwargs)
 
-    def SetDefaultFont(*args, **kwargs):
-        """SetDefaultFont(self, Font font)"""
-        return _core_.Window_SetDefaultFont(*args, **kwargs)
+    def SetOwnFont(*args, **kwargs):
+        """SetOwnFont(self, Font font)"""
+        return _core_.Window_SetOwnFont(*args, **kwargs)
 
     def GetFont(*args, **kwargs):
         """
@@ -7356,7 +7426,7 @@ class Window(EvtHandler):
         By 'intelligently' the following is meant: by default, all windows use
         their own default attributes. However if some of the parent's
         attributes are explicitly changed (that is, using SetFont and not
-        SetDefaultFont) and if the corresponding attribute hadn't been
+        SetOwnFont) and if the corresponding attribute hadn't been
         explicitly set for this window itself, then this window takes the same
         value as used by the parent. In addition, if the window overrides
         ShouldInheritColours to return false, the colours will not be changed
@@ -8294,7 +8364,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