]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_core.py
uninitialized variable warning fixed (modified patch 1434065)
[wxWidgets.git] / wxPython / src / msw / _core.py
index 727a6d64657003b77cb499e560dc7cd832a8e37d..9ea72ddd7d635494391cc4c471b2fcec86b5fb8b 100644 (file)
@@ -1,4 +1,4 @@
-# This file was created automatically by SWIG.
+# This file was created automatically by SWIG 1.3.27.
 # Don't modify this file, modify the SWIG interface instead.
 
 import _core_
 # Don't modify this file, modify the SWIG interface instead.
 
 import _core_
@@ -708,7 +708,9 @@ class Object(object):
 
         Deletes the C++ object this Python object is a proxy for.
         """
 
         Deletes the C++ object this Python object is a proxy for.
         """
-        return _core_.Object_Destroy(*args, **kwargs)
+        val = _core_.Object_Destroy(*args, **kwargs)
+        args[0].thisown = 0
+        return val
 
 
 class ObjectPtr(Object):
 
 
 class ObjectPtr(Object):
@@ -1319,7 +1321,7 @@ class Rect(object):
         """
         Offset(self, Point pt)
 
         """
         Offset(self, Point pt)
 
-        Same as OffsetXY but uses dx,dy from Point
+        Same as `OffsetXY` but uses dx,dy from Point
         """
         return _core_.Rect_Offset(*args, **kwargs)
 
         """
         return _core_.Rect_Offset(*args, **kwargs)
 
@@ -1395,6 +1397,16 @@ class Rect(object):
         """
         return _core_.Rect_Intersects(*args, **kwargs)
 
         """
         return _core_.Rect_Intersects(*args, **kwargs)
 
+    def CenterIn(*args, **kwargs):
+        """
+        CenterIn(self, Rect r, int dir=BOTH) -> Rect
+
+        Center this rectangle within the one passed to the method, which is
+        usually, but not necessarily, the larger one.
+        """
+        return _core_.Rect_CenterIn(*args, **kwargs)
+
+    CentreIn = CenterIn 
     x = property(_core_.Rect_x_get, _core_.Rect_x_set)
     y = property(_core_.Rect_y_get, _core_.Rect_y_set)
     width = property(_core_.Rect_width_get, _core_.Rect_width_set)
     x = property(_core_.Rect_x_get, _core_.Rect_x_set)
     y = property(_core_.Rect_y_get, _core_.Rect_y_set)
     width = property(_core_.Rect_width_get, _core_.Rect_width_set)
@@ -2415,7 +2427,9 @@ class Image(Object):
 
         Destroys the image data.
         """
 
         Destroys the image data.
         """
-        return _core_.Image_Destroy(*args, **kwargs)
+        val = _core_.Image_Destroy(*args, **kwargs)
+        args[0].thisown = 0
+        return val
 
     def Scale(*args, **kwargs):
         """
 
     def Scale(*args, **kwargs):
         """
@@ -2937,6 +2951,16 @@ class Image(Object):
         """
         return _core_.Image_Replace(*args, **kwargs)
 
         """
         return _core_.Image_Replace(*args, **kwargs)
 
+    def ConvertToGreyscale(*args, **kwargs):
+        """
+        ConvertToGreyscale(self, double lr=0.299, double lg=0.587, double lb=0.114) -> Image
+
+        Convert to greyscale image. Uses the luminance component (Y) of the
+        image.  The luma value (YUV) is calculated using (R * lr) + (G * lg) + (B * lb),
+        defaults to ITU-T BT.601
+        """
+        return _core_.Image_ConvertToGreyscale(*args, **kwargs)
+
     def ConvertToMono(*args, **kwargs):
         """
         ConvertToMono(self, byte r, byte g, byte b) -> Image
     def ConvertToMono(*args, **kwargs):
         """
         ConvertToMono(self, byte r, byte g, byte b) -> Image
@@ -3586,7 +3610,9 @@ class EvtHandler(Object):
 
     def _setOORInfo(*args, **kwargs):
         """_setOORInfo(self, PyObject _self, bool incref=True)"""
 
     def _setOORInfo(*args, **kwargs):
         """_setOORInfo(self, PyObject _self, bool incref=True)"""
