Deletes the C++ object this Python object is a proxy for.
"""
- val = _core_.Object_Destroy(*args, **kwargs)
- args[0].thisown = 0
- return val
+ args[0].this.own(False)
+ return _core_.Object_Destroy(*args, **kwargs)
+
+ def IsSameAs(*args, **kwargs):
+ """
+ IsSameAs(self, Object p) -> bool
+
+ For wx.Objects that use C++ reference counting internally, this method
+ can be used to determine if two objects are referencing the same data
+ object.
+ """
+ return _core_.Object_IsSameAs(*args, **kwargs)
ClassName = property(GetClassName,doc="See `GetClassName`")
_core_.Object_swigregister(Object)
BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
+BITMAP_TYPE_TGA = _core_.BITMAP_TYPE_TGA
BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
CURSOR_NONE = _core_.CURSOR_NONE
Create a w.Point2D object.
"""
_core_.Point2D_swiginit(self,_core_.new_Point2D(*args, **kwargs))
+ __swig_destroy__ = _core_.delete_Point2D
+ __del__ = lambda self : None;
def GetFloor(*args, **kwargs):
"""
GetFloor() -> (x,y)
#---------------------------------------------------------------------------
+Inside = _core_.Inside
+OutLeft = _core_.OutLeft
+OutRight = _core_.OutRight
+OutTop = _core_.OutTop
+OutBottom = _core_.OutBottom
+class Rect2D(object):
+ """
+ wx.Rect2D is a rectangle, with position and size, in a 2D coordinate system
+ with floating point component values.
+ """
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self, wxDouble x=0.0, wxDouble y=0.0, wxDouble w=0.0, wxDouble h=0.0) -> Rect2D
+
+ wx.Rect2D is a rectangle, with position and size, in a 2D coordinate system
+ with floating point component values.
+ """
+ _core_.Rect2D_swiginit(self,_core_.new_Rect2D(*args, **kwargs))
+ __swig_destroy__ = _core_.delete_Rect2D
+ __del__ = lambda self : None;
+ def GetPosition(*args, **kwargs):
+ """GetPosition(self) -> Point2D"""
+ return _core_.Rect2D_GetPosition(*args, **kwargs)
+
+ def GetSize(*args, **kwargs):
+ """GetSize(self) -> Size"""
+ return _core_.Rect2D_GetSize(*args, **kwargs)
+
+ def GetLeft(*args, **kwargs):
+ """GetLeft(self) -> wxDouble"""
+ return _core_.Rect2D_GetLeft(*args, **kwargs)
+
+ def SetLeft(*args, **kwargs):
+ """SetLeft(self, wxDouble n)"""
+ return _core_.Rect2D_SetLeft(*args, **kwargs)
+
+ def MoveLeftTo(*args, **kwargs):
+ """MoveLeftTo(self, wxDouble n)"""
+ return _core_.Rect2D_MoveLeftTo(*args, **kwargs)
+
+ def GetTop(*args, **kwargs):
+ """GetTop(self) -> wxDouble"""
+ return _core_.Rect2D_GetTop(*args, **kwargs)
+
+ def SetTop(*args, **kwargs):
+ """SetTop(self, wxDouble n)"""
+ return _core_.Rect2D_SetTop(*args, **kwargs)
+
+ def MoveTopTo(*args, **kwargs):
+ """MoveTopTo(self, wxDouble n)"""
+ return _core_.Rect2D_MoveTopTo(*args, **kwargs)
+
+ def GetBottom(*args, **kwargs):
+ """GetBottom(self) -> wxDouble"""
+ return _core_.Rect2D_GetBottom(*args, **kwargs)
+
+ def SetBottom(*args, **kwargs):
+ """SetBottom(self, wxDouble n)"""
+ return _core_.Rect2D_SetBottom(*args, **kwargs)
+
+ def MoveBottomTo(*args, **kwargs):
+ """MoveBottomTo(self, wxDouble n)"""
+ return _core_.Rect2D_MoveBottomTo(*args, **kwargs)
+
+ def GetRight(*args, **kwargs):
+ """GetRight(self) -> wxDouble"""
+ return _core_.Rect2D_GetRight(*args, **kwargs)
+
+ def SetRight(*args, **kwargs):
+ """SetRight(self, wxDouble n)"""
+ return _core_.Rect2D_SetRight(*args, **kwargs)
+
+ def MoveRightTo(*args, **kwargs):
+ """MoveRightTo(self, wxDouble n)"""
+ return _core_.Rect2D_MoveRightTo(*args, **kwargs)
+
+ def GetLeftTop(*args, **kwargs):
+ """GetLeftTop(self) -> Point2D"""
+ return _core_.Rect2D_GetLeftTop(*args, **kwargs)
+
+ def SetLeftTop(*args, **kwargs):
+ """SetLeftTop(self, Point2D pt)"""
+ return _core_.Rect2D_SetLeftTop(*args, **kwargs)
+
+ def MoveLeftTopTo(*args, **kwargs):
+ """MoveLeftTopTo(self, Point2D pt)"""
+ return _core_.Rect2D_MoveLeftTopTo(*args, **kwargs)
+
+ def GetLeftBottom(*args, **kwargs):
+ """GetLeftBottom(self) -> Point2D"""
+ return _core_.Rect2D_GetLeftBottom(*args, **kwargs)
+
+ def SetLeftBottom(*args, **kwargs):
+ """SetLeftBottom(self, Point2D pt)"""
+ return _core_.Rect2D_SetLeftBottom(*args, **kwargs)
+
+ def MoveLeftBottomTo(*args, **kwargs):
+ """MoveLeftBottomTo(self, Point2D pt)"""
+ return _core_.Rect2D_MoveLeftBottomTo(*args, **kwargs)
+
+ def GetRightTop(*args, **kwargs):
+ """GetRightTop(self) -> Point2D"""
+ return _core_.Rect2D_GetRightTop(*args, **kwargs)
+
+ def SetRightTop(*args, **kwargs):
+ """SetRightTop(self, Point2D pt)"""
+ return _core_.Rect2D_SetRightTop(*args, **kwargs)
+
+ def MoveRightTopTo(*args, **kwargs):
+ """MoveRightTopTo(self, Point2D pt)"""
+ return _core_.Rect2D_MoveRightTopTo(*args, **kwargs)
+
+ def GetRightBottom(*args, **kwargs):
+ """GetRightBottom(self) -> Point2D"""
+ return _core_.Rect2D_GetRightBottom(*args, **kwargs)
+
+ def SetRightBottom(*args, **kwargs):
+ """SetRightBottom(self, Point2D pt)"""
+ return _core_.Rect2D_SetRightBottom(*args, **kwargs)
+
+ def MoveRightBottomTo(*args, **kwargs):
+ """MoveRightBottomTo(self, Point2D pt)"""
+ return _core_.Rect2D_MoveRightBottomTo(*args, **kwargs)
+
+ def GetCentre(*args, **kwargs):
+ """GetCentre(self) -> Point2D"""
+ return _core_.Rect2D_GetCentre(*args, **kwargs)
+
+ def SetCentre(*args, **kwargs):
+ """SetCentre(self, Point2D pt)"""
+ return _core_.Rect2D_SetCentre(*args, **kwargs)
+
+ def MoveCentreTo(*args, **kwargs):
+ """MoveCentreTo(self, Point2D pt)"""
+ return _core_.Rect2D_MoveCentreTo(*args, **kwargs)
+
+ def GetOutcode(*args, **kwargs):
+ """GetOutcode(self, Point2D pt) -> int"""
+ return _core_.Rect2D_GetOutcode(*args, **kwargs)
+
+ def Contains(*args, **kwargs):
+ """Contains(self, Point2D pt) -> bool"""
+ return _core_.Rect2D_Contains(*args, **kwargs)
+
+ def ContainsRect(*args, **kwargs):
+ """ContainsRect(self, Rect2D rect) -> bool"""
+ return _core_.Rect2D_ContainsRect(*args, **kwargs)
+
+ def IsEmpty(*args, **kwargs):
+ """IsEmpty(self) -> bool"""
+ return _core_.Rect2D_IsEmpty(*args, **kwargs)
+
+ def HaveEqualSize(*args, **kwargs):
+ """HaveEqualSize(self, Rect2D rect) -> bool"""
+ return _core_.Rect2D_HaveEqualSize(*args, **kwargs)
+
+ def Inset(*args):
+ """
+ Inset(self, wxDouble x, wxDouble y)
+ Inset(self, wxDouble left, wxDouble top, wxDouble right, wxDouble bottom)
+ """
+ return _core_.Rect2D_Inset(*args)
+
+ def Offset(*args, **kwargs):
+ """Offset(self, Point2D pt)"""
+ return _core_.Rect2D_Offset(*args, **kwargs)
+
+ def ConstrainTo(*args, **kwargs):
+ """ConstrainTo(self, Rect2D rect)"""
+ return _core_.Rect2D_ConstrainTo(*args, **kwargs)
+
+ def Interpolate(*args, **kwargs):
+ """Interpolate(self, int widthfactor, int heightfactor) -> Point2D"""
+ return _core_.Rect2D_Interpolate(*args, **kwargs)
+
+ def Intersect(*args, **kwargs):
+ """Intersect(self, Rect2D otherRect)"""
+ return _core_.Rect2D_Intersect(*args, **kwargs)
+
+ def CreateIntersection(*args, **kwargs):
+ """CreateIntersection(self, Rect2D otherRect) -> Rect2D"""
+ return _core_.Rect2D_CreateIntersection(*args, **kwargs)
+
+ def Intersects(*args, **kwargs):
+ """Intersects(self, Rect2D rect) -> bool"""
+ return _core_.Rect2D_Intersects(*args, **kwargs)
+
+ def Union(*args, **kwargs):
+ """Union(self, Rect2D otherRect)"""
+ return _core_.Rect2D_Union(*args, **kwargs)
+
+ def CreateUnion(*args, **kwargs):
+ """CreateUnion(self, Rect2D otherRect) -> Rect2D"""
+ return _core_.Rect2D_CreateUnion(*args, **kwargs)
+
+ def Scale(*args):
+ """
+ Scale(self, wxDouble f)
+ Scale(self, int num, int denum)
+ """
+ return _core_.Rect2D_Scale(*args)
+
+ def __eq__(*args, **kwargs):
+ """
+ __eq__(self, PyObject other) -> bool
+
+ Test for equality of wx.Rect2D objects.
+ """
+ return _core_.Rect2D___eq__(*args, **kwargs)
+
+ def __ne__(*args, **kwargs):
+ """
+ __ne__(self, PyObject other) -> bool
+
+ Test for inequality of wx.Rect2D objects.
+ """
+ return _core_.Rect2D___ne__(*args, **kwargs)
+
+ x = property(_core_.Rect2D_x_get, _core_.Rect2D_x_set)
+ y = property(_core_.Rect2D_y_get, _core_.Rect2D_y_set)
+ width = property(_core_.Rect2D_width_get, _core_.Rect2D_width_set)
+ height = property(_core_.Rect2D_height_get, _core_.Rect2D_height_set)
+ def Set(*args, **kwargs):
+ """Set(self, wxDouble x=0, wxDouble y=0, wxDouble width=0, wxDouble height=0)"""
+ return _core_.Rect2D_Set(*args, **kwargs)
+
+ def Get(*args, **kwargs):
+ """
+ Get() -> (x,y, width, height)
+
+ Return x, y, width and height y properties as a tuple.
+ """
+ return _core_.Rect2D_Get(*args, **kwargs)
+
+ def __str__(self): return str(self.Get())
+ def __repr__(self): return 'wx.Rect2D'+str(self.Get())
+ def __len__(self): return len(self.Get())
+ def __getitem__(self, index): return self.Get()[index]
+ def __setitem__(self, index, val):
+ if index == 0: self.x = val
+ elif index == 1: self.y = val
+ elif index == 2: self.width = val
+ elif index == 3: self.height = val
+ else: raise IndexError
+ def __nonzero__(self): return self.Get() != (0.0, 0.0, 0.0, 0.0)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Rect2D, self.Get())
+
+_core_.Rect2D_swigregister(Rect2D)
+
+#---------------------------------------------------------------------------
+
FromStart = _core_.FromStart
FromCurrent = _core_.FromCurrent
FromEnd = _core_.FromEnd
Destroys the image data.
"""
- val = _core_.Image_Destroy(*args, **kwargs)
- args[0].thisown = 0
- return val
+ args[0].this.own(False)
+ return _core_.Image_Destroy(*args, **kwargs)
def Scale(*args, **kwargs):
"""
"""
return _core_.Image_LoadMimeStream(*args, **kwargs)
- def Ok(*args, **kwargs):
+ def IsOk(*args, **kwargs):
"""
- Ok(self) -> bool
+ IsOk(self) -> bool
Returns true if image data is present.
"""
- return _core_.Image_Ok(*args, **kwargs)
+ return _core_.Image_IsOk(*args, **kwargs)
+ Ok = IsOk
def GetWidth(*args, **kwargs):
"""
GetWidth(self) -> int
return _core_.Image_HSVtoRGB(*args, **kwargs)
HSVtoRGB = staticmethod(HSVtoRGB)
- def __nonzero__(self): return self.Ok()
+ def __nonzero__(self): return self.IsOk()
AlphaBuffer = property(GetAlphaBuffer,SetAlphaBuffer,doc="See `GetAlphaBuffer` and `SetAlphaBuffer`")
AlphaData = property(GetAlphaData,SetAlphaData,doc="See `GetAlphaData` and `SetAlphaData`")
Data = property(GetData,SetData,doc="See `GetData` and `SetData`")
MaskBlue = property(GetMaskBlue,doc="See `GetMaskBlue`")
MaskGreen = property(GetMaskGreen,doc="See `GetMaskGreen`")
MaskRed = property(GetMaskRed,doc="See `GetMaskRed`")
- Size = property(GetSize,doc="See `GetSize`")
Width = property(GetWidth,doc="See `GetWidth`")
_core_.Image_swigregister(Image)
_core_.TIFFHandler_swiginit(self,_core_.new_TIFFHandler(*args, **kwargs))
_core_.TIFFHandler_swigregister(TIFFHandler)
+class TGAHandler(ImageHandler):
+ """A `wx.ImageHandler` for TGA image files."""
+ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
+ __repr__ = _swig_repr
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self) -> TGAHandler
+
+ A `wx.ImageHandler` for TGA image files.
+ """
+ _core_.TGAHandler_swiginit(self,_core_.new_TGAHandler(*args, **kwargs))
+_core_.TGAHandler_swigregister(TGAHandler)
+
QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
class Quantize(object):
"""
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.
-
+ This method can be used inside an event handler to control whether
+ further event handlers bound to this event will be called after the
+ current one returns. Without Skip() (or equivalently if Skip(False) is
+ used), the event will not be processed any more. If Skip(True) is
+ called, the event processing system continues searching for a further
+ handler function for this event, even though it has been processed
+ already in the current handler.
"""
return _core_.Event_Skip(*args, **kwargs)
destroy(self)
def Destroy(self):
+ self.this.own(False)
wx.PyApp.Destroy(self)
- self.thisown = 0
def SetTopWindow(self, frame):
"""Set the \"main\" top level window"""
_core_.AcceleratorTable_swiginit(self,_core_.new_AcceleratorTable(*args, **kwargs))
__swig_destroy__ = _core_.delete_AcceleratorTable
__del__ = lambda self : None;
- def Ok(*args, **kwargs):
- """Ok(self) -> bool"""
- return _core_.AcceleratorTable_Ok(*args, **kwargs)
+ def IsOk(*args, **kwargs):
+ """IsOk(self) -> bool"""
+ return _core_.AcceleratorTable_IsOk(*args, **kwargs)
+ Ok = IsOk
_core_.AcceleratorTable_swigregister(AcceleratorTable)
Returns True if the window has either been successfully deleted, or it
has been added to the list of windows pending real deletion.
"""
- val = _core_.Window_Destroy(*args, **kwargs)
- args[0].thisown = 0
- return val
+ args[0].this.own(False)
+ return _core_.Window_Destroy(*args, **kwargs)
def DestroyChildren(*args, **kwargs):
"""
"""
return _core_.Window_MoveXY(*args, **kwargs)
- def SetBestFittingSize(*args, **kwargs):
+ def SetInitialSize(*args, **kwargs):
"""
- SetBestFittingSize(self, Size size=DefaultSize)
+ SetInitialSize(self, Size size=DefaultSize)
A 'Smart' SetSize that will fill in default size components with the
window's *best size* values. Also set's the minsize for use with sizers.
"""
- return _core_.Window_SetBestFittingSize(*args, **kwargs)
+ return _core_.Window_SetInitialSize(*args, **kwargs)
+ SetBestFittingSize = wx._deprecated(SetInitialSize, 'Use `SetInitialSize`')
def Raise(*args, **kwargs):
"""
Raise(self)
"""
return _core_.Window_CacheBestSize(*args, **kwargs)
- def GetBestFittingSize(*args, **kwargs):
+ def GetEffectiveMinSize(*args, **kwargs):
"""
- GetBestFittingSize(self) -> Size
+ GetEffectiveMinSize(self) -> Size
This function will merge the window's best size into the window's
minimum size, giving priority to the min size components, and returns
the results.
"""
- return _core_.Window_GetBestFittingSize(*args, **kwargs)
-
- def GetAdjustedBestSize(*args, **kwargs):
- """
- GetAdjustedBestSize(self) -> Size
+ return _core_.Window_GetEffectiveMinSize(*args, **kwargs)
- This method is similar to GetBestSize, except in one
- thing. GetBestSize should return the minimum untruncated size of the
- window, while this method will return the largest of BestSize and any
- user specified minimum size. ie. it is the minimum size the window
- should currently be drawn at, not the minimal size it can possibly
- tolerate.
- """
- return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
+ GetBestFittingSize = wx._deprecated(GetEffectiveMinSize, 'Use `GetEffectiveMinSize` instead.')
+ def GetAdjustedBestSize(self):
+ s = self.GetBestSize()
+ return wx.Size(max(s.width, self.GetMinWidth()),
+ max(s.height, self.GetMinHeight()))
+ GetAdjustedBestSize = wx._deprecated(GetAdjustedBestSize, 'Use `GetEffectiveMinSize` instead.')
def Center(*args, **kwargs):
"""
window instead of waiting for the EVT_PAINT event to happen, (normally
this would usually only happen when the flow of control returns to the
event loop.) Notice that this function doesn't refresh the window and
- does nothing if the window has been already repainted. Use Refresh
+ does nothing if the window has been already repainted. Use `Refresh`
first if you want to immediately redraw the window (or some portion of
it) unconditionally.
"""
"""
return _core_.Window_PrepareDC(*args, **kwargs)
+ def IsDoubleBuffered(*args, **kwargs):
+ """
+ IsDoubleBuffered(self) -> bool
+
+ Returns ``True`` if the window contents is double-buffered by the
+ system, i.e. if any drawing done on the window is really done on a
+ temporary backing surface and transferred to the screen all at once
+ later.
+ """
+ return _core_.Window_IsDoubleBuffered(*args, **kwargs)
+
def GetUpdateRegion(*args, **kwargs):
"""
GetUpdateRegion(self) -> Region
AutoLayout = property(GetAutoLayout,SetAutoLayout,doc="See `GetAutoLayout` and `SetAutoLayout`")
BackgroundColour = property(GetBackgroundColour,SetBackgroundColour,doc="See `GetBackgroundColour` and `SetBackgroundColour`")
BackgroundStyle = property(GetBackgroundStyle,SetBackgroundStyle,doc="See `GetBackgroundStyle` and `SetBackgroundStyle`")
- BestFittingSize = property(GetBestFittingSize,SetBestFittingSize,doc="See `GetBestFittingSize` and `SetBestFittingSize`")
+ EffectiveMinSize = property(GetEffectiveMinSize,doc="See `GetEffectiveMinSize`")
BestSize = property(GetBestSize,doc="See `GetBestSize`")
BestVirtualSize = property(GetBestVirtualSize,doc="See `GetBestVirtualSize`")
Border = property(GetBorder,doc="See `GetBorder`")
Deletes the C++ object this Python object is a proxy for.
"""
- val = _core_.Menu_Destroy(*args, **kwargs)
- args[0].thisown = 0
- return val
+ args[0].this.own(False)
+ return _core_.Menu_Destroy(*args, **kwargs)
def DestroyId(*args, **kwargs):
- """
- DestroyId(self, int id) -> bool
-
- Deletes the C++ object this Python object is a proxy for.
- """
- val = _core_.Menu_DestroyId(*args, **kwargs)
- args[0].thisown = 0
- return val
+ """DestroyId(self, int id) -> bool"""
+ return _core_.Menu_DestroyId(*args, **kwargs)
def DestroyItem(*args, **kwargs):
- """
- DestroyItem(self, MenuItem item) -> bool
-
- Deletes the C++ object this Python object is a proxy for.
- """
- val = _core_.Menu_DestroyItem(*args, **kwargs)
- args[0].thisown = 0
- return val
+ """DestroyItem(self, MenuItem item) -> bool"""
+ return _core_.Menu_DestroyItem(*args, **kwargs)
def GetMenuItemCount(*args, **kwargs):
"""GetMenuItemCount(self) -> size_t"""