]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/_core.py
warning fix
[wxWidgets.git] / wxPython / src / mac / _core.py
index 422f5f966223915e60d3f80fa17eeb315008392f..8fcf6b6480a0c6da16fb95579f162467d9ebf2f7 100644 (file)
@@ -121,20 +121,12 @@ RA_HORIZONTAL = _core_.RA_HORIZONTAL
 RA_VERTICAL = _core_.RA_VERTICAL
 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
+RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
 RB_GROUP = _core_.RB_GROUP
 RB_SINGLE = _core_.RB_SINGLE
-SL_HORIZONTAL = _core_.SL_HORIZONTAL
-SL_VERTICAL = _core_.SL_VERTICAL
-SL_AUTOTICKS = _core_.SL_AUTOTICKS
-SL_LABELS = _core_.SL_LABELS
-SL_LEFT = _core_.SL_LEFT
-SL_TOP = _core_.SL_TOP
-SL_RIGHT = _core_.SL_RIGHT
-SL_BOTTOM = _core_.SL_BOTTOM
-SL_BOTH = _core_.SL_BOTH
-SL_SELRANGE = _core_.SL_SELRANGE
 SB_HORIZONTAL = _core_.SB_HORIZONTAL
 SB_VERTICAL = _core_.SB_VERTICAL
+RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
 ST_SIZEGRIP = _core_.ST_SIZEGRIP
 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
 FLOOD_SURFACE = _core_.FLOOD_SURFACE
@@ -1202,9 +1194,24 @@ class Rect(object):
         """
         Inflate(self, int dx, int dy) -> Rect
 
-        Increase the rectangle size by dx in x direction and dy in y
-        direction. Both (or one of) parameters may be negative to decrease the
-        rectangle size.
+        Increases the size of the rectangle.
+
+        The left border is moved farther left and the right border is moved
+        farther right by ``dx``. The upper border is moved farther up and the
+        bottom border is moved farther down by ``dy``. (Note the the width and
+        height of the rectangle thus change by ``2*dx`` and ``2*dy``,
+        respectively.) If one or both of ``dx`` and ``dy`` are negative, the
+        opposite happens: the rectangle size decreases in the respective
+        direction.
+
+        The change is made to the rectangle inplace, if instead you need a
+        copy that is inflated, preserving the original then make the copy
+        first::
+
+            copy = wx.Rect(*original)
+            copy.Inflate(10,15)
+
+
         """
         return _core_.Rect_Inflate(*args, **kwargs)
 
@@ -1212,9 +1219,9 @@ class Rect(object):
         """
         Deflate(self, int dx, int dy) -> Rect
 
-        Decrease the rectangle size by dx in x direction and dy in y
-        direction. Both (or one of) parameters may be negative to increase the
-        rectngle size. This method is the opposite of Inflate.
+        Decrease the rectangle size. This method is the opposite of `Inflate`
+        in that Deflate(a,b) is equivalent to Inflate(-a,-b).  Please refer to
+        `Inflate` for a full description.
         """
         return _core_.Rect_Deflate(*args, **kwargs)
 
@@ -2170,6 +2177,17 @@ class Image(Object):
         """HasAlpha(self) -> bool"""
         return _core_.Image_HasAlpha(*args, **kwargs)
 
+    def InitAlpha(*args, **kwargs):
+        """
+        InitAlpha(self)
+
+        Initializes the image alpha channel data. It is an error to call it if
+        the image already has alpha data. If it doesn't, alpha data will be by
+        default initialized to all pixels being fully opaque. But if the image
+        has a a mask colour, all mask pixels will be completely transparent.
+        """
+        return _core_.Image_InitAlpha(*args, **kwargs)
+
     def FindFirstUnusedColour(*args, **kwargs):
         """
         FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
@@ -2532,11 +2550,18 @@ class BMPHandlerPtr(BMPHandler):
         self.__class__ = BMPHandler
 _core_.BMPHandler_swigregister(BMPHandlerPtr)
 NullImage = cvar.NullImage
+IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
+IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
+IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
+IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
+IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
+IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
+IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
 
 class ICOHandler(BMPHandler):
     """Proxy of C++ ICOHandler class"""
@@ -3276,7 +3301,18 @@ class Event(Object):
         return _core_.Event_IsCommandEvent(*args, **kwargs)
 
     def Skip(*args, **kwargs):
-        """Skip(self, bool skip=True)"""
+        """
+        Skip(self, bool skip=True)
+
+        Called by an event handler, it controls whether additional event
+        handlers bound to this event will be called after the current event
+        handler returns.  Skip(false) (the default setting) will prevent
+        additional event handlers from being called and control will be
+        returned to the sender of the event immediately after the current
+        handler has finished.  Skip(True) will cause the event processing
+        system to continue searching for a handler function for this event.
+
+        """
         return _core_.Event_Skip(*args, **kwargs)
 
     def GetSkipped(*args, **kwargs):
@@ -3942,8 +3978,9 @@ class MoveEvent(Event):
         """SetPosition(self, Point pos)"""
         return _core_.MoveEvent_SetPosition(*args, **kwargs)
 
-    m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
-    m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
+    m_pos =  property(GetPosition, SetPosition)
+    m_rect = property(GetRect, SetRect)
+
 
 class MoveEventPtr(MoveEvent):
     def __init__(self, this):
@@ -4545,6 +4582,14 @@ class NavigationKeyEvent(Event):
         """SetWindowChange(self, bool ischange)"""
         return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
 
+    def IsFromTab(*args, **kwargs):
+        """IsFromTab(self) -> bool"""
+        return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
+
+    def SetFromTab(*args, **kwargs):
+        """SetFromTab(self, bool bIs)"""
+        return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
+
     def SetFlags(*args, **kwargs):
         """SetFlags(self, long flags)"""
         return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
@@ -4560,6 +4605,7 @@ class NavigationKeyEvent(Event):
     IsBackward = _core_.NavigationKeyEvent_IsBackward
     IsForward = _core_.NavigationKeyEvent_IsForward
     WinChange = _core_.NavigationKeyEvent_WinChange
+    FromTab = _core_.NavigationKeyEvent_FromTab
 
 class NavigationKeyEventPtr(NavigationKeyEvent):
     def __init__(self, this):
@@ -4769,6 +4815,35 @@ class PyCommandEventPtr(PyCommandEvent):
         self.__class__ = PyCommandEvent
 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
 
+class DateEvent(CommandEvent):
+    """Proxy of C++ DateEvent class"""
+    def __repr__(self):
+        return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+    def __init__(self, *args, **kwargs):
+        """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
+        newobj = _core_.new_DateEvent(*args, **kwargs)
+        self.this = newobj.this
+        self.thisown = 1
+        del newobj.thisown
+    def GetDate(*args, **kwargs):
+        """GetDate(self) -> DateTime"""
+        return _core_.DateEvent_GetDate(*args, **kwargs)
+
+    def SetDate(*args, **kwargs):
+        """SetDate(self, DateTime date)"""
+        return _core_.DateEvent_SetDate(*args, **kwargs)
+
+
+class DateEventPtr(DateEvent):
+    def __init__(self, this):
+        self.this = this
+        if not hasattr(self,"thisown"): self.thisown = 0
+        self.__class__ = DateEvent
+_core_.DateEvent_swigregister(DateEventPtr)
+
+wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
+EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
+
 #---------------------------------------------------------------------------
 
 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
@@ -7102,7 +7177,7 @@ class Window(EvtHandler):
 
     def RefreshRect(*args, **kwargs):
         """
-        RefreshRect(self, Rect rect)
+        RefreshRect(self, Rect rect, bool eraseBackground=True)
 
         Redraws the contents of the given rectangle: the area inside it will
         be repainted.  This is the same as Refresh but has a nicer syntax.
@@ -7341,6 +7416,21 @@ class Window(EvtHandler):
         """
         return _core_.Window_GetBackgroundStyle(*args, **kwargs)
 
+    def HasTransparentBackground(*args, **kwargs):
+        """
+        HasTransparentBackground(self) -> bool
+
+        Returns True if this window's background is transparent (as, for
+        example, for `wx.StaticText`) and should show the parent window's
+        background.
+
+        This method is mostly used internally by the library itself and you
+        normally shouldn't have to call it. You may, however, have to override
+        it in your custom control classes to ensure that background is painted
+        correctly.
+        """
+        return _core_.Window_HasTransparentBackground(*args, **kwargs)
+
     def SetCursor(*args, **kwargs):
         """
         SetCursor(self, Cursor cursor) -> bool
@@ -8769,10 +8859,10 @@ def Control_GetClassDefaultAttributes(*args, **kwargs):
 
 class ItemContainer(object):
     """
-    wx.ItemContainer defines an interface which is implemented by all
-    controls which have string subitems, each of which may be selected,
-    such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
-    `wx.ComboBox` which implements an extended interface deriving from
+    The wx.ItemContainer class defines an interface which is implemented
+    by all controls which have string subitems, each of which may be
+    selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
+    as `wx.ComboBox` which implements an extended interface deriving from
     this one.
 
     It defines the methods for accessing the control's items and although
