]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
more about the downloadable swig
[wxWidgets.git] / wxPython / src / gtk / _core.py
index c3cdc53e95f49dcbc6b61c97e6c6ea3b41725f4b..f7ad0825f666206a2a6a10b332cb895e27f9b507 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_
@@ -161,6 +161,7 @@ SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
 SIZE_AUTO = _core_.SIZE_AUTO
 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
 SIZE_AUTO = _core_.SIZE_AUTO
 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
+SIZE_FORCE = _core_.SIZE_FORCE
 PORTRAIT = _core_.PORTRAIT
 LANDSCAPE = _core_.LANDSCAPE
 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
 PORTRAIT = _core_.PORTRAIT
 LANDSCAPE = _core_.LANDSCAPE
 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
@@ -169,6 +170,7 @@ PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
 ID_ANY = _core_.ID_ANY
 ID_SEPARATOR = _core_.ID_SEPARATOR
 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
 ID_ANY = _core_.ID_ANY
 ID_SEPARATOR = _core_.ID_SEPARATOR
+ID_NONE = _core_.ID_NONE
 ID_LOWEST = _core_.ID_LOWEST
 ID_OPEN = _core_.ID_OPEN
 ID_CLOSE = _core_.ID_CLOSE
 ID_LOWEST = _core_.ID_LOWEST
 ID_OPEN = _core_.ID_OPEN
 ID_CLOSE = _core_.ID_CLOSE
@@ -673,8 +675,12 @@ HT_MAX = _core_.HT_MAX
 MOD_NONE = _core_.MOD_NONE
 MOD_ALT = _core_.MOD_ALT
 MOD_CONTROL = _core_.MOD_CONTROL
 MOD_NONE = _core_.MOD_NONE
 MOD_ALT = _core_.MOD_ALT
 MOD_CONTROL = _core_.MOD_CONTROL
+MOD_ALTGR = _core_.MOD_ALTGR
 MOD_SHIFT = _core_.MOD_SHIFT
 MOD_SHIFT = _core_.MOD_SHIFT
+MOD_META = _core_.MOD_META
 MOD_WIN = _core_.MOD_WIN
 MOD_WIN = _core_.MOD_WIN
+MOD_CMD = _core_.MOD_CMD
+MOD_ALL = _core_.MOD_ALL
 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
@@ -2145,6 +2151,80 @@ class ImageHandlerPtr(ImageHandler):
         self.__class__ = ImageHandler
 _core_.ImageHandler_swigregister(ImageHandlerPtr)
 
         self.__class__ = ImageHandler
 _core_.ImageHandler_swigregister(ImageHandlerPtr)
 
+class PyImageHandler(ImageHandler):
+    """
+    This is the base class for implementing image file loading/saving, and
+    image creation from data, all written in Python.  To create a custom
+    image handler derive a new class from wx.PyImageHandler and provide
+    the following methods::
+
+        def DoCanRead(self, stream) --> bool
+            '''Check if this handler can read the image on the stream'''
+
+        def LoadFile(self, image, stream, verbose, index) --> bool
+            '''Load image data from the stream and load it into image.'''
+
+        def SaveFile(self, image, stream, verbose) --> bool
+            '''Save the iamge data in image to the stream using
+               this handler's image file format.'''
+
+        def GetImageCount(self, stream) --> int
+            '''If this image format can hold more than one image,
+               how many does the image on the stream have?'''
+
+    To activate your handler create an instance of it and pass it to
+    `wx.Image_AddHandler`.  Be sure to call `SetName`, `SetType`, and
+    `SetExtension` from your constructor.
+
+    """
+    def __repr__(self):
+        return "<%s.%s; proxy of C++ wxPyImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def __init__(self, *args, **kwargs):
+        """
+        __init__(self) -> PyImageHandler
+
+        This is the base class for implementing image file loading/saving, and
+        image creation from data, all written in Python.  To create a custom
+        image handler derive a new class from wx.PyImageHandler and provide
+        the following methods::
+
+            def DoCanRead(self, stream) --> bool
+                '''Check if this handler can read the image on the stream'''
+
+            def LoadFile(self, image, stream, verbose, index) --> bool
+                '''Load image data from the stream and load it into image.'''
+
+            def SaveFile(self, image, stream, verbose) --> bool
+                '''Save the iamge data in image to the stream using
+                   this handler's image file format.'''
+
+            def GetImageCount(self, stream) --> int
+                '''If this image format can hold more than one image,
+                   how many does the image on the stream have?'''
+
+        To activate your handler create an instance of it and pass it to
+        `wx.Image_AddHandler`.  Be sure to call `SetName`, `SetType`, and
+        `SetExtension` from your constructor.
+
+        """
+        newobj = _core_.new_PyImageHandler(*args, **kwargs)
+        self.this = newobj.this
+        self.thisown = 1
+        del newobj.thisown
+        self._SetSelf(self)
+
+    def _SetSelf(*args, **kwargs):
+        """_SetSelf(self, PyObject self)"""
+        return _core_.PyImageHandler__SetSelf(*args, **kwargs)
+
+
+class PyImageHandlerPtr(PyImageHandler):
+    def __init__(self, this):
+        self.this = this
+        if not hasattr(self,"thisown"): self.thisown = 0
+        self.__class__ = PyImageHandler
+_core_.PyImageHandler_swigregister(PyImageHandlerPtr)
+
 class ImageHistogram(object):
     """Proxy of C++ ImageHistogram class"""
     def __repr__(self):
 class ImageHistogram(object):
     """Proxy of C++ ImageHistogram class"""
     def __repr__(self):
