📄 _core.py
字号:
CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
CURSOR_CHAR = _core_.CURSOR_CHAR
CURSOR_CROSS = _core_.CURSOR_CROSS
CURSOR_HAND = _core_.CURSOR_HAND
CURSOR_IBEAM = _core_.CURSOR_IBEAM
CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
CURSOR_PENCIL = _core_.CURSOR_PENCIL
CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
CURSOR_SIZENS = _core_.CURSOR_SIZENS
CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
CURSOR_SIZING = _core_.CURSOR_SIZING
CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
CURSOR_WAIT = _core_.CURSOR_WAIT
CURSOR_WATCH = _core_.CURSOR_WATCH
CURSOR_BLANK = _core_.CURSOR_BLANK
CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
CURSOR_MAX = _core_.CURSOR_MAX
#---------------------------------------------------------------------------
class Size(object):
"""
wx.Size is a useful data structure used to represent the size of
something. It simply contains integer width and height
properties. In most places in wxPython where a wx.Size is
expected a (width, height) tuple can be used instead.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
width = property(_core_.Size_width_get, _core_.Size_width_set)
height = property(_core_.Size_height_get, _core_.Size_height_set)
x = width; y = height
def __init__(self, *args, **kwargs):
"""
__init__(self, int w=0, int h=0) -> Size
Creates a size object.
"""
_core_.Size_swiginit(self,_core_.new_Size(*args, **kwargs))
__swig_destroy__ = _core_.delete_Size
__del__ = lambda self : None;
def __eq__(*args, **kwargs):
"""
__eq__(self, PyObject other) -> bool
Test for equality of wx.Size objects.
"""
return _core_.Size___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""
__ne__(self, PyObject other) -> bool
Test for inequality of wx.Size objects.
"""
return _core_.Size___ne__(*args, **kwargs)
def __add__(*args, **kwargs):
"""
__add__(self, Size sz) -> Size
Add sz's proprties to this and return the result.
"""
return _core_.Size___add__(*args, **kwargs)
def __sub__(*args, **kwargs):
"""
__sub__(self, Size sz) -> Size
Subtract sz's properties from this and return the result.
"""
return _core_.Size___sub__(*args, **kwargs)
def IncTo(*args, **kwargs):
"""
IncTo(self, Size sz)
Increments this object so that both of its dimensions are not less
than the corresponding dimensions of the size.
"""
return _core_.Size_IncTo(*args, **kwargs)
def DecTo(*args, **kwargs):
"""
DecTo(self, Size sz)
Decrements this object so that both of its dimensions are not greater
than the corresponding dimensions of the size.
"""
return _core_.Size_DecTo(*args, **kwargs)
def Set(*args, **kwargs):
"""
Set(self, int w, int h)
Set both width and height.
"""
return _core_.Size_Set(*args, **kwargs)
def SetWidth(*args, **kwargs):
"""SetWidth(self, int w)"""
return _core_.Size_SetWidth(*args, **kwargs)
def SetHeight(*args, **kwargs):
"""SetHeight(self, int h)"""
return _core_.Size_SetHeight(*args, **kwargs)
def GetWidth(*args, **kwargs):
"""GetWidth(self) -> int"""
return _core_.Size_GetWidth(*args, **kwargs)
def GetHeight(*args, **kwargs):
"""GetHeight(self) -> int"""
return _core_.Size_GetHeight(*args, **kwargs)
def IsFullySpecified(*args, **kwargs):
"""
IsFullySpecified(self) -> bool
Returns True if both components of the size are non-default values.
"""
return _core_.Size_IsFullySpecified(*args, **kwargs)
def SetDefaults(*args, **kwargs):
"""
SetDefaults(self, Size size)
Combine this size with the other one replacing the default components
of this object (i.e. equal to -1) with those of the other.
"""
return _core_.Size_SetDefaults(*args, **kwargs)
def Get(*args, **kwargs):
"""
Get() -> (width,height)
Returns the width and height properties as a tuple.
"""
return _core_.Size_Get(*args, **kwargs)
asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Size'+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.width = val
elif index == 1: self.height = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
__safe_for_unpickling__ = True
def __reduce__(self): return (wx.Size, self.Get())
_core_.Size_swigregister(Size)
#---------------------------------------------------------------------------
class RealPoint(object):
"""
A data structure for representing a point or position with floating
point x and y properties. In wxPython most places that expect a
wx.RealPoint can also accept a (x,y) tuple.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
def __init__(self, *args, **kwargs):
"""
__init__(self, double x=0.0, double y=0.0) -> RealPoint
Create a wx.RealPoint object
"""
_core_.RealPoint_swiginit(self,_core_.new_RealPoint(*args, **kwargs))
__swig_destroy__ = _core_.delete_RealPoint
__del__ = lambda self : None;
def __eq__(*args, **kwargs):
"""
__eq__(self, PyObject other) -> bool
Test for equality of wx.RealPoint objects.
"""
return _core_.RealPoint___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""
__ne__(self, PyObject other) -> bool
Test for inequality of wx.RealPoint objects.
"""
return _core_.RealPoint___ne__(*args, **kwargs)
def __add__(*args, **kwargs):
"""
__add__(self, RealPoint pt) -> RealPoint
Add pt's proprties to this and return the result.
"""
return _core_.RealPoint___add__(*args, **kwargs)
def __sub__(*args, **kwargs):
"""
__sub__(self, RealPoint pt) -> RealPoint
Subtract pt's proprties from this and return the result
"""
return _core_.RealPoint___sub__(*args, **kwargs)
def Set(*args, **kwargs):
"""
Set(self, double x, double y)
Set both the x and y properties
"""
return _core_.RealPoint_Set(*args, **kwargs)
def Get(*args, **kwargs):
"""
Get() -> (x,y)
Return the x and y properties as a tuple.
"""
return _core_.RealPoint_Get(*args, **kwargs)
asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.RealPoint'+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
else: raise IndexError
def __nonzero__(self): return self.Get() != (0.0, 0.0)
__safe_for_unpickling__ = True
def __reduce__(self): return (wx.RealPoint, self.Get())
_core_.RealPoint_swigregister(RealPoint)
#---------------------------------------------------------------------------
class Point(object):
"""
A data structure for representing a point or position with integer x
and y properties. Most places in wxPython that expect a wx.Point can
also accept a (x,y) tuple.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
x = property(_core_.Point_x_get, _core_.Point_x_set)
y = property(_core_.Point_y_get, _core_.Point_y_set)
def __init__(self, *args, **kwargs):
"""
__init__(self, int x=0, int y=0) -> Point
Create a wx.Point object
"""
_core_.Point_swiginit(self,_core_.new_Point(*args, **kwargs))
__swig_destroy__ = _core_.delete_Point
__del__ = lambda self : None;
def __eq__(*args, **kwargs):
"""
__eq__(self, PyObject other) -> bool
Test for equality of wx.Point objects.
"""
return _core_.Point___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
"""
__ne__(self, PyObject other) -> bool
Test for inequality of wx.Point objects.
"""
return _core_.Point___ne__(*args, **kwargs)
def __add__(*args, **kwargs):
"""
__add__(self, Point pt) -> Point
Add pt's proprties to this and return the result.
"""
return _core_.Point___add__(*args, **kwargs)
def __sub__(*args, **kwargs):
"""
__sub__(self, Point pt) -> Point
Subtract pt's proprties from this and return the result
"""
return _core_.Point___sub__(*args, **kwargs)
def __iadd__(*args, **kwargs):
"""
__iadd__(self, Point pt) -> Point
Add pt to this object.
"""
return _core_.Point___iadd__(*args, **kwargs)
def __isub__(*args, **kwargs):
"""
__isub__(self, Point pt) -> Point
Subtract pt from this object.
"""
return _core_.Point___isub__(*args, **kwargs)
def Set(*args, **kwargs):
"""
Set(self, long x, long y)
Set both the x and y properties
"""
return _core_.Point_Set(*args, **kwargs)
def Get(*args, **kwargs):
"""
Get() -> (x,y)
Return the x and y properties as a tuple.
"""
return _core_.Point_Get(*args, **kwargs)
asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
def __str__(self): return str(self.Get())
def __repr__(self): return 'wx.Point'+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
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
__safe_for_unpickling__ = True
def __reduce__(self): return (wx.Point, self.Get())
_core_.Point_swigregister(Point)
#---------------------------------------------------------------------------
class Rect(object):
"""
A class for representing and manipulating rectangles. It has x, y,
width and height properties. In wxPython most palces that expect a
wx.Rect can also accept a (x,y,width,height) tuple.
"""
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, int x=0, int y=0, int width=0, int height=0) -> Rect
Create a new Rect object.
"""
_core_.Rect_swiginit(self,_core_.new_Rect(*args, **kwargs))
__swig_destroy__ = _core_.delete_Rect
__del__ = lambda self : None;
def GetX(*args, **kwargs):
"""GetX(self) -> int"""
return _core_.Rect_GetX(*args, **kwargs)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -