]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
Give SendSizeEvent a generic implementation. It can be useful on
[wxWidgets.git] / wxPython / src / gtk / _core.py
index 429036355e12fed76c46bec628c820ef5b37bfa3..16ef5a06038e8c39e6d67494e9cb89e9162be56a 100644 (file)
@@ -1320,6 +1320,16 @@ def RectPS(*args, **kwargs):
     val.thisown = 1
     return val
 
+def RectS(*args, **kwargs):
+    """
+    RectS(Size size) -> Rect
+
+    Create a new Rect from a size only.
+    """
+    val = _core_.new_RectS(*args, **kwargs)
+    val.thisown = 1
+    return val
+
 
 def IntersectRect(*args, **kwargs):
     """
@@ -4761,6 +4771,16 @@ class PyApp(EvtHandler):
         """
         return _core_.PyApp_WakeUpIdle(*args, **kwargs)
 
+    def IsMainLoopRunning(*args, **kwargs):
+        """
+        IsMainLoopRunning() -> bool
+
+        Returns True if we're running the main loop, i.e. if the events can
+        currently be dispatched.
+        """
+        return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
+
+    IsMainLoopRunning = staticmethod(IsMainLoopRunning)
     def MainLoop(*args, **kwargs):
         """
         MainLoop(self) -> int
@@ -4987,6 +5007,15 @@ class PyAppPtr(PyApp):
         self.__class__ = PyApp
 _core_.PyApp_swigregister(PyAppPtr)
 
+def PyApp_IsMainLoopRunning(*args, **kwargs):
+    """
+    PyApp_IsMainLoopRunning() -> bool
+
+    Returns True if we're running the main loop, i.e. if the events can
+    currently be dispatched.
+    """
+    return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
+
 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
     """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
     return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
@@ -7601,7 +7630,7 @@ class Window(EvtHandler):
         layout sizer object is already owned by the window, it will be deleted
         if the deleteOld parameter is true. Note that this function will also
         call SetAutoLayout implicitly with a True parameter if the sizer is
-        non-NoneL and False otherwise.
+        non-None, and False otherwise.
         """
         return _core_.Window_SetSizer(*args, **kwargs)
 
@@ -7659,8 +7688,8 @@ class Window(EvtHandler):
         ShouldInheritColours to return false, the colours will not be changed
         no matter what and only the font might.
 
-        This rather complicated logic is necessary in order to accomodate the
-        different usage scenarius. The most common one is when all default
+        This rather complicated logic is necessary in order to accommodate the
+        different usage scenarios. The most common one is when all default
         attributes are used and in this case, nothing should be inherited as
         in modern GUIs different controls use different fonts (and colours)
         than their siblings so they can't inherit the same value from the
@@ -8872,6 +8901,14 @@ class SizerItem(Object):
         """
         return _core_.SizerItem_GetRatio(*args, **kwargs)
 
+    def GetRect(*args, **kwargs):
+        """
+        GetRect(self) -> Rect
+
+        Returns the rectangle that the sizer item should occupy
+        """
+        return _core_.SizerItem_GetRect(*args, **kwargs)
+
     def IsWindow(*args, **kwargs):
         """
         IsWindow(self) -> bool
@@ -9110,7 +9147,7 @@ class Sizer(Object):
     def Add(*args, **kwargs):
         """
         Add(self, item, int proportion=0, int flag=0, int border=0,
-            PyObject userData=None)
+            PyObject userData=None) -> wx.SizerItem
 
         Appends a child item to the sizer.
         """
@@ -9119,7 +9156,7 @@ class Sizer(Object):
     def Insert(*args, **kwargs):
         """
         Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
-            PyObject userData=None)
+            PyObject userData=None) -> wx.SizerItem
 
         Inserts a new item into the list of items managed by this sizer before
         the item at index *before*.  See `Add` for a description of the parameters.
@@ -9129,7 +9166,7 @@ class Sizer(Object):
     def Prepend(*args, **kwargs):
         """
         Prepend(self, item, int proportion=0, int flag=0, int border=0,
-            PyObject userData=None)
+            PyObject userData=None) -> wx.SizerItem
 
         Adds a new item to the begining of the list of sizer items managed by
         this sizer.  See `Add` for a description of the parameters.
@@ -9161,6 +9198,16 @@ class Sizer(Object):
         """
         return _core_.Sizer_Detach(*args, **kwargs)
 
+    def GetItem(*args, **kwargs):
+        """
+        GetItem(self, item) -> wx.SizerItem
+
+        Returns the `wx.SizerItem` which holds the *item* given.  The *item*
+        parameter can be either a window, a sizer, or the zero-based index of
+        the item to be detached.
+        """
+        return _core_.Sizer_GetItem(*args, **kwargs)
+
     def _SetItemMinSize(*args, **kwargs):
         """_SetItemMinSize(self, PyObject item, Size size)"""
         return _core_.Sizer__SetItemMinSize(*args, **kwargs)
@@ -9400,7 +9447,7 @@ class Sizer(Object):
 
     def Show(*args, **kwargs):
         """
-        Show(self, item, bool show=True, bool recursive=False) -> bool
+        Show(self, item, bool show=True, bool recursive=false) -> bool
 
         Shows or hides an item managed by the sizer.  To make a sizer item
         disappear or reappear, use Show followed by `Layout`.  The *item*
@@ -9431,7 +9478,7 @@ class Sizer(Object):
         """
         ShowItems(self, bool show)
 
-        Recursively call `wx.Window.Show` on all sizer items.
+        Recursively call `wx.SizerItem.Show` on all sizer items.
         """
         return _core_.Sizer_ShowItems(*args, **kwargs)
 
@@ -10221,7 +10268,7 @@ class GridBagSizer(FlexGridSizer):
     def Add(*args, **kwargs):
         """
         Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
-        int border=0, userData=None)
+        int border=0, userData=None) -> wx.GBSizerItem
 
         Adds an item to the sizer at the grid cell *pos*, optionally spanning
         more than one row or column as specified with *span*.  The remaining
@@ -10235,7 +10282,7 @@ class GridBagSizer(FlexGridSizer):
 
     def AddItem(*args, **kwargs):
         """
-        Add(self, GBSizerItem item) -> bool
+        Add(self, GBSizerItem item) -> wx.GBSizerItem
 
         Add an item to the sizer using a `wx.GBSizerItem`.  Returns True if
         the item was successfully placed at its given cell position, False if
@@ -10243,6 +10290,15 @@ class GridBagSizer(FlexGridSizer):
         """
         return _core_.GridBagSizer_AddItem(*args, **kwargs)
 
+    def GetCellSize(*args, **kwargs):
+        """
+        GetCellSize(self, int row, int col) -> Size
+
+        Get the size of the specified cell, including hgap and
+        vgap.  Only valid after a Layout.
+        """
+        return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
+
     def GetEmptyCellSize(*args, **kwargs):
         """
         GetEmptyCellSize(self) -> Size