@@ -2215,6 +2295,66 @@ def ImageHistogram_MakeKey(*args, **kwargs):
     """
     return _core_.ImageHistogram_MakeKey(*args, **kwargs)
 
     """
     return _core_.ImageHistogram_MakeKey(*args, **kwargs)
 
+class Image_RGBValue(object):
+    """
+    An object that contains values for red, green and blue which represent
+    the value of a color. It is used by `wx.Image.HSVtoRGB` and
+    `wx.Image.RGBtoHSV`, which converts between HSV color space and RGB
+    color space.
+    """
+    def __repr__(self):
+        return "<%s.%s; proxy of C++ wxImage_RGBValue instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def __init__(self, *args, **kwargs):
+        """
+        __init__(self, byte r=0, byte g=0, byte b=0) -> Image_RGBValue
+
+        Constructor.
+        """
+        newobj = _core_.new_Image_RGBValue(*args, **kwargs)
+        self.this = newobj.this
+        self.thisown = 1
+        del newobj.thisown
+    red = property(_core_.Image_RGBValue_red_get, _core_.Image_RGBValue_red_set)
+    green = property(_core_.Image_RGBValue_green_get, _core_.Image_RGBValue_green_set)
+    blue = property(_core_.Image_RGBValue_blue_get, _core_.Image_RGBValue_blue_set)
+
+class Image_RGBValuePtr(Image_RGBValue):
+    def __init__(self, this):
+        self.this = this
+        if not hasattr(self,"thisown"): self.thisown = 0
+        self.__class__ = Image_RGBValue
+_core_.Image_RGBValue_swigregister(Image_RGBValuePtr)
+
+class Image_HSVValue(object):
+    """
+    An object that contains values for hue, saturation and value which
+    represent the value of a color.  It is used by `wx.Image.HSVtoRGB` and
+    `wx.Image.RGBtoHSV`, which +converts between HSV color space and RGB
+    color space.
+    """
+    def __repr__(self):
+        return "<%s.%s; proxy of C++ wxImage_HSVValue instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def __init__(self, *args, **kwargs):
+        """
+        __init__(self, double h=0.0, double s=0.0, double v=0.0) -> Image_HSVValue
+
+        Constructor.
+        """
+        newobj = _core_.new_Image_HSVValue(*args, **kwargs)
+        self.this = newobj.this
+        self.thisown = 1
+        del newobj.thisown
+    hue = property(_core_.Image_HSVValue_hue_get, _core_.Image_HSVValue_hue_set)
+    saturation = property(_core_.Image_HSVValue_saturation_get, _core_.Image_HSVValue_saturation_set)
+    value = property(_core_.Image_HSVValue_value_get, _core_.Image_HSVValue_value_set)
+
+class Image_HSVValuePtr(Image_HSVValue):
+    def __init__(self, this):
+        self.this = this
+        if not hasattr(self,"thisown"): self.thisown = 0
+        self.__class__ = Image_HSVValue
+_core_.Image_HSVValue_swigregister(Image_HSVValuePtr)
+
 class Image(Object):
     """
     A platform-independent image class.  An image can be created from
 class Image(Object):
     """
     A platform-independent image class.  An image can be created from
@@ -2797,6 +2937,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
@@ -2892,6 +3042,33 @@ class Image(Object):
         """ConvertToMonoBitmap(self, byte red, byte green, byte blue) -> Bitmap"""
         return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
 
         """ConvertToMonoBitmap(self, byte red, byte green, byte blue) -> Bitmap"""
         return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
 
+    def RotateHue(*args, **kwargs):
+        """
+        RotateHue(self, double angle)
+
+        Rotates the hue of each pixel of the image. Hue is a double in the
+        range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees
+        """
+        return _core_.Image_RotateHue(*args, **kwargs)
+
+    def RGBtoHSV(*args, **kwargs):
+        """
+        RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue
+
+        Converts a color in RGB color space to HSV color space.
+        """
+        return _core_.Image_RGBtoHSV(*args, **kwargs)
+
+    RGBtoHSV = staticmethod(RGBtoHSV)
+    def HSVtoRGB(*args, **kwargs):
+        """
+        HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue
+
+        Converts a color in HSV color space to RGB color space.
+        """
+        return _core_.Image_HSVtoRGB(*args, **kwargs)
+
+    HSVtoRGB = staticmethod(HSVtoRGB)
     def __nonzero__(self): return self.Ok() 
 
 class ImagePtr(Image):
     def __nonzero__(self): return self.Ok() 
 
 class ImagePtr(Image):