-        return _core_.EvtHandler__setOORInfo(*args, **kwargs)
+        val = _core_.EvtHandler__setOORInfo(*args, **kwargs)
+        args[0].thisown = 0
+        return val
 
     def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
         """
 
     def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
         """
@@ -5082,6 +5108,21 @@ class KeyEvent(Event):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
+    def GetModifiers(*args, **kwargs):
+        """
+        GetModifiers(self) -> int
+
+        Returns a bitmask of the current modifier settings.  Can be used to
+        check if the key event has exactly the given modifiers without having
+        to explicitly check that the other modifiers are not down.  For
+        example::
+
+            if event.GetModifers() == wx.MOD_CONTROL:
+                DoSomething()
+
+        """
+        return _core_.KeyEvent_GetModifiers(*args, **kwargs)
+
     def ControlDown(*args, **kwargs):
         """
         ControlDown(self) -> bool
     def ControlDown(*args, **kwargs):
         """
         ControlDown(self) -> bool
@@ -7865,6 +7906,30 @@ def EventLoop_SetActive(*args, **kwargs):
     """EventLoop_SetActive(EventLoop loop)"""
     return _core_.EventLoop_SetActive(*args, **kwargs)
 
     """EventLoop_SetActive(EventLoop loop)"""
     return _core_.EventLoop_SetActive(*args, **kwargs)
 
+class EventLoopActivator(object):
+    """Proxy of C++ EventLoopActivator class"""
+    def __repr__(self):
+        return "<%s.%s; proxy of C++ wxEventLoopActivator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def __init__(self, *args, **kwargs):
+        """__init__(self, EventLoop evtLoop) -> EventLoopActivator"""
+        newobj = _core_.new_EventLoopActivator(*args, **kwargs)
+        self.this = newobj.this
+        self.thisown = 1
+        del newobj.thisown
+    def __del__(self, destroy=_core_.delete_EventLoopActivator):
+        """__del__(self)"""
+        try:
+            if self.thisown: destroy(self)
+        except: pass
+
+
+class EventLoopActivatorPtr(EventLoopActivator):
+    def __init__(self, this):
+        self.this = this
+        if not hasattr(self,"thisown"): self.thisown = 0
+        self.__class__ = EventLoopActivator
+_core_.EventLoopActivator_swigregister(EventLoopActivatorPtr)
+
 #---------------------------------------------------------------------------
 
 class AcceleratorEntry(object):
 #---------------------------------------------------------------------------
 
 class AcceleratorEntry(object):
@@ -8075,7 +8140,9 @@ class Window(EvtHandler):
         Returns True if the window has either been successfully deleted, or it
         has been added to the list of windows pending real deletion.
         """
         Returns True if the window has either been successfully deleted, or it
         has been added to the list of windows pending real deletion.
         """
-        return _core_.Window_Destroy(*args, **kwargs)
+        val = _core_.Window_Destroy(*args, **kwargs)
+        args[0].thisown = 0
+        return val
 
     def DestroyChildren(*args, **kwargs):
         """
 
     def DestroyChildren(*args, **kwargs):
         """
@@ -8483,15 +8550,6 @@ class Window(EvtHandler):
         return _core_.Window_Center(*args, **kwargs)
 
     Centre = Center 
         return _core_.Window_Center(*args, **kwargs)
 
     Centre = Center 
-    def CenterOnScreen(*args, **kwargs):
-        """
-        CenterOnScreen(self, int dir=BOTH)
-
-        Center on screen (only works for top level windows)
-        """
-        return _core_.Window_CenterOnScreen(*args, **kwargs)
-
-    CentreOnScreen = CenterOnScreen 
     def CenterOnParent(*args, **kwargs):
         """
         CenterOnParent(self, int dir=BOTH)
     def CenterOnParent(*args, **kwargs):
         """
         CenterOnParent(self, int dir=BOTH)
@@ -9996,9 +10054,13 @@ class Window(EvtHandler):
         SetAutoLayout(self, bool autoLayout)
 
         Determines whether the Layout function will be called automatically
         SetAutoLayout(self, bool autoLayout)
 
         Determines whether the Layout function will be called automatically