@@ -8835,6 +8925,22 @@ class ItemContainer(object):
         """
         return _core_.ItemContainer_Delete(*args, **kwargs)
 
+    def GetClientData(*args, **kwargs):
+        """
+        GetClientData(self, int n) -> PyObject
+
+        Returns the client data associated with the given item, (if any.)
+        """
+        return _core_.ItemContainer_GetClientData(*args, **kwargs)
+
+    def SetClientData(*args, **kwargs):
+        """
+        SetClientData(self, int n, PyObject clientData)
+
+        Associate the given client data with the item at position n.
+        """
+        return _core_.ItemContainer_SetClientData(*args, **kwargs)
+
     def GetCount(*args, **kwargs):
         """
         GetCount(self) -> int
@@ -8881,15 +8987,14 @@ class ItemContainer(object):
         """
         return _core_.ItemContainer_FindString(*args, **kwargs)
 
-    def Select(*args, **kwargs):
+    def SetSelection(*args, **kwargs):
         """
-        Select(self, int n)
+        SetSelection(self, int n)
 
         Sets the item at index 'n' to be the selected item.
         """
-        return _core_.ItemContainer_Select(*args, **kwargs)
+        return _core_.ItemContainer_SetSelection(*args, **kwargs)
 
-    SetSelection = Select 
     def GetSelection(*args, **kwargs):
         """
         GetSelection(self) -> int
@@ -8899,6 +9004,10 @@ class ItemContainer(object):
         """
         return _core_.ItemContainer_GetSelection(*args, **kwargs)
 
+    def SetStringSelection(*args, **kwargs):
+        """SetStringSelection(self, String s) -> bool"""
+        return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
+
     def GetStringSelection(*args, **kwargs):
         """
         GetStringSelection(self) -> String
@@ -8908,21 +9017,14 @@ class ItemContainer(object):
         """
         return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
 
-    def GetClientData(*args, **kwargs):
-        """
-        GetClientData(self, int n) -> PyObject
-
-        Returns the client data associated with the given item, (if any.)
-        """
-        return _core_.ItemContainer_GetClientData(*args, **kwargs)
-
-    def SetClientData(*args, **kwargs):
+    def Select(*args, **kwargs):
         """
-        SetClientData(self, int n, PyObject clientData)
+        Select(self, int n)
 
-        Associate the given client data with the item at position n.
+        This is the same as `SetSelection` and exists only because it is
+        slightly more natural for controls which support multiple selection.
         """
-        return _core_.ItemContainer_SetClientData(*args, **kwargs)
+        return _core_.ItemContainer_Select(*args, **kwargs)
 
 
 class ItemContainerPtr(ItemContainer):
@@ -9618,7 +9720,7 @@ class Sizer(Object):
 
     def GetChildren(*args, **kwargs):
         """
-        GetChildren(sefl) -> list
+        GetChildren(self) -> list
 
         Returns a list of all the `wx.SizerItem` objects managed by the sizer.
         """
@@ -10118,7 +10220,7 @@ class StdDialogButtonSizer(BoxSizer):
     A special sizer that knows how to order and position standard buttons
     in order to conform to the current platform's standards.  You simply
     need to add each `wx.Button` to the sizer, and be sure to create the
-    buttons using the standard ID's.  Then call `Finalize` and the sizer
+    buttons using the standard ID's.  Then call `Realize` and the sizer
     will take care of the rest.
 
     """
@@ -10139,15 +10241,27 @@ class StdDialogButtonSizer(BoxSizer):
         """
         return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
 
-    def Finalise(*args, **kwargs):
+    def Realize(*args, **kwargs):
         """
-        Finalise(self)
+        Realize(self)
 
         This funciton needs to be called after all the buttons have been added
         to the sizer.  It will reorder them and position them in a platform
         specifc manner.
         """
-        return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
+        return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
+
+    def SetAffirmativeButton(*args, **kwargs):
+        """SetAffirmativeButton(self, wxButton button)"""
+        return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
+
+    def SetNegativeButton(*args, **kwargs):
+        """SetNegativeButton(self, wxButton button)"""
+        return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
+
+    def SetCancelButton(*args, **kwargs):
+        """SetCancelButton(self, wxButton button)"""
+        return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
 
     def GetAffirmativeButton(*args, **kwargs):
         """GetAffirmativeButton(self) -> wxButton"""