@@ -3030,6 +3207,22 @@ def Image_GetImageExtWildcard(*args, **kwargs):
     """
     return _core_.Image_GetImageExtWildcard(*args, **kwargs)
 
     """
     return _core_.Image_GetImageExtWildcard(*args, **kwargs)
 
+def Image_RGBtoHSV(*args, **kwargs):
+    """
+    Image_RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue
+
+    Converts a color in RGB color space to HSV color space.
+    """
+    return _core_.Image_RGBtoHSV(*args, **kwargs)
+
+def Image_HSVtoRGB(*args, **kwargs):
+    """
+    Image_HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue
+
+    Converts a color in HSV color space to RGB color space.
+    """
+    return _core_.Image_HSVtoRGB(*args, **kwargs)
+
 def InitAllImageHandlers():
     """
     The former functionality of InitAllImageHanders is now done internal to
 def InitAllImageHandlers():
     """
     The former functionality of InitAllImageHanders is now done internal to
@@ -6399,8 +6592,15 @@ _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
 
 class WindowDestroyEvent(CommandEvent):
     """
 
 class WindowDestroyEvent(CommandEvent):
     """
-    The EVT_WINDOW_DESTROY event is sent right before the window is
-    destroyed.
+    The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor
+    when the GUI window is destroyed.
+
+    When a class derived from `wx.Window` is destroyed its destructor will
+    have already run by the time this event is sent. Therefore this event
+    will not usually be received at all by the window itself.  Since it is
+    received after the destructor has run, an object should not try to
+    handle its own wx.WindowDestroyEvent, but it can be used to get
+    notification of the destruction of another window.
     """
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
     """
     def __repr__(self):
         return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
@@ -6408,8 +6608,15 @@ class WindowDestroyEvent(CommandEvent):
         """
         __init__(self, Window win=None) -> WindowDestroyEvent
 
         """
         __init__(self, Window win=None) -> WindowDestroyEvent
 
-        The EVT_WINDOW_DESTROY event is sent right before the window is
-        destroyed.
+        The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor
+        when the GUI window is destroyed.
+
+        When a class derived from `wx.Window` is destroyed its destructor will
+        have already run by the time this event is sent. Therefore this event
+        will not usually be received at all by the window itself.  Since it is
+        received after the destructor has run, an object should not try to
+        handle its own wx.WindowDestroyEvent, but it can be used to get
+        notification of the destruction of another window.
         """
         newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
         self.this = newobj.this
         """
         newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
         self.this = newobj.this
@@ -7668,6 +7875,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):
@@ -7897,22 +8128,6 @@ class Window(EvtHandler):
         """
         return _core_.Window_IsBeingDeleted(*args, **kwargs)
 
         """
         return _core_.Window_IsBeingDeleted(*args, **kwargs)
 
-    def SetTitle(*args, **kwargs):
-        """
-        SetTitle(self, String title)
-
-        Sets the window's title. Applicable only to frames and dialogs.
-        """
-        return _core_.Window_SetTitle(*args, **kwargs)
-
-    def GetTitle(*args, **kwargs):
-        """
-        GetTitle(self) -> String
-
-        Gets the window's title. Applicable only to frames and dialogs.
-        """
-        return _core_.Window_GetTitle(*args, **kwargs)
-
     def SetLabel(*args, **kwargs):
         """
         SetLabel(self, String label)
     def SetLabel(*args, **kwargs):
         """
         SetLabel(self, String label)
@@ -8092,8 +8307,8 @@ class Window(EvtHandler):
         """
         Raise(self)
 
         """
         Raise(self)
 
-        Raises the window to the top of the window hierarchy if it is a
-        managed window (dialog or frame).
+        Raises the window to the top of the window hierarchy.  In current
+        version of wxWidgets this works both for manage and child windows.
         """
         return _core_.Window_Raise(*args, **kwargs)
 
         """
         return _core_.Window_Raise(*args, **kwargs)
 
@@ -8101,8 +8316,8 @@ class Window(EvtHandler):
         """
         Lower(self)
 
         """
         Lower(self)
 
-        Lowers the window to the bottom of the window hierarchy if it is a
-        managed window (dialog or frame).
+        Lowers the window to the bottom of the window hierarchy.  In current
+        version of wxWidgets this works both for manage and child windows.
         """
         return _core_.Window_Lower(*args, **kwargs)
 
         """
         return _core_.Window_Lower(*args, **kwargs)
 
@@ -10690,6 +10905,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)
@@ -10751,14 +10974,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):
@@ -11384,6 +11599,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):
@@ -13413,3 +13636,4 @@ _core_._wxPyFixStockObjects()
 #----------------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------------
 
 
+