-        when the window is resized.  It is called implicitly by SetSizer but
-        if you use SetConstraints you should call it manually or otherwise the
-        window layout won't be correctly updated when its size changes.
+        when the window is resized.  lease note that this only happens for the
+        windows usually used to contain children, namely `wx.Panel` and
+        `wx.TopLevelWindow` (and the classes deriving from them).
+
+        This method is called implicitly by `SetSizer` but if you use
+        `SetConstraints` you should call it manually or otherwise the window
+        layout won't be correctly updated when its size changes.
         """
         return _core_.Window_SetAutoLayout(*args, **kwargs)
 
         """
         return _core_.Window_SetAutoLayout(*args, **kwargs)
 
@@ -10127,6 +10189,9 @@ class Window(EvtHandler):
         if hasattr(self, '_setCallbackInfo'):
             self._setCallbackInfo(self, self.__class__)
 
         if hasattr(self, '_setCallbackInfo'):
             self._setCallbackInfo(self, self.__class__)
 
+    def SendSizeEvent(self):
+        self.GetEventhandler().ProcessEvent(wx.SizeEvent((-1,-1)))
+
 
 class WindowPtr(Window):
     def __init__(self, this):
 
 class WindowPtr(Window):
     def __init__(self, this):
@@ -10483,7 +10548,9 @@ class Menu(EvtHandler):
 
         Deletes the C++ object this Python object is a proxy for.
         """
 
         Deletes the C++ object this Python object is a proxy for.
         """
-        return _core_.Menu_Destroy(*args, **kwargs)
+        val = _core_.Menu_Destroy(*args, **kwargs)
+        args[0].thisown = 0
+        return val
 
     def DestroyId(*args, **kwargs):
         """
 
     def DestroyId(*args, **kwargs):
         """
@@ -10491,7 +10558,9 @@ class Menu(EvtHandler):
 
         Deletes the C++ object this Python object is a proxy for.
         """
 
         Deletes the C++ object this Python object is a proxy for.
         """
-        return _core_.Menu_DestroyId(*args, **kwargs)
+        val = _core_.Menu_DestroyId(*args, **kwargs)
+        args[0].thisown = 0
+        return val
 
     def DestroyItem(*args, **kwargs):
         """
 
     def DestroyItem(*args, **kwargs):
         """
@@ -10499,7 +10568,9 @@ class Menu(EvtHandler):
 
         Deletes the C++ object this Python object is a proxy for.
         """
 
         Deletes the C++ object this Python object is a proxy for.
         """
-        return _core_.Menu_DestroyItem(*args, **kwargs)
+        val = _core_.Menu_DestroyItem(*args, **kwargs)
+        args[0].thisown = 0
+        return val
 
     def GetMenuItemCount(*args, **kwargs):
         """GetMenuItemCount(self) -> size_t"""
 
     def GetMenuItemCount(*args, **kwargs):
         """GetMenuItemCount(self) -> size_t"""
@@ -10875,6 +10946,14 @@ class MenuItem(Object):
         """SetAccel(self, AcceleratorEntry accel)"""
         return _core_.MenuItem_SetAccel(*args, **kwargs)
 
         """SetAccel(self, AcceleratorEntry accel)"""
         return _core_.MenuItem_SetAccel(*args, **kwargs)
 
+    def SetBitmap(*args, **kwargs):
+        """SetBitmap(self, Bitmap bitmap)"""
+        return _core_.MenuItem_SetBitmap(*args, **kwargs)
+
+    def GetBitmap(*args, **kwargs):
+        """GetBitmap(self) -> Bitmap"""
+        return _core_.MenuItem_GetBitmap(*args, **kwargs)
+
     def SetFont(*args, **kwargs):
         """SetFont(self, Font font)"""
         return _core_.MenuItem_SetFont(*args, **kwargs)
     def SetFont(*args, **kwargs):
         """SetFont(self, Font font)"""
         return _core_.MenuItem_SetFont(*args, **kwargs)
@@ -10936,14 +11015,6 @@ class MenuItem(Object):
         """ResetOwnerDrawn(self)"""
         return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
 
         """ResetOwnerDrawn(self)"""
         return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
 
-    def SetBitmap(*args, **kwargs):
-        """SetBitmap(self, Bitmap bitmap)"""
-        return _core_.MenuItem_SetBitmap(*args, **kwargs)
-
-    def GetBitmap(*args, **kwargs):
-        """GetBitmap(self) -> Bitmap"""
-        return _core_.MenuItem_GetBitmap(*args, **kwargs)
-
 
 class MenuItemPtr(MenuItem):
     def __init__(self, this):
 
 class MenuItemPtr(MenuItem):
     def __init__(self, this):
@@ -11306,6 +11377,12 @@ class SizerItem(Object):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
+    def __del__(self, destroy=_core_.delete_SizerItem):
+        """__del__(self)"""
+        try:
+            if self.thisown: destroy(self)
+        except: pass
+
     def DeleteWindows(*args, **kwargs):
         """
         DeleteWindows(self)
     def DeleteWindows(*args, **kwargs):
         """
         DeleteWindows(self)
@@ -11569,6 +11646,14 @@ class SizerItem(Object):
         """
         return _core_.SizerItem_GetUserData(*args, **kwargs)
 
         """
         return _core_.SizerItem_GetUserData(*args, **kwargs)
 
+    def SetUserData(*args, **kwargs):
+        """
+        SetUserData(self, PyObject userData)
+
+        Associate a Python object with this sizer item.
+        """
+        return _core_.SizerItem_SetUserData(*args, **kwargs)
+
 
 class SizerItemPtr(SizerItem):
     def __init__(self, this):
 
 class SizerItemPtr(SizerItem):
     def __init__(self, this):
@@ -11643,6 +11728,12 @@ class Sizer(Object):
     def __init__(self): raise RuntimeError, "No constructor defined"
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     def __init__(self): raise RuntimeError, "No constructor defined"
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def __del__(self, destroy=_core_.delete_Sizer):
+        """__del__(self)"""
+        try:
+            if self.thisown: destroy(self)
+        except: pass
+
     def _setOORInfo(*args, **kwargs):
         """_setOORInfo(self, PyObject _self)"""
         return _core_.Sizer__setOORInfo(*args, **kwargs)
     def _setOORInfo(*args, **kwargs):
         """_setOORInfo(self, PyObject _self)"""
         return _core_.Sizer__setOORInfo(*args, **kwargs)
@@ -11991,7 +12082,7 @@ class Sizer(Object):
         """
         IsShown(self, item)
 
         """
         IsShown(self, item)
 
-        Determines if the item is currently shown. sizer.  To make a sizer
+        Determines if the item is currently shown. To make a sizer
         item disappear or reappear, use Show followed by `Layout`.  The *item*
         parameter can be either a window, a sizer, or the zero-based index of
         the item.
         item disappear or reappear, use Show followed by `Layout`.  The *item*
         parameter can be either a window, a sizer, or the zero-based index of
         the item.
@@ -12566,6 +12657,12 @@ class GBPosition(object):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
+    def __del__(self, destroy=_core_.delete_GBPosition):
+        """__del__(self)"""
+        try:
+            if self.thisown: destroy(self)
+        except: pass
+
     def GetRow(*args, **kwargs):
         """GetRow(self) -> int"""
         return _core_.GBPosition_GetRow(*args, **kwargs)
     def GetRow(*args, **kwargs):
         """GetRow(self) -> int"""
         return _core_.GBPosition_GetRow(*args, **kwargs)
@@ -12645,6 +12742,12 @@ class GBSpan(object):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
+    def __del__(self, destroy=_core_.delete_GBSpan):
+        """__del__(self)"""
+        try:
+            if self.thisown: destroy(self)
+        except: pass
+
     def GetRowspan(*args, **kwargs):
         """GetRowspan(self) -> int"""
         return _core_.GBSpan_GetRowspan(*args, **kwargs)
     def GetRowspan(*args, **kwargs):
         """GetRowspan(self) -> int"""
         return _core_.GBSpan_GetRowspan(*args, **kwargs)
@@ -12725,6 +12828,12 @@ class GBSizerItem(SizerItem):
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
         self.this = newobj.this
         self.thisown = 1
         del newobj.thisown
+    def __del__(self, destroy=_core_.delete_GBSizerItem):
+        """__del__(self)"""
+        try:
+            if self.thisown: destroy(self)
+        except: pass
+
     def GetPos(*args, **kwargs):
         """
         GetPos(self) -> GBPosition
     def GetPos(*args, **kwargs):
         """
         GetPos(self) -> GBPosition
@@ -13598,3 +13707,4 @@ _core_._wxPyFixStockObjects()
 #----------------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------------
 
 
+