STATIC_BORDER = _core.STATIC_BORDER
TRANSPARENT_WINDOW = _core.TRANSPARENT_WINDOW
NO_BORDER = _core.NO_BORDER
-USER_COLOURS = _core.USER_COLOURS
-NO_3D = _core.NO_3D
TAB_TRAVERSAL = _core.TAB_TRAVERSAL
WANTS_CHARS = _core.WANTS_CHARS
POPUP_WINDOW = _core.POPUP_WINDOW
CENTER_FRAME = _core.CENTER_FRAME
CENTRE_ON_SCREEN = _core.CENTRE_ON_SCREEN
CENTER_ON_SCREEN = _core.CENTER_ON_SCREEN
-STAY_ON_TOP = _core.STAY_ON_TOP
-ICONIZE = _core.ICONIZE
-MINIMIZE = _core.MINIMIZE
-MAXIMIZE = _core.MAXIMIZE
-CLOSE_BOX = _core.CLOSE_BOX
-THICK_FRAME = _core.THICK_FRAME
-SYSTEM_MENU = _core.SYSTEM_MENU
-MINIMIZE_BOX = _core.MINIMIZE_BOX
-MAXIMIZE_BOX = _core.MAXIMIZE_BOX
-TINY_CAPTION_HORIZ = _core.TINY_CAPTION_HORIZ
-TINY_CAPTION_VERT = _core.TINY_CAPTION_VERT
-RESIZE_BOX = _core.RESIZE_BOX
-RESIZE_BORDER = _core.RESIZE_BORDER
-DIALOG_MODAL = _core.DIALOG_MODAL
-DIALOG_MODELESS = _core.DIALOG_MODELESS
-DIALOG_NO_PARENT = _core.DIALOG_NO_PARENT
-DEFAULT_FRAME_STYLE = _core.DEFAULT_FRAME_STYLE
-DEFAULT_DIALOG_STYLE = _core.DEFAULT_DIALOG_STYLE
-FRAME_TOOL_WINDOW = _core.FRAME_TOOL_WINDOW
-FRAME_FLOAT_ON_PARENT = _core.FRAME_FLOAT_ON_PARENT
-FRAME_NO_WINDOW_MENU = _core.FRAME_NO_WINDOW_MENU
-FRAME_NO_TASKBAR = _core.FRAME_NO_TASKBAR
-FRAME_SHAPED = _core.FRAME_SHAPED
ED_CLIENT_MARGIN = _core.ED_CLIENT_MARGIN
ED_BUTTONS_BOTTOM = _core.ED_BUTTONS_BOTTOM
ED_BUTTONS_RIGHT = _core.ED_BUTTONS_RIGHT
MENU_TEAROFF = _core.MENU_TEAROFF
MB_DOCKABLE = _core.MB_DOCKABLE
NO_FULL_REPAINT_ON_RESIZE = _core.NO_FULL_REPAINT_ON_RESIZE
+FULL_REPAINT_ON_RESIZE = _core.FULL_REPAINT_ON_RESIZE
LI_HORIZONTAL = _core.LI_HORIZONTAL
LI_VERTICAL = _core.LI_VERTICAL
WS_EX_VALIDATE_RECURSIVELY = _core.WS_EX_VALIDATE_RECURSIVELY
GROW = _core.GROW
EXPAND = _core.EXPAND
SHAPED = _core.SHAPED
-ADJUST_MINSIZE = _core.ADJUST_MINSIZE
+FIXED_MINSIZE = _core.FIXED_MINSIZE
TILE = _core.TILE
+ADJUST_MINSIZE = _core.ADJUST_MINSIZE
BORDER_DEFAULT = _core.BORDER_DEFAULT
BORDER_NONE = _core.BORDER_NONE
BORDER_STATIC = _core.BORDER_STATIC
#---------------------------------------------------------------------------
class Object(object):
- """The base class for most wx objects, although in wxPython not
-much functionality is needed nor exposed."""
+ """
+ The base class for most wx objects, although in wxPython not
+ much functionality is needed nor exposed.
+ """
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def GetClassName(*args, **kwargs):
- """GetClassName() -> wxString
+ """
+ GetClassName() -> String
-Returns the class name of the C++ object using wxRTTI."""
+ Returns the class name of the C++ object using wxRTTI.
+ """
return _core.Object_GetClassName(*args, **kwargs)
def Destroy(*args, **kwargs):
- """Destroy()
+ """
+ Destroy()
-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)
_core.Object_swigregister(ObjectPtr)
_wxPySetDictionary = _core._wxPySetDictionary
+_wxPyFixStockObjects = _core._wxPyFixStockObjects
+
+cvar = _core.cvar
+EmptyString = cvar.EmptyString
#---------------------------------------------------------------------------
BITMAP_TYPE_INVALID = _core.BITMAP_TYPE_INVALID
BITMAP_TYPE_BMP = _core.BITMAP_TYPE_BMP
-BITMAP_TYPE_BMP_RESOURCE = _core.BITMAP_TYPE_BMP_RESOURCE
-BITMAP_TYPE_RESOURCE = _core.BITMAP_TYPE_RESOURCE
BITMAP_TYPE_ICO = _core.BITMAP_TYPE_ICO
-BITMAP_TYPE_ICO_RESOURCE = _core.BITMAP_TYPE_ICO_RESOURCE
BITMAP_TYPE_CUR = _core.BITMAP_TYPE_CUR
-BITMAP_TYPE_CUR_RESOURCE = _core.BITMAP_TYPE_CUR_RESOURCE
BITMAP_TYPE_XBM = _core.BITMAP_TYPE_XBM
BITMAP_TYPE_XBM_DATA = _core.BITMAP_TYPE_XBM_DATA
BITMAP_TYPE_XPM = _core.BITMAP_TYPE_XPM
BITMAP_TYPE_XPM_DATA = _core.BITMAP_TYPE_XPM_DATA
BITMAP_TYPE_TIF = _core.BITMAP_TYPE_TIF
-BITMAP_TYPE_TIF_RESOURCE = _core.BITMAP_TYPE_TIF_RESOURCE
BITMAP_TYPE_GIF = _core.BITMAP_TYPE_GIF
-BITMAP_TYPE_GIF_RESOURCE = _core.BITMAP_TYPE_GIF_RESOURCE
BITMAP_TYPE_PNG = _core.BITMAP_TYPE_PNG
-BITMAP_TYPE_PNG_RESOURCE = _core.BITMAP_TYPE_PNG_RESOURCE
BITMAP_TYPE_JPEG = _core.BITMAP_TYPE_JPEG
-BITMAP_TYPE_JPEG_RESOURCE = _core.BITMAP_TYPE_JPEG_RESOURCE
BITMAP_TYPE_PNM = _core.BITMAP_TYPE_PNM
-BITMAP_TYPE_PNM_RESOURCE = _core.BITMAP_TYPE_PNM_RESOURCE
BITMAP_TYPE_PCX = _core.BITMAP_TYPE_PCX
-BITMAP_TYPE_PCX_RESOURCE = _core.BITMAP_TYPE_PCX_RESOURCE
BITMAP_TYPE_PICT = _core.BITMAP_TYPE_PICT
-BITMAP_TYPE_PICT_RESOURCE = _core.BITMAP_TYPE_PICT_RESOURCE
BITMAP_TYPE_ICON = _core.BITMAP_TYPE_ICON
-BITMAP_TYPE_ICON_RESOURCE = _core.BITMAP_TYPE_ICON_RESOURCE
BITMAP_TYPE_ANI = _core.BITMAP_TYPE_ANI
BITMAP_TYPE_IFF = _core.BITMAP_TYPE_IFF
BITMAP_TYPE_MACCURSOR = _core.BITMAP_TYPE_MACCURSOR
-BITMAP_TYPE_MACCURSOR_RESOURCE = _core.BITMAP_TYPE_MACCURSOR_RESOURCE
BITMAP_TYPE_ANY = _core.BITMAP_TYPE_ANY
CURSOR_NONE = _core.CURSOR_NONE
CURSOR_ARROW = _core.CURSOR_ARROW
#---------------------------------------------------------------------------
class Size(object):
- """wx.Size is a useful data structure used to represent the size of something.
-It simply contians integer width and height proprtites. In most places in
-wxPython where a wx.Size is expected a (width,height) tuple can be used
-instead."""
+ """
+ wx.Size is a useful data structure used to represent the size of something.
+ It simply contians integer width and height proprtites. In most places in
+ wxPython where a wx.Size is expected a (width,height) tuple can be used
+ instead.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
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__(int w=0, int h=0) -> Size
+ """
+ __init__(int w=0, int h=0) -> Size
-Creates a size object."""
+ Creates a size object.
+ """
newobj = _core.new_Size(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def __eq__(*args, **kwargs):
- """__eq__(Size sz) -> bool
+ """
+ __eq__(Size sz) -> bool
-Test for equality of wx.Size objects."""
+ Test for equality of wx.Size objects.
+ """
return _core.Size___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
- """__ne__(Size sz) -> bool
+ """
+ __ne__(Size sz) -> bool
-Test for inequality."""
+ Test for inequality.
+ """
return _core.Size___ne__(*args, **kwargs)
def __add__(*args, **kwargs):
- """__add__(Size sz) -> Size
+ """
+ __add__(Size sz) -> Size
-Add sz's proprties to this and return the result."""
+ Add sz's proprties to this and return the result.
+ """
return _core.Size___add__(*args, **kwargs)
def __sub__(*args, **kwargs):
- """__sub__(Size sz) -> Size
+ """
+ __sub__(Size sz) -> Size
-Subtract sz's properties from this and return the result."""
+ Subtract sz's properties from this and return the result.
+ """
return _core.Size___sub__(*args, **kwargs)
def IncTo(*args, **kwargs):
- """IncTo(Size sz)
+ """
+ IncTo(Size sz)
-Increments this object so that both of its dimensions are not less
-than the corresponding dimensions of the size."""
+ 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(Size sz)
+ """
+ DecTo(Size sz)
-Decrements this object so that both of its dimensions are not greater
-than the corresponding dimensions of the size."""
+ 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(int w, int h)
+ """
+ Set(int w, int h)
-Set both width and height."""
+ Set both width and height.
+ """
return _core.Size_Set(*args, **kwargs)
def SetWidth(*args, **kwargs):
"""GetHeight() -> int"""
return _core.Size_GetHeight(*args, **kwargs)
+ def IsFullySpecified(*args, **kwargs):
+ """
+ IsFullySpecified() -> bool
+
+ Returns True if both components of the size are non-default values.
+ """
+ return _core.Size_IsFullySpecified(*args, **kwargs)
+
+ def SetDefaults(*args, **kwargs):
+ """
+ SetDefaults(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)
+ """
+ Get() -> (width,height)
-Returns the width and height properties as a tuple."""
+ Returns the width and height properties as a tuple.
+ """
return _core.Size_Get(*args, **kwargs)
asTuple = Get
elif index == 1: self.height = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Size, self.Get())
class SizePtr(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."""
+ """
+ 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.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
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__(double x=0.0, double y=0.0) -> RealPoint
+ """
+ __init__(double x=0.0, double y=0.0) -> RealPoint
-Create a wx.RealPoint object"""
+ Create a wx.RealPoint object
+ """
newobj = _core.new_RealPoint(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def __eq__(*args, **kwargs):
- """__eq__(RealPoint pt) -> bool
+ """
+ __eq__(RealPoint pt) -> bool
-Test for equality of wx.RealPoint objects."""
+ Test for equality of wx.RealPoint objects.
+ """
return _core.RealPoint___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
- """__ne__(RealPoint pt) -> bool
+ """
+ __ne__(RealPoint pt) -> bool
-Test for inequality of wx.RealPoint objects."""
+ Test for inequality of wx.RealPoint objects.
+ """
return _core.RealPoint___ne__(*args, **kwargs)
def __add__(*args, **kwargs):
- """__add__(RealPoint pt) -> RealPoint
+ """
+ __add__(RealPoint pt) -> RealPoint
-Add pt's proprties to this and return the result."""
+ Add pt's proprties to this and return the result.
+ """
return _core.RealPoint___add__(*args, **kwargs)
def __sub__(*args, **kwargs):
- """__sub__(RealPoint pt) -> RealPoint
+ """
+ __sub__(RealPoint pt) -> RealPoint
-Subtract pt's proprties from this and return the result"""
+ Subtract pt's proprties from this and return the result
+ """
return _core.RealPoint___sub__(*args, **kwargs)
def Set(*args, **kwargs):
- """Set(double x, double y)
+ """
+ Set(double x, double y)
-Set both the x and y properties"""
+ Set both the x and y properties
+ """
return _core.RealPoint_Set(*args, **kwargs)
def Get(*args, **kwargs):
- """Get() -> (x,y)
+ """
+ Get() -> (x,y)
-Return the x and y properties as a tuple. """
+ Return the x and y properties as a tuple.
+ """
return _core.RealPoint_Get(*args, **kwargs)
asTuple = Get
elif index == 1: self.y = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0.0, 0.0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.RealPoint, self.Get())
class RealPointPtr(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."""
+ """
+ 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.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
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__(int x=0, int y=0) -> Point
+ """
+ __init__(int x=0, int y=0) -> Point
-Create a wx.Point object"""
+ Create a wx.Point object
+ """
newobj = _core.new_Point(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def __eq__(*args, **kwargs):
- """__eq__(Point pt) -> bool
+ """
+ __eq__(Point pt) -> bool
-Test for equality of wx.Point objects."""
+ Test for equality of wx.Point objects.
+ """
return _core.Point___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
- """__ne__(Point pt) -> bool
+ """
+ __ne__(Point pt) -> bool
-Test for inequality of wx.Point objects."""
+ Test for inequality of wx.Point objects.
+ """
return _core.Point___ne__(*args, **kwargs)
def __add__(*args, **kwargs):
- """__add__(Point pt) -> Point
+ """
+ __add__(Point pt) -> Point
-Add pt's proprties to this and return the result."""
+ Add pt's proprties to this and return the result.
+ """
return _core.Point___add__(*args, **kwargs)
def __sub__(*args, **kwargs):
- """__sub__(Point pt) -> Point
+ """
+ __sub__(Point pt) -> Point
-Subtract pt's proprties from this and return the result"""
+ Subtract pt's proprties from this and return the result
+ """
return _core.Point___sub__(*args, **kwargs)
def __iadd__(*args, **kwargs):
- """__iadd__(Point pt) -> Point
+ """
+ __iadd__(Point pt) -> Point
-Add pt to this object."""
+ Add pt to this object.
+ """
return _core.Point___iadd__(*args, **kwargs)
def __isub__(*args, **kwargs):
- """__isub__(Point pt) -> Point
+ """
+ __isub__(Point pt) -> Point
-Subtract pt from this object."""
+ Subtract pt from this object.
+ """
return _core.Point___isub__(*args, **kwargs)
def Set(*args, **kwargs):
- """Set(long x, long y)
+ """
+ Set(long x, long y)
-Set both the x and y properties"""
+ Set both the x and y properties
+ """
return _core.Point_Set(*args, **kwargs)
def Get(*args, **kwargs):
- """Get() -> (x,y)
+ """
+ Get() -> (x,y)
-Return the x and y properties as a tuple. """
+ Return the x and y properties as a tuple.
+ """
return _core.Point_Get(*args, **kwargs)
asTuple = Get
elif index == 1: self.y = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Point, self.Get())
class PointPtr(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."""
+ """
+ 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.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(int x=0, int y=0, int width=0, int height=0) -> Rect
+ """
+ __init__(int x=0, int y=0, int width=0, int height=0) -> Rect
-Create a new Rect object."""
+ Create a new Rect object.
+ """
newobj = _core.new_Rect(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
"""SetSize(Size s)"""
return _core.Rect_SetSize(*args, **kwargs)
+ def GetTopLeft(*args, **kwargs):
+ """GetTopLeft() -> Point"""
+ return _core.Rect_GetTopLeft(*args, **kwargs)
+
+ def SetTopLeft(*args, **kwargs):
+ """SetTopLeft(Point p)"""
+ return _core.Rect_SetTopLeft(*args, **kwargs)
+
+ def GetBottomRight(*args, **kwargs):
+ """GetBottomRight() -> Point"""
+ return _core.Rect_GetBottomRight(*args, **kwargs)
+
+ def SetBottomRight(*args, **kwargs):
+ """SetBottomRight(Point p)"""
+ return _core.Rect_SetBottomRight(*args, **kwargs)
+
def GetLeft(*args, **kwargs):
"""GetLeft() -> int"""
return _core.Rect_GetLeft(*args, **kwargs)
bottom = property(GetBottom, SetBottom)
def Inflate(*args, **kwargs):
- """Inflate(int dx, int dy) -> Rect
+ """
+ Inflate(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."""
+ 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.
+ """
return _core.Rect_Inflate(*args, **kwargs)
def Deflate(*args, **kwargs):
- """Deflate(int dx, int dy) -> Rect
+ """
+ Deflate(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 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.
+ """
return _core.Rect_Deflate(*args, **kwargs)
def OffsetXY(*args, **kwargs):
- """OffsetXY(int dx, int dy)
+ """
+ OffsetXY(int dx, int dy)
-Moves the rectangle by the specified offset. If dx is positive, the rectangle
-is moved to the right, if dy is positive, it is moved to the bottom, otherwise
-it is moved to the left or top respectively."""
+ Moves the rectangle by the specified offset. If dx is positive, the rectangle
+ is moved to the right, if dy is positive, it is moved to the bottom, otherwise
+ it is moved to the left or top respectively.
+ """
return _core.Rect_OffsetXY(*args, **kwargs)
def Offset(*args, **kwargs):
- """Offset(Point pt)
+ """
+ Offset(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)
def Intersect(*args, **kwargs):
- """Intersect(Rect rect) -> Rect
+ """
+ Intersect(Rect rect) -> Rect
-Return the intersectsion of this rectangle and rect."""
+ Return the intersectsion of this rectangle and rect.
+ """
return _core.Rect_Intersect(*args, **kwargs)
def __add__(*args, **kwargs):
- """__add__(Rect rect) -> Rect
+ """
+ __add__(Rect rect) -> Rect
-Add the properties of rect to this rectangle and return the result."""
+ Add the properties of rect to this rectangle and return the result.
+ """
return _core.Rect___add__(*args, **kwargs)
def __iadd__(*args, **kwargs):
- """__iadd__(Rect rect) -> Rect
+ """
+ __iadd__(Rect rect) -> Rect
-Add the properties of rect to this rectangle, updating this rectangle."""
+ Add the properties of rect to this rectangle, updating this rectangle.
+ """
return _core.Rect___iadd__(*args, **kwargs)
def __eq__(*args, **kwargs):
- """__eq__(Rect rect) -> bool
+ """
+ __eq__(Rect rect) -> bool
-Test for equality."""
+ Test for equality.
+ """
return _core.Rect___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
- """__ne__(Rect rect) -> bool
+ """
+ __ne__(Rect rect) -> bool
-Test for inequality."""
+ Test for inequality.
+ """
return _core.Rect___ne__(*args, **kwargs)
def InsideXY(*args, **kwargs):
- """InsideXY(int x, int y) -> bool
+ """
+ InsideXY(int x, int y) -> bool
-Return True if the point is (not strcitly) inside the rect."""
+ Return True if the point is (not strcitly) inside the rect.
+ """
return _core.Rect_InsideXY(*args, **kwargs)
def Inside(*args, **kwargs):
- """Inside(Point pt) -> bool
+ """
+ Inside(Point pt) -> bool
-Return True if the point is (not strcitly) inside the rect."""
+ Return True if the point is (not strcitly) inside the rect.
+ """
return _core.Rect_Inside(*args, **kwargs)
def Intersects(*args, **kwargs):
- """Intersects(Rect rect) -> bool
+ """
+ Intersects(Rect rect) -> bool
-Returns True if the rectangles have a non empty intersection."""
+ Returns True if the rectangles have a non empty intersection.
+ """
return _core.Rect_Intersects(*args, **kwargs)
x = property(_core.Rect_x_get, _core.Rect_x_set)
width = property(_core.Rect_width_get, _core.Rect_width_set)
height = property(_core.Rect_height_get, _core.Rect_height_set)
def Set(*args, **kwargs):
- """Set(int x=0, int y=0, int width=0, int height=0)
+ """
+ Set(int x=0, int y=0, int width=0, int height=0)
-Set all rectangle properties."""
+ Set all rectangle properties.
+ """
return _core.Rect_Set(*args, **kwargs)
def Get(*args, **kwargs):
- """Get() -> (x,y,width,height)
+ """
+ Get() -> (x,y,width,height)
-Return the rectangle properties as a tuple."""
+ Return the rectangle properties as a tuple.
+ """
return _core.Rect_Get(*args, **kwargs)
asTuple = Get
elif index == 3: self.height = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0,0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Rect, self.Get())
class RectPtr(Rect):
_core.Rect_swigregister(RectPtr)
def RectPP(*args, **kwargs):
- """RectPP(Point topLeft, Point bottomRight) -> Rect
+ """
+ RectPP(Point topLeft, Point bottomRight) -> Rect
-Create a new Rect object from Points representing two corners."""
+ Create a new Rect object from Points representing two corners.
+ """
val = _core.new_RectPP(*args, **kwargs)
val.thisown = 1
return val
def RectPS(*args, **kwargs):
- """RectPS(Point pos, Size size) -> Rect
+ """
+ RectPS(Point pos, Size size) -> Rect
-Create a new Rect from a position and size."""
+ Create a new Rect from a position and size.
+ """
val = _core.new_RectPS(*args, **kwargs)
val.thisown = 1
return val
def IntersectRect(*args, **kwargs):
- """IntersectRect(Rect r1, Rect r2) -> Rect
+ """
+ IntersectRect(Rect r1, Rect r2) -> Rect
-Calculate and return the intersection of r1 and r2."""
+ Calculate and return the intersection of r1 and r2.
+ """
return _core.IntersectRect(*args, **kwargs)
#---------------------------------------------------------------------------
def __repr__(self):
return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(double x=0.0, double y=0.0) -> Point2D
+ """
+ __init__(double x=0.0, double y=0.0) -> Point2D
-Create a w.Point2D object."""
+ Create a w.Point2D object.
+ """
newobj = _core.new_Point2D(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def GetFloor(*args, **kwargs):
- """GetFloor() -> (x,y)
+ """
+ GetFloor() -> (x,y)
-Convert to integer"""
+ Convert to integer
+ """
return _core.Point2D_GetFloor(*args, **kwargs)
def GetRounded(*args, **kwargs):
- """GetRounded() -> (x,y)
+ """
+ GetRounded() -> (x,y)
-Convert to integer"""
+ Convert to integer
+ """
return _core.Point2D_GetRounded(*args, **kwargs)
def GetVectorLength(*args, **kwargs):
return _core.Point2D_GetCrossProduct(*args, **kwargs)
def __neg__(*args, **kwargs):
- """__neg__() -> Point2D
+ """
+ __neg__() -> Point2D
-the reflection of this point"""
+ the reflection of this point
+ """
return _core.Point2D___neg__(*args, **kwargs)
def __iadd__(*args, **kwargs):
return _core.Point2D___idiv__(*args, **kwargs)
def __eq__(*args, **kwargs):
- """__eq__(Point2D pt) -> bool
+ """
+ __eq__(Point2D pt) -> bool
-Test for equality"""
+ Test for equality
+ """
return _core.Point2D___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
- """__ne__(Point2D pt) -> bool
+ """
+ __ne__(Point2D pt) -> bool
-Test for inequality"""
+ Test for inequality
+ """
return _core.Point2D___ne__(*args, **kwargs)
x = property(_core.Point2D_x_get, _core.Point2D_x_set)
return _core.Point2D_Set(*args, **kwargs)
def Get(*args, **kwargs):
- """Get() -> (x,y)
+ """
+ Get() -> (x,y)
-Return x and y properties as a tuple."""
+ Return x and y properties as a tuple.
+ """
return _core.Point2D_Get(*args, **kwargs)
asTuple = Get
elif index == 1: self.y = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0.0, 0.0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
-
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Point2D, self.Get())
class Point2DPtr(Point2D):
_core.Point2D_swigregister(Point2DPtr)
def Point2DCopy(*args, **kwargs):
- """Point2DCopy(Point2D pt) -> Point2D
+ """
+ Point2DCopy(Point2D pt) -> Point2D
-Create a w.Point2D object."""
+ Create a w.Point2D object.
+ """
val = _core.new_Point2DCopy(*args, **kwargs)
val.thisown = 1
return val
def Point2DFromPoint(*args, **kwargs):
- """Point2DFromPoint(Point pt) -> Point2D
+ """
+ Point2DFromPoint(Point pt) -> Point2D
-Create a w.Point2D object."""
+ Create a w.Point2D object.
+ """
val = _core.new_Point2DFromPoint(*args, **kwargs)
val.thisown = 1
return val
FromCurrent = _core.FromCurrent
FromEnd = _core.FromEnd
class InputStream(object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.InputStream_Ungetch(*args, **kwargs)
def SeekI(*args, **kwargs):
- """SeekI(long pos, wxSeekMode mode=FromStart) -> long"""
+ """SeekI(long pos, int mode=FromStart) -> long"""
return _core.InputStream_SeekI(*args, **kwargs)
def TellI(*args, **kwargs):
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = InputStream
_core.InputStream_swigregister(InputStreamPtr)
-cvar = _core.cvar
DefaultPosition = cvar.DefaultPosition
DefaultSize = cvar.DefaultSize
class OutputStream(object):
- """"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
#---------------------------------------------------------------------------
class FSFile(Object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(wxInputStream stream, wxString loc, wxString mimetype,
- wxString anchor, wxDateTime modif) -> FSFile"""
+ """
+ __init__(InputStream stream, String loc, String mimetype, String anchor,
+ DateTime modif) -> FSFile
+ """
newobj = _core.new_FSFile(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
except: pass
def GetStream(*args, **kwargs):
- """GetStream() -> wxInputStream"""
+ """GetStream() -> InputStream"""
return _core.FSFile_GetStream(*args, **kwargs)
def GetMimeType(*args, **kwargs):
- """GetMimeType() -> wxString"""
+ """GetMimeType() -> String"""
return _core.FSFile_GetMimeType(*args, **kwargs)
def GetLocation(*args, **kwargs):
- """GetLocation() -> wxString"""
+ """GetLocation() -> String"""
return _core.FSFile_GetLocation(*args, **kwargs)
def GetAnchor(*args, **kwargs):
- """GetAnchor() -> wxString"""
+ """GetAnchor() -> String"""
return _core.FSFile_GetAnchor(*args, **kwargs)
def GetModificationTime(*args, **kwargs):
- """GetModificationTime() -> wxDateTime"""
+ """GetModificationTime() -> DateTime"""
return _core.FSFile_GetModificationTime(*args, **kwargs)
_core.FSFile_swigregister(FSFilePtr)
class CPPFileSystemHandler(object):
- """"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
_core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
class FileSystemHandler(CPPFileSystemHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.FileSystemHandler__setCallbackInfo(*args, **kwargs)
def CanOpen(*args, **kwargs):
- """CanOpen(wxString location) -> bool"""
+ """CanOpen(String location) -> bool"""
return _core.FileSystemHandler_CanOpen(*args, **kwargs)
def OpenFile(*args, **kwargs):
- """OpenFile(FileSystem fs, wxString location) -> FSFile"""
+ """OpenFile(FileSystem fs, String location) -> FSFile"""
return _core.FileSystemHandler_OpenFile(*args, **kwargs)
def FindFirst(*args, **kwargs):
- """FindFirst(wxString spec, int flags=0) -> wxString"""
+ """FindFirst(String spec, int flags=0) -> String"""
return _core.FileSystemHandler_FindFirst(*args, **kwargs)
def FindNext(*args, **kwargs):
- """FindNext() -> wxString"""
+ """FindNext() -> String"""
return _core.FileSystemHandler_FindNext(*args, **kwargs)
def GetProtocol(*args, **kwargs):
- """GetProtocol(wxString location) -> wxString"""
+ """GetProtocol(String location) -> String"""
return _core.FileSystemHandler_GetProtocol(*args, **kwargs)
def GetLeftLocation(*args, **kwargs):
- """GetLeftLocation(wxString location) -> wxString"""
+ """GetLeftLocation(String location) -> String"""
return _core.FileSystemHandler_GetLeftLocation(*args, **kwargs)
def GetAnchor(*args, **kwargs):
- """GetAnchor(wxString location) -> wxString"""
+ """GetAnchor(String location) -> String"""
return _core.FileSystemHandler_GetAnchor(*args, **kwargs)
def GetRightLocation(*args, **kwargs):
- """GetRightLocation(wxString location) -> wxString"""
+ """GetRightLocation(String location) -> String"""
return _core.FileSystemHandler_GetRightLocation(*args, **kwargs)
def GetMimeTypeFromExt(*args, **kwargs):
- """GetMimeTypeFromExt(wxString location) -> wxString"""
+ """GetMimeTypeFromExt(String location) -> String"""
return _core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
_core.FileSystemHandler_swigregister(FileSystemHandlerPtr)
class FileSystem(Object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
except: pass
def ChangePathTo(*args, **kwargs):
- """ChangePathTo(wxString location, bool is_dir=False)"""
+ """ChangePathTo(String location, bool is_dir=False)"""
return _core.FileSystem_ChangePathTo(*args, **kwargs)
def GetPath(*args, **kwargs):
- """GetPath() -> wxString"""
+ """GetPath() -> String"""
return _core.FileSystem_GetPath(*args, **kwargs)
def OpenFile(*args, **kwargs):
- """OpenFile(wxString location) -> FSFile"""
+ """OpenFile(String location) -> FSFile"""
return _core.FileSystem_OpenFile(*args, **kwargs)
def FindFirst(*args, **kwargs):
- """FindFirst(wxString spec, int flags=0) -> wxString"""
+ """FindFirst(String spec, int flags=0) -> String"""
return _core.FileSystem_FindFirst(*args, **kwargs)
def FindNext(*args, **kwargs):
- """FindNext() -> wxString"""
+ """FindNext() -> String"""
return _core.FileSystem_FindNext(*args, **kwargs)
def AddHandler(*args, **kwargs):
- """FileSystem.AddHandler(CPPFileSystemHandler handler)"""
+ """AddHandler(CPPFileSystemHandler handler)"""
return _core.FileSystem_AddHandler(*args, **kwargs)
AddHandler = staticmethod(AddHandler)
def CleanUpHandlers(*args, **kwargs):
- """FileSystem.CleanUpHandlers()"""
+ """CleanUpHandlers()"""
return _core.FileSystem_CleanUpHandlers(*args, **kwargs)
CleanUpHandlers = staticmethod(CleanUpHandlers)
def FileNameToURL(*args, **kwargs):
- """FileSystem.FileNameToURL(wxString filename) -> wxString"""
+ """FileNameToURL(String filename) -> String"""
return _core.FileSystem_FileNameToURL(*args, **kwargs)
FileNameToURL = staticmethod(FileNameToURL)
return _core.FileSystem_CleanUpHandlers(*args, **kwargs)
def FileSystem_FileNameToURL(*args, **kwargs):
- """FileSystem_FileNameToURL(wxString filename) -> wxString"""
+ """FileSystem_FileNameToURL(String filename) -> String"""
return _core.FileSystem_FileNameToURL(*args, **kwargs)
def FileSystem_URLToFileName(*args, **kwargs):
- """FileSystem_URLToFileName(wxString url) -> wxString"""
+ """FileSystem_URLToFileName(String url) -> String"""
return _core.FileSystem_URLToFileName(*args, **kwargs)
class InternetFSHandler(CPPFileSystemHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
self.thisown = 1
del newobj.thisown
def CanOpen(*args, **kwargs):
- """CanOpen(wxString location) -> bool"""
+ """CanOpen(String location) -> bool"""
return _core.InternetFSHandler_CanOpen(*args, **kwargs)
def OpenFile(*args, **kwargs):
- """OpenFile(FileSystem fs, wxString location) -> FSFile"""
+ """OpenFile(FileSystem fs, String location) -> FSFile"""
return _core.InternetFSHandler_OpenFile(*args, **kwargs)
_core.InternetFSHandler_swigregister(InternetFSHandlerPtr)
class ZipFSHandler(CPPFileSystemHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
self.thisown = 1
del newobj.thisown
def CanOpen(*args, **kwargs):
- """CanOpen(wxString location) -> bool"""
+ """CanOpen(String location) -> bool"""
return _core.ZipFSHandler_CanOpen(*args, **kwargs)
def OpenFile(*args, **kwargs):
- """OpenFile(FileSystem fs, wxString location) -> FSFile"""
+ """OpenFile(FileSystem fs, String location) -> FSFile"""
return _core.ZipFSHandler_OpenFile(*args, **kwargs)
def FindFirst(*args, **kwargs):
- """FindFirst(wxString spec, int flags=0) -> wxString"""
+ """FindFirst(String spec, int flags=0) -> String"""
return _core.ZipFSHandler_FindFirst(*args, **kwargs)
def FindNext(*args, **kwargs):
- """FindNext() -> wxString"""
+ """FindNext() -> String"""
return _core.ZipFSHandler_FindNext(*args, **kwargs)
def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
- """__wxMemoryFSHandler_AddFile_wxImage(wxString filename, Image image, long type)"""
+ """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
return _core.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
- """__wxMemoryFSHandler_AddFile_wxBitmap(wxString filename, wxBitmap bitmap, long type)"""
+ """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
return _core.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
- """__wxMemoryFSHandler_AddFile_Data(wxString filename, PyObject data)"""
+ """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
return _core.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
def MemoryFSHandler_AddFile(filename, a, b=''):
if isinstance(a, wx.Image):
else: raise TypeError, 'wx.Image, wx.Bitmap or string expected'
class MemoryFSHandler(CPPFileSystemHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
self.thisown = 1
del newobj.thisown
def RemoveFile(*args, **kwargs):
- """MemoryFSHandler.RemoveFile(wxString filename)"""
+ """RemoveFile(String filename)"""
return _core.MemoryFSHandler_RemoveFile(*args, **kwargs)
RemoveFile = staticmethod(RemoveFile)
AddFile = staticmethod(MemoryFSHandler_AddFile)
def CanOpen(*args, **kwargs):
- """CanOpen(wxString location) -> bool"""
+ """CanOpen(String location) -> bool"""
return _core.MemoryFSHandler_CanOpen(*args, **kwargs)
def OpenFile(*args, **kwargs):
- """OpenFile(FileSystem fs, wxString location) -> FSFile"""
+ """OpenFile(FileSystem fs, String location) -> FSFile"""
return _core.MemoryFSHandler_OpenFile(*args, **kwargs)
def FindFirst(*args, **kwargs):
- """FindFirst(wxString spec, int flags=0) -> wxString"""
+ """FindFirst(String spec, int flags=0) -> String"""
return _core.MemoryFSHandler_FindFirst(*args, **kwargs)
def FindNext(*args, **kwargs):
- """FindNext() -> wxString"""
+ """FindNext() -> String"""
return _core.MemoryFSHandler_FindNext(*args, **kwargs)
_core.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
def MemoryFSHandler_RemoveFile(*args, **kwargs):
- """MemoryFSHandler_RemoveFile(wxString filename)"""
+ """MemoryFSHandler_RemoveFile(String filename)"""
return _core.MemoryFSHandler_RemoveFile(*args, **kwargs)
#---------------------------------------------------------------------------
class ImageHandler(Object):
- """"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def GetName(*args, **kwargs):
- """GetName() -> wxString"""
+ """GetName() -> String"""
return _core.ImageHandler_GetName(*args, **kwargs)
def GetExtension(*args, **kwargs):
- """GetExtension() -> wxString"""
+ """GetExtension() -> String"""
return _core.ImageHandler_GetExtension(*args, **kwargs)
def GetType(*args, **kwargs):
return _core.ImageHandler_GetType(*args, **kwargs)
def GetMimeType(*args, **kwargs):
- """GetMimeType() -> wxString"""
+ """GetMimeType() -> String"""
return _core.ImageHandler_GetMimeType(*args, **kwargs)
def CanRead(*args, **kwargs):
- """CanRead(wxString name) -> bool"""
+ """CanRead(String name) -> bool"""
return _core.ImageHandler_CanRead(*args, **kwargs)
def SetName(*args, **kwargs):
- """SetName(wxString name)"""
+ """SetName(String name)"""
return _core.ImageHandler_SetName(*args, **kwargs)
def SetExtension(*args, **kwargs):
- """SetExtension(wxString extension)"""
+ """SetExtension(String extension)"""
return _core.ImageHandler_SetExtension(*args, **kwargs)
def SetType(*args, **kwargs):
return _core.ImageHandler_SetType(*args, **kwargs)
def SetMimeType(*args, **kwargs):
- """SetMimeType(wxString mimetype)"""
+ """SetMimeType(String mimetype)"""
return _core.ImageHandler_SetMimeType(*args, **kwargs)
_core.ImageHandler_swigregister(ImageHandlerPtr)
class ImageHistogram(object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
self.thisown = 1
del newobj.thisown
def MakeKey(*args, **kwargs):
- """ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
+ """
+ MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
-Get the key in the histogram for the given RGB values"""
+ Get the key in the histogram for the given RGB values
+ """
return _core.ImageHistogram_MakeKey(*args, **kwargs)
MakeKey = staticmethod(MakeKey)
def FindFirstUnusedColour(*args, **kwargs):
- """FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
+ """
+ FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
-Find first colour that is not used in the image and has higher RGB values than
-startR, startG, startB. Returns a tuple consisting of a success flag and rgb
-values."""
+ Find first colour that is not used in the image and has higher RGB values than
+ startR, startG, startB. Returns a tuple consisting of a success flag and rgb
+ values.
+ """
return _core.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
_core.ImageHistogram_swigregister(ImageHistogramPtr)
def ImageHistogram_MakeKey(*args, **kwargs):
- """ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
+ """
+ ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
-Get the key in the histogram for the given RGB values"""
+ Get the key in the histogram for the given RGB values
+ """
return _core.ImageHistogram_MakeKey(*args, **kwargs)
class Image(Object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(wxString name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
+ """__init__(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
newobj = _core.new_Image(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
return _core.Image_Create(*args, **kwargs)
def Destroy(*args, **kwargs):
- """Destroy()
+ """
+ Destroy()
-Deletes the C++ object this Python object is a proxy for."""
+ Deletes the C++ object this Python object is a proxy for.
+ """
return _core.Image_Destroy(*args, **kwargs)
def Scale(*args, **kwargs):
return _core.Image_HasAlpha(*args, **kwargs)
def FindFirstUnusedColour(*args, **kwargs):
- """FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
+ """
+ FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
-Find first colour that is not used in the image and has higher RGB values than
-startR, startG, startB. Returns a tuple consisting of a success flag and rgb
-values."""
+ Find first colour that is not used in the image and has higher RGB values than
+ startR, startG, startB. Returns a tuple consisting of a success flag and rgb
+ values.
+ """
return _core.Image_FindFirstUnusedColour(*args, **kwargs)
def SetMaskFromImage(*args, **kwargs):
return _core.Image_SetMaskFromImage(*args, **kwargs)
def CanRead(*args, **kwargs):
- """Image.CanRead(wxString name) -> bool"""
+ """CanRead(String name) -> bool"""
return _core.Image_CanRead(*args, **kwargs)
CanRead = staticmethod(CanRead)
def GetImageCount(*args, **kwargs):
- """Image.GetImageCount(wxString name, long type=BITMAP_TYPE_ANY) -> int"""
+ """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
return _core.Image_GetImageCount(*args, **kwargs)
GetImageCount = staticmethod(GetImageCount)
def LoadFile(*args, **kwargs):
- """LoadFile(wxString name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
+ """LoadFile(String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
return _core.Image_LoadFile(*args, **kwargs)
def LoadMimeFile(*args, **kwargs):
- """LoadMimeFile(wxString name, wxString mimetype, int index=-1) -> bool"""
+ """LoadMimeFile(String name, String mimetype, int index=-1) -> bool"""
return _core.Image_LoadMimeFile(*args, **kwargs)
def SaveFile(*args, **kwargs):
- """SaveFile(wxString name, int type) -> bool"""
+ """SaveFile(String name, int type) -> bool"""
return _core.Image_SaveFile(*args, **kwargs)
def SaveMimeFile(*args, **kwargs):
- """SaveMimeFile(wxString name, wxString mimetype) -> bool"""
+ """SaveMimeFile(String name, String mimetype) -> bool"""
return _core.Image_SaveMimeFile(*args, **kwargs)
def CanReadStream(*args, **kwargs):
- """Image.CanReadStream(wxInputStream stream) -> bool"""
+ """CanReadStream(InputStream stream) -> bool"""
return _core.Image_CanReadStream(*args, **kwargs)
CanReadStream = staticmethod(CanReadStream)
def LoadStream(*args, **kwargs):
- """LoadStream(wxInputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
+ """LoadStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
return _core.Image_LoadStream(*args, **kwargs)
def LoadMimeStream(*args, **kwargs):
- """LoadMimeStream(wxInputStream stream, wxString mimetype, int index=-1) -> bool"""
+ """LoadMimeStream(InputStream stream, String mimetype, int index=-1) -> bool"""
return _core.Image_LoadMimeStream(*args, **kwargs)
def Ok(*args, **kwargs):
"""GetHeight() -> int"""
return _core.Image_GetHeight(*args, **kwargs)
+ def GetSize(*args, **kwargs):
+ """GetSize() -> Size"""
+ return _core.Image_GetSize(*args, **kwargs)
+
def GetSubImage(*args, **kwargs):
"""GetSubImage(Rect rect) -> Image"""
return _core.Image_GetSubImage(*args, **kwargs)
return _core.Image_HasMask(*args, **kwargs)
def Rotate(*args, **kwargs):
- """Rotate(double angle, Point centre_of_rotation, bool interpolating=True,
- Point offset_after_rotation=None) -> Image"""
+ """
+ Rotate(double angle, Point centre_of_rotation, bool interpolating=True,
+ Point offset_after_rotation=None) -> Image
+ """
return _core.Image_Rotate(*args, **kwargs)
def Rotate90(*args, **kwargs):
return _core.Image_Mirror(*args, **kwargs)
def Replace(*args, **kwargs):
- """Replace(unsigned char r1, unsigned char g1, unsigned char b1,
- unsigned char r2, unsigned char g2, unsigned char b2)"""
+ """
+ Replace(unsigned char r1, unsigned char g1, unsigned char b1,
+ unsigned char r2, unsigned char g2, unsigned char b2)
+ """
return _core.Image_Replace(*args, **kwargs)
def ConvertToMono(*args, **kwargs):
return _core.Image_ConvertToMono(*args, **kwargs)
def SetOption(*args, **kwargs):
- """SetOption(wxString name, wxString value)"""
+ """SetOption(String name, String value)"""
return _core.Image_SetOption(*args, **kwargs)
def SetOptionInt(*args, **kwargs):
- """SetOptionInt(wxString name, int value)"""
+ """SetOptionInt(String name, int value)"""
return _core.Image_SetOptionInt(*args, **kwargs)
def GetOption(*args, **kwargs):
- """GetOption(wxString name) -> wxString"""
+ """GetOption(String name) -> String"""
return _core.Image_GetOption(*args, **kwargs)
def GetOptionInt(*args, **kwargs):
- """GetOptionInt(wxString name) -> int"""
+ """GetOptionInt(String name) -> int"""
return _core.Image_GetOptionInt(*args, **kwargs)
def HasOption(*args, **kwargs):
- """HasOption(wxString name) -> bool"""
+ """HasOption(String name) -> bool"""
return _core.Image_HasOption(*args, **kwargs)
def CountColours(*args, **kwargs):
return _core.Image_ComputeHistogram(*args, **kwargs)
def AddHandler(*args, **kwargs):
- """Image.AddHandler(ImageHandler handler)"""
+ """AddHandler(ImageHandler handler)"""
return _core.Image_AddHandler(*args, **kwargs)
AddHandler = staticmethod(AddHandler)
def InsertHandler(*args, **kwargs):
- """Image.InsertHandler(ImageHandler handler)"""
+ """InsertHandler(ImageHandler handler)"""
return _core.Image_InsertHandler(*args, **kwargs)
InsertHandler = staticmethod(InsertHandler)
def RemoveHandler(*args, **kwargs):
- """Image.RemoveHandler(wxString name) -> bool"""
+ """RemoveHandler(String name) -> bool"""
return _core.Image_RemoveHandler(*args, **kwargs)
RemoveHandler = staticmethod(RemoveHandler)
def GetImageExtWildcard(*args, **kwargs):
- """Image.GetImageExtWildcard() -> wxString"""
+ """GetImageExtWildcard() -> String"""
return _core.Image_GetImageExtWildcard(*args, **kwargs)
GetImageExtWildcard = staticmethod(GetImageExtWildcard)
def ConvertToBitmap(*args, **kwargs):
- """ConvertToBitmap() -> wxBitmap"""
+ """ConvertToBitmap() -> Bitmap"""
return _core.Image_ConvertToBitmap(*args, **kwargs)
def ConvertToMonoBitmap(*args, **kwargs):
- """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> wxBitmap"""
+ """ConvertToMonoBitmap(unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
return _core.Image_ConvertToMonoBitmap(*args, **kwargs)
def __nonzero__(self): return self.Ok()
_core.Image_swigregister(ImagePtr)
def ImageFromMime(*args, **kwargs):
- """ImageFromMime(wxString name, wxString mimetype, int index=-1) -> Image"""
+ """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
val = _core.new_ImageFromMime(*args, **kwargs)
val.thisown = 1
return val
def ImageFromStream(*args, **kwargs):
- """ImageFromStream(wxInputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
+ """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
val = _core.new_ImageFromStream(*args, **kwargs)
val.thisown = 1
return val
def ImageFromStreamMime(*args, **kwargs):
- """ImageFromStreamMime(wxInputStream stream, wxString mimetype, int index=-1) -> Image"""
+ """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
val = _core.new_ImageFromStreamMime(*args, **kwargs)
val.thisown = 1
return val
-def EmptyImage(*args, **kwargs):
- """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
- val = _core.new_EmptyImage(*args, **kwargs)
+def EmptyImage(*args):
+ """
+ EmptyImage(int width=0, int height=0, bool clear=True) -> Image
+ EmptyImage(Size size, bool clear=True) -> Image
+ """
+ val = _core.new_EmptyImage(*args)
val.thisown = 1
return val
def ImageFromBitmap(*args, **kwargs):
- """ImageFromBitmap(wxBitmap bitmap) -> Image"""
+ """ImageFromBitmap(Bitmap bitmap) -> Image"""
val = _core.new_ImageFromBitmap(*args, **kwargs)
val.thisown = 1
return val
return val
def Image_CanRead(*args, **kwargs):
- """Image_CanRead(wxString name) -> bool"""
+ """Image_CanRead(String name) -> bool"""
return _core.Image_CanRead(*args, **kwargs)
def Image_GetImageCount(*args, **kwargs):
- """Image_GetImageCount(wxString name, long type=BITMAP_TYPE_ANY) -> int"""
+ """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
return _core.Image_GetImageCount(*args, **kwargs)
def Image_CanReadStream(*args, **kwargs):
- """Image_CanReadStream(wxInputStream stream) -> bool"""
+ """Image_CanReadStream(InputStream stream) -> bool"""
return _core.Image_CanReadStream(*args, **kwargs)
def Image_AddHandler(*args, **kwargs):
return _core.Image_InsertHandler(*args, **kwargs)
def Image_RemoveHandler(*args, **kwargs):
- """Image_RemoveHandler(wxString name) -> bool"""
+ """Image_RemoveHandler(String name) -> bool"""
return _core.Image_RemoveHandler(*args, **kwargs)
def Image_GetImageExtWildcard(*args, **kwargs):
- """Image_GetImageExtWildcard() -> wxString"""
+ """Image_GetImageExtWildcard() -> String"""
return _core.Image_GetImageExtWildcard(*args, **kwargs)
BMP_1BPP = _core.BMP_1BPP
BMP_1BPP_BW = _core.BMP_1BPP_BW
class BMPHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
class ICOHandler(BMPHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.ICOHandler_swigregister(ICOHandlerPtr)
class CURHandler(ICOHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.CURHandler_swigregister(CURHandlerPtr)
class ANIHandler(CURHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.ANIHandler_swigregister(ANIHandlerPtr)
class PNGHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.PNGHandler_swigregister(PNGHandlerPtr)
class GIFHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.GIFHandler_swigregister(GIFHandlerPtr)
class PCXHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.PCXHandler_swigregister(PCXHandlerPtr)
class JPEGHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.JPEGHandler_swigregister(JPEGHandlerPtr)
class PNMHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.PNMHandler_swigregister(PNMHandlerPtr)
class XPMHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.XPMHandler_swigregister(XPMHandlerPtr)
class TIFFHandler(ImageHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class EvtHandler(Object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
-EVT_SPIN_UP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
-EVT_SPIN_DOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
-EVT_SPIN = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
-
EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
#---------------------------------------------------------------------------
class Event(Object):
- """"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
#---------------------------------------------------------------------------
class PropagationDisabler(object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.PropagationDisabler_swigregister(PropagationDisablerPtr)
class PropagateOnce(object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class CommandEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.CommandEvent_GetSelection(*args, **kwargs)
def SetString(*args, **kwargs):
- """SetString(wxString s)"""
+ """SetString(String s)"""
return _core.CommandEvent_SetString(*args, **kwargs)
def GetString(*args, **kwargs):
- """GetString() -> wxString"""
+ """GetString() -> String"""
return _core.CommandEvent_GetString(*args, **kwargs)
def IsChecked(*args, **kwargs):
"""IsChecked() -> bool"""
return _core.CommandEvent_IsChecked(*args, **kwargs)
+ Checked = IsChecked
def IsSelection(*args, **kwargs):
"""IsSelection() -> bool"""
return _core.CommandEvent_IsSelection(*args, **kwargs)
#---------------------------------------------------------------------------
class NotifyEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class ScrollEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
- int orient=0) -> ScrollEvent"""
+ """
+ __init__(wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
+ int orient=0) -> ScrollEvent
+ """
newobj = _core.new_ScrollEvent(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
#---------------------------------------------------------------------------
class ScrollWinEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
MOUSE_BTN_MIDDLE = _core.MOUSE_BTN_MIDDLE
MOUSE_BTN_RIGHT = _core.MOUSE_BTN_RIGHT
class MouseEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.MouseEvent_Leaving(*args, **kwargs)
def GetPosition(*args, **kwargs):
- """GetPosition() -> Point
+ """
+ GetPosition() -> Point
-Returns the position of the mouse in window coordinates when the event happened."""
+ Returns the position of the mouse in window coordinates when the event happened.
+ """
return _core.MouseEvent_GetPosition(*args, **kwargs)
def GetPositionTuple(*args, **kwargs):
- """GetPositionTuple() -> (x,y)
+ """
+ GetPositionTuple() -> (x,y)
-Returns the position of the mouse in window coordinates when the event happened."""
+ Returns the position of the mouse in window coordinates when the event happened.
+ """
return _core.MouseEvent_GetPositionTuple(*args, **kwargs)
def GetLogicalPosition(*args, **kwargs):
- """GetLogicalPosition(wxDC dc) -> Point"""
+ """GetLogicalPosition(DC dc) -> Point"""
return _core.MouseEvent_GetLogicalPosition(*args, **kwargs)
def GetX(*args, **kwargs):
#---------------------------------------------------------------------------
class SetCursorEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.SetCursorEvent_GetY(*args, **kwargs)
def SetCursor(*args, **kwargs):
- """SetCursor(wxCursor cursor)"""
+ """SetCursor(Cursor cursor)"""
return _core.SetCursorEvent_SetCursor(*args, **kwargs)
def GetCursor(*args, **kwargs):
- """GetCursor() -> wxCursor"""
+ """GetCursor() -> Cursor"""
return _core.SetCursorEvent_GetCursor(*args, **kwargs)
def HasCursor(*args, **kwargs):
#---------------------------------------------------------------------------
class KeyEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.KeyEvent_GetRawKeyFlags(*args, **kwargs)
def GetPosition(*args, **kwargs):
- """GetPosition() -> Point
+ """
+ GetPosition() -> Point
-Find the position of the event."""
+ Find the position of the event.
+ """
return _core.KeyEvent_GetPosition(*args, **kwargs)
def GetPositionTuple(*args, **kwargs):
- """GetPositionTuple() -> (x,y)
+ """
+ GetPositionTuple() -> (x,y)
-Find the position of the event."""
+ Find the position of the event.
+ """
return _core.KeyEvent_GetPositionTuple(*args, **kwargs)
def GetX(*args, **kwargs):
#---------------------------------------------------------------------------
class SizeEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class MoveEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class PaintEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.PaintEvent_swigregister(PaintEventPtr)
class NcPaintEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class EraseEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(int Id=0, wxDC dc=(wxDC *) NULL) -> EraseEvent"""
+ """__init__(int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
newobj = _core.new_EraseEvent(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
del newobj.thisown
def GetDC(*args, **kwargs):
- """GetDC() -> wxDC"""
+ """GetDC() -> DC"""
return _core.EraseEvent_GetDC(*args, **kwargs)
#---------------------------------------------------------------------------
class FocusEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class ChildFocusEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class ActivateEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class InitDialogEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class MenuEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class CloseEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class ShowEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class IconizeEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class MaximizeEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class DropFilesEvent(Event):
- """"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
UPDATE_UI_PROCESS_ALL = _core.UPDATE_UI_PROCESS_ALL
UPDATE_UI_PROCESS_SPECIFIED = _core.UPDATE_UI_PROCESS_SPECIFIED
class UpdateUIEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.UpdateUIEvent_GetEnabled(*args, **kwargs)
def GetText(*args, **kwargs):
- """GetText() -> wxString"""
+ """GetText() -> String"""
return _core.UpdateUIEvent_GetText(*args, **kwargs)
def GetSetText(*args, **kwargs):
return _core.UpdateUIEvent_Enable(*args, **kwargs)
def SetText(*args, **kwargs):
- """SetText(wxString text)"""
+ """SetText(String text)"""
return _core.UpdateUIEvent_SetText(*args, **kwargs)
def SetUpdateInterval(*args, **kwargs):
- """UpdateUIEvent.SetUpdateInterval(long updateInterval)"""
+ """SetUpdateInterval(long updateInterval)"""
return _core.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
SetUpdateInterval = staticmethod(SetUpdateInterval)
def GetUpdateInterval(*args, **kwargs):
- """UpdateUIEvent.GetUpdateInterval() -> long"""
+ """GetUpdateInterval() -> long"""
return _core.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
GetUpdateInterval = staticmethod(GetUpdateInterval)
def CanUpdate(*args, **kwargs):
- """UpdateUIEvent.CanUpdate(Window win) -> bool"""
+ """CanUpdate(Window win) -> bool"""
return _core.UpdateUIEvent_CanUpdate(*args, **kwargs)
CanUpdate = staticmethod(CanUpdate)
def ResetUpdateTime(*args, **kwargs):
- """UpdateUIEvent.ResetUpdateTime()"""
+ """ResetUpdateTime()"""
return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
ResetUpdateTime = staticmethod(ResetUpdateTime)
def SetMode(*args, **kwargs):
- """UpdateUIEvent.SetMode(wxUpdateUIMode mode)"""
+ """SetMode(int mode)"""
return _core.UpdateUIEvent_SetMode(*args, **kwargs)
SetMode = staticmethod(SetMode)
def GetMode(*args, **kwargs):
- """UpdateUIEvent.GetMode() -> wxUpdateUIMode"""
+ """GetMode() -> int"""
return _core.UpdateUIEvent_GetMode(*args, **kwargs)
GetMode = staticmethod(GetMode)
return _core.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
def UpdateUIEvent_SetMode(*args, **kwargs):
- """UpdateUIEvent_SetMode(wxUpdateUIMode mode)"""
+ """UpdateUIEvent_SetMode(int mode)"""
return _core.UpdateUIEvent_SetMode(*args, **kwargs)
def UpdateUIEvent_GetMode(*args, **kwargs):
- """UpdateUIEvent_GetMode() -> wxUpdateUIMode"""
+ """UpdateUIEvent_GetMode() -> int"""
return _core.UpdateUIEvent_GetMode(*args, **kwargs)
#---------------------------------------------------------------------------
class SysColourChangedEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class MouseCaptureChangedEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class DisplayChangedEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class PaletteChangedEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class QueryNewPaletteEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class NavigationKeyEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class WindowCreateEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.WindowCreateEvent_swigregister(WindowCreateEventPtr)
class WindowDestroyEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class ContextMenuEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
IDLE_PROCESS_ALL = _core.IDLE_PROCESS_ALL
IDLE_PROCESS_SPECIFIED = _core.IDLE_PROCESS_SPECIFIED
class IdleEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.IdleEvent_MoreRequested(*args, **kwargs)
def SetMode(*args, **kwargs):
- """IdleEvent.SetMode(wxIdleMode mode)"""
+ """SetMode(int mode)"""
return _core.IdleEvent_SetMode(*args, **kwargs)
SetMode = staticmethod(SetMode)
def GetMode(*args, **kwargs):
- """IdleEvent.GetMode() -> wxIdleMode"""
+ """GetMode() -> int"""
return _core.IdleEvent_GetMode(*args, **kwargs)
GetMode = staticmethod(GetMode)
def CanSend(*args, **kwargs):
- """IdleEvent.CanSend(Window win) -> bool"""
+ """CanSend(Window win) -> bool"""
return _core.IdleEvent_CanSend(*args, **kwargs)
CanSend = staticmethod(CanSend)
_core.IdleEvent_swigregister(IdleEventPtr)
def IdleEvent_SetMode(*args, **kwargs):
- """IdleEvent_SetMode(wxIdleMode mode)"""
+ """IdleEvent_SetMode(int mode)"""
return _core.IdleEvent_SetMode(*args, **kwargs)
def IdleEvent_GetMode(*args, **kwargs):
- """IdleEvent_GetMode() -> wxIdleMode"""
+ """IdleEvent_GetMode() -> int"""
return _core.IdleEvent_GetMode(*args, **kwargs)
def IdleEvent_CanSend(*args, **kwargs):
#---------------------------------------------------------------------------
class PyEvent(Event):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_core.PyEvent_swigregister(PyEventPtr)
class PyCommandEvent(CommandEvent):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
PRINT_WINDOWS = _core.PRINT_WINDOWS
PRINT_POSTSCRIPT = _core.PRINT_POSTSCRIPT
class PyApp(EvtHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__() -> PyApp"""
+ """
+ __init__() -> PyApp
+
+ Create a new application object, starting the bootstrap process.
+ """
newobj = _core.new_PyApp(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
return _core.PyApp__setCallbackInfo(*args, **kwargs)
def GetAppName(*args, **kwargs):
- """GetAppName() -> wxString"""
+ """
+ GetAppName() -> String
+
+ Get the application name.
+ """
return _core.PyApp_GetAppName(*args, **kwargs)
def SetAppName(*args, **kwargs):
- """SetAppName(wxString name)"""
+ """
+ SetAppName(String name)
+
+ Set the application name. This value may be used automatically
+ by wx.Config and such.
+ """
return _core.PyApp_SetAppName(*args, **kwargs)
def GetClassName(*args, **kwargs):
- """GetClassName() -> wxString
+ """
+ GetClassName() -> String
-Returns the class name of the C++ object using wxRTTI."""
+ Get the application's class name.
+ """
return _core.PyApp_GetClassName(*args, **kwargs)
def SetClassName(*args, **kwargs):
- """SetClassName(wxString name)"""
+ """
+ SetClassName(String name)
+
+ Set the application's class name. This value may be used for X-resources if
+ applicable for the platform
+ """
return _core.PyApp_SetClassName(*args, **kwargs)
def GetVendorName(*args, **kwargs):
- """GetVendorName() -> wxString"""
+ """
+ GetVendorName() -> String
+
+ Get the application's vendor name.
+ """
return _core.PyApp_GetVendorName(*args, **kwargs)
def SetVendorName(*args, **kwargs):
- """SetVendorName(wxString name)"""
+ """
+ SetVendorName(String name)
+
+ Set the application's vendor name. This value may be used automatically
+ by wx.Config and such.
+ """
return _core.PyApp_SetVendorName(*args, **kwargs)
def GetTraits(*args, **kwargs):
- """GetTraits() -> wxAppTraits"""
+ """
+ GetTraits() -> wxAppTraits
+
+ Create the app traits object to which we delegate for everything which either
+ should be configurable by the user (then he can change the default behaviour
+ simply by overriding CreateTraits() and returning his own traits object) or
+ which is GUI/console dependent as then wx.AppTraits allows us to abstract the
+ differences behind the common facade
+ """
return _core.PyApp_GetTraits(*args, **kwargs)
def ProcessPendingEvents(*args, **kwargs):
- """ProcessPendingEvents()"""
+ """
+ ProcessPendingEvents()
+
+ Process all events in the Pending Events list -- it is necessary to call this
+ function to process posted events. This happens during each event loop
+ iteration.
+ """
return _core.PyApp_ProcessPendingEvents(*args, **kwargs)
def Yield(*args, **kwargs):
- """Yield(bool onlyIfNeeded=False) -> bool"""
+ """
+ Yield(bool onlyIfNeeded=False) -> bool
+
+ Process all currently pending events right now, instead of waiting until
+ return to the event loop. It is an error to call Yield() recursively unless
+ the value of onlyIfNeeded is True.
+
+ WARNING: This function is dangerous as it can lead to unexpected
+ reentrancies (i.e. when called from an event handler it
+ may result in calling the same event handler again), use
+ with _extreme_ care or, better, don't use at all!
+
+ """
return _core.PyApp_Yield(*args, **kwargs)
def WakeUpIdle(*args, **kwargs):
- """WakeUpIdle()"""
+ """
+ WakeUpIdle()
+
+ Make sure that idle events are sent again
+ """
return _core.PyApp_WakeUpIdle(*args, **kwargs)
def MainLoop(*args, **kwargs):
- """MainLoop() -> int"""
+ """
+ MainLoop() -> int
+
+ Execute the main GUI loop, the function returns when the loop ends.
+ """
return _core.PyApp_MainLoop(*args, **kwargs)
def Exit(*args, **kwargs):
- """Exit()"""
+ """
+ Exit()
+
+ Exit the main loop thus terminating the application.
+ """
return _core.PyApp_Exit(*args, **kwargs)
def ExitMainLoop(*args, **kwargs):
- """ExitMainLoop()"""
+ """
+ ExitMainLoop()
+
+ Exit the main GUI loop during the next iteration (i.e. it does not
+ stop the program immediately!)
+ """
return _core.PyApp_ExitMainLoop(*args, **kwargs)
def Pending(*args, **kwargs):
- """Pending() -> bool"""
+ """
+ Pending() -> bool
+
+ Returns True if there are unprocessed events in the event queue.
+ """
return _core.PyApp_Pending(*args, **kwargs)
def Dispatch(*args, **kwargs):
- """Dispatch() -> bool"""
+ """
+ Dispatch() -> bool
+
+ Process the first event in the event queue (blocks until an event
+ appears if there are none currently)
+ """
return _core.PyApp_Dispatch(*args, **kwargs)
def ProcessIdle(*args, **kwargs):
- """ProcessIdle() -> bool"""
+ """
+ ProcessIdle() -> bool
+
+ Called from the MainLoop when the application becomes idle and sends an
+ IdleEvent to all interested parties. Returns True is more idle events are
+ needed, False if not.
+ """
return _core.PyApp_ProcessIdle(*args, **kwargs)
def SendIdleEvents(*args, **kwargs):
- """SendIdleEvents(Window win, IdleEvent event) -> bool"""
- return _core.PyApp_SendIdleEvents(*args, **kwargs)
+ """
+ SendIdleEvents(Window win, IdleEvent event) -> bool
- def OnIdle(*args, **kwargs):
- """OnIdle(IdleEvent event)"""
- return _core.PyApp_OnIdle(*args, **kwargs)
+ Send idle event to window and all subwindows. Returns True if more idle time
+ is requested.
+ """
+ return _core.PyApp_SendIdleEvents(*args, **kwargs)
def IsActive(*args, **kwargs):
- """IsActive() -> bool"""
+ """
+ IsActive() -> bool
+
+ Return True if our app has focus.
+ """
return _core.PyApp_IsActive(*args, **kwargs)
def SetTopWindow(*args, **kwargs):
- """SetTopWindow(Window win)"""
+ """
+ SetTopWindow(Window win)
+
+ Set the "main" top level window
+ """
return _core.PyApp_SetTopWindow(*args, **kwargs)
def GetTopWindow(*args, **kwargs):
- """GetTopWindow() -> Window"""
+ """
+ GetTopWindow() -> Window
+
+ Return the "main" top level window (if it hadn't been set previously with
+ SetTopWindow(), will return just some top level window and, if there not any,
+ will return None)
+ """
return _core.PyApp_GetTopWindow(*args, **kwargs)
def SetExitOnFrameDelete(*args, **kwargs):
- """SetExitOnFrameDelete(bool flag)"""
+ """
+ SetExitOnFrameDelete(bool flag)
+
+ Control the exit behaviour: by default, the program will exit the main loop
+ (and so, usually, terminate) when the last top-level program window is
+ deleted. Beware that if you disable this behaviour (with
+ SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly
+ from somewhere.
+
+ """
return _core.PyApp_SetExitOnFrameDelete(*args, **kwargs)
def GetExitOnFrameDelete(*args, **kwargs):
- """GetExitOnFrameDelete() -> bool"""
+ """
+ GetExitOnFrameDelete() -> bool
+
+ Get the current exit behaviour setting.
+ """
return _core.PyApp_GetExitOnFrameDelete(*args, **kwargs)
def SetUseBestVisual(*args, **kwargs):
- """SetUseBestVisual(bool flag)"""
+ """
+ SetUseBestVisual(bool flag)
+
+ Set whether the app should try to use the best available visual on systems
+ where more than one is available, (Sun, SGI, XFree86 4, etc.)
+ """
return _core.PyApp_SetUseBestVisual(*args, **kwargs)
def GetUseBestVisual(*args, **kwargs):
- """GetUseBestVisual() -> bool"""
+ """
+ GetUseBestVisual() -> bool
+
+ Get current UseBestVisual setting.
+ """
return _core.PyApp_GetUseBestVisual(*args, **kwargs)
def SetPrintMode(*args, **kwargs):
"""GetPrintMode() -> int"""
return _core.PyApp_GetPrintMode(*args, **kwargs)
- def GetAssertMode(*args, **kwargs):
- """GetAssertMode() -> int"""
- return _core.PyApp_GetAssertMode(*args, **kwargs)
-
def SetAssertMode(*args, **kwargs):
- """SetAssertMode(int mode)"""
- return _core.PyApp_SetAssertMode(*args, **kwargs)
+ """
+ SetAssertMode(int mode)
- def GetMacSupportPCMenuShortcuts(*args, **kwargs):
- """PyApp.GetMacSupportPCMenuShortcuts() -> bool"""
- return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
+ Set the OnAssert behaviour for debug and hybrid builds. The following flags
+ may be or'd together:
- GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
- def GetMacAboutMenuItemId(*args, **kwargs):
- """PyApp.GetMacAboutMenuItemId() -> long"""
+ wx.PYAPP_ASSERT_SUPPRESS Don't do anything
+ wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default)
+ wx.PYAPP_ASSERT_DIALOG Display a message dialog
+ wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log
+
+ """
+ return _core.PyApp_SetAssertMode(*args, **kwargs)
+
+ def GetAssertMode(*args, **kwargs):
+ """
+ GetAssertMode() -> int
+
+ Get the current OnAssert behaviour setting.
+ """
+ return _core.PyApp_GetAssertMode(*args, **kwargs)
+
+ def GetMacSupportPCMenuShortcuts(*args, **kwargs):
+ """GetMacSupportPCMenuShortcuts() -> bool"""
+ return _core.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
+
+ GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
+ def GetMacAboutMenuItemId(*args, **kwargs):
+ """GetMacAboutMenuItemId() -> long"""
return _core.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
def GetMacPreferencesMenuItemId(*args, **kwargs):
- """PyApp.GetMacPreferencesMenuItemId() -> long"""
+ """GetMacPreferencesMenuItemId() -> long"""
return _core.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
def GetMacExitMenuItemId(*args, **kwargs):
- """PyApp.GetMacExitMenuItemId() -> long"""
+ """GetMacExitMenuItemId() -> long"""
return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs)
GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
def GetMacHelpMenuTitleName(*args, **kwargs):
- """PyApp.GetMacHelpMenuTitleName() -> wxString"""
+ """GetMacHelpMenuTitleName() -> String"""
return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
def SetMacSupportPCMenuShortcuts(*args, **kwargs):
- """PyApp.SetMacSupportPCMenuShortcuts(bool val)"""
+ """SetMacSupportPCMenuShortcuts(bool val)"""
return _core.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
def SetMacAboutMenuItemId(*args, **kwargs):
- """PyApp.SetMacAboutMenuItemId(long val)"""
+ """SetMacAboutMenuItemId(long val)"""
return _core.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
def SetMacPreferencesMenuItemId(*args, **kwargs):
- """PyApp.SetMacPreferencesMenuItemId(long val)"""
+ """SetMacPreferencesMenuItemId(long val)"""
return _core.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
def SetMacExitMenuItemId(*args, **kwargs):
- """PyApp.SetMacExitMenuItemId(long val)"""
+ """SetMacExitMenuItemId(long val)"""
return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs)
SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
def SetMacHelpMenuTitleName(*args, **kwargs):
- """PyApp.SetMacHelpMenuTitleName(wxString val)"""
+ """SetMacHelpMenuTitleName(String val)"""
return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
def _BootstrapApp(*args, **kwargs):
- """_BootstrapApp()"""
+ """
+ _BootstrapApp()
+
+ For internal use only
+ """
return _core.PyApp__BootstrapApp(*args, **kwargs)
def GetComCtl32Version(*args, **kwargs):
- """PyApp.GetComCtl32Version() -> int"""
+ """
+ GetComCtl32Version() -> int
+
+ Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
+ 0 if it wasn't found at all. Raises an exception on non-Windows
+ platforms.
+ """
return _core.PyApp_GetComCtl32Version(*args, **kwargs)
GetComCtl32Version = staticmethod(GetComCtl32Version)
return _core.PyApp_GetMacExitMenuItemId(*args, **kwargs)
def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
- """PyApp_GetMacHelpMenuTitleName() -> wxString"""
+ """PyApp_GetMacHelpMenuTitleName() -> String"""
return _core.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
return _core.PyApp_SetMacExitMenuItemId(*args, **kwargs)
def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
- """PyApp_SetMacHelpMenuTitleName(wxString val)"""
+ """PyApp_SetMacHelpMenuTitleName(String val)"""
return _core.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
def PyApp_GetComCtl32Version(*args, **kwargs):
- """PyApp_GetComCtl32Version() -> int"""
+ """
+ PyApp_GetComCtl32Version() -> int
+
+ Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
+ 0 if it wasn't found at all. Raises an exception on non-Windows
+ platforms.
+ """
return _core.PyApp_GetComCtl32Version(*args, **kwargs)
#---------------------------------------------------------------------------
def Exit(*args, **kwargs):
- """Exit()"""
+ """
+ Exit()
+
+ Force an exit of the application. Convenience for wx.GetApp().Exit()
+ """
return _core.Exit(*args, **kwargs)
def Yield(*args, **kwargs):
- """Yield() -> bool"""
+ """
+ Yield() -> bool
+
+ Yield to other apps/messages. Convenience for wx.GetApp().Yield()
+ """
return _core.Yield(*args, **kwargs)
def YieldIfNeeded(*args, **kwargs):
- """YieldIfNeeded() -> bool"""
+ """
+ YieldIfNeeded() -> bool
+
+ Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
+ """
return _core.YieldIfNeeded(*args, **kwargs)
def SafeYield(*args, **kwargs):
- """SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool"""
+ """
+ SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
+
+ This function is similar to wx.Yield, except that it disables the user input
+ to all program windows before calling wx.Yield and re-enables it again
+ afterwards. If win is not None, this window will remain enabled, allowing the
+ implementation of some limited user interaction.
+
+ Returns the result of the call to wx.Yield.
+ """
return _core.SafeYield(*args, **kwargs)
def WakeUpIdle(*args, **kwargs):
- """WakeUpIdle()"""
+ """
+ WakeUpIdle()
+
+ Cause the message queue to become empty again, so idle events will be sent.
+ """
return _core.WakeUpIdle(*args, **kwargs)
def PostEvent(*args, **kwargs):
- """PostEvent(EvtHandler dest, Event event)"""
+ """
+ PostEvent(EvtHandler dest, Event event)
+
+ Send an event to a window or other wx.EvtHandler to be processed later.
+ """
return _core.PostEvent(*args, **kwargs)
def App_CleanUp(*args, **kwargs):
- """App_CleanUp()"""
+ """
+ App_CleanUp()
+
+ For internal use only, it is used to cleanup after wxWindows when Python shuts down.
+ """
return _core.App_CleanUp(*args, **kwargs)
def GetApp(*args, **kwargs):
- """GetApp() -> PyApp"""
+ """
+ GetApp() -> PyApp
+
+ Return a reference to the current wx.App object.
+ """
return _core.GetApp(*args, **kwargs)
#----------------------------------------------------------------------
class PyOnDemandOutputWindow:
+ """
+ A class that can be used for redirecting Python's stdout and
+ stderr streams. It will do nothing until something is wrriten to
+ the stream at which point it will create a Frame with a text area
+ and write the text there.
+ """
def __init__(self, title = "wxPython: stdout/stderr"):
self.frame = None
self.title = title
self.parent = None
def SetParent(self, parent):
+ """Set the window to be used as the popup Frame's parent."""
self.parent = parent
+
+ def CreateOutputWindow(self, st):
+ self.frame = wx.Frame(self.parent, -1, self.title,
+ style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
+ self.text = wx.TextCtrl(self.frame, -1, "",
+ style = wx.TE_MULTILINE | wx.TE_READONLY)
+ self.text.AppendText(st)
+ self.frame.SetSize((450, 300))
+ self.frame.Show(True)
+ EVT_CLOSE(self.frame, self.OnCloseWindow)
+
+
def OnCloseWindow(self, event):
- if self.frame != None:
+ if self.frame is not None:
self.frame.Destroy()
self.frame = None
self.text = None
+
# These methods provide the file-like output behaviour.
- def write(self, str):
- if not wx.Thread_IsMain():
- # Aquire the GUI mutex before making GUI calls. Mutex is released
- # when locker is deleted at the end of this function.
- locker = wx.MutexGuiLocker()
-
- if not self.frame:
- self.frame = wx.Frame(self.parent, -1, self.title,
- style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
- self.text = wxTextCtrl(self.frame, -1, "",
- style = wx.TE_MULTILINE | wx.TE_READONLY)
- self.frame.SetSize((450, 300))
- self.frame.Show(True)
- EVT_CLOSE(self.frame, self.OnCloseWindow)
- self.text.AppendText(str)
+ def write(self, text):
+ """
+ Create the output window if needed and write the string to it.
+ If not called in the context of the gui thread then uses
+ CallAfter to do the work there.
+ """
+ if self.frame is None:
+ if not wx.Thread_IsMain():
+ wx.CallAfter(self.CreateOutputWindow, text)
+ else:
+ self.CreateOutputWindow(text)
+ else:
+ if not wx.Thread_IsMain():
+ wx.CallAfter(self.text.AppendText, text)
+ else:
+ self.text.AppendText(text)
+
def close(self):
- if self.frame != None:
- if not wx.Thread_IsMain():
- locker = wx.MutexGuiLocker()
- self.frame.Close()
+ if self.frame is not None:
+ wx.CallAfter(self.frame.Close)
+
#----------------------------------------------------------------------
-# The main application class. Derive from this and implement an OnInit
-# method that creates a frame and then calls self.SetTopWindow(frame)
_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
class App(wx.PyApp):
+ """
+ The main application class. Derive from this and implement an OnInit
+ method that creates a frame and then calls self.SetTopWindow(frame)
+ """
outputWindowClass = PyOnDemandOutputWindow
def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False):
def SetTopWindow(self, frame):
+ """Set the \"main\" top level window"""
if self.stdioWin:
self.stdioWin.SetParent(frame)
wx.PyApp.SetTopWindow(self, frame)
def MainLoop(self):
+ """Execute the main GUI event loop"""
wx.PyApp.MainLoop(self)
self.RestoreStdio()
- def RedirectStdio(self, filename):
+ def RedirectStdio(self, filename=None):
+ """Redirect sys.stdout and sys.stderr to a file or a popup window."""
if filename:
_sys.stdout = _sys.stderr = open(filename, 'a')
else:
#----------------------------------------------------------------------------
class PySimpleApp(wx.App):
- def __init__(self, redirect=False, filename=None):
- wx.App.__init__(self, redirect, filename)
+ """
+ A simple application class. You can just create one of these and
+ then then make your top level windows later, and not have to worry
+ about OnInit."""
+
+ def __init__(self, redirect=False, filename=None, useBestVisual=False):
+ wx.App.__init__(self, redirect, filename, useBestVisual)
+
def OnInit(self):
wx.InitAllImageHandlers()
return True
+# Is anybody using this one?
class PyWidgetTester(wx.App):
def __init__(self, size = (250, 100)):
self.size = size
wx.App.__init__(self, 0)
def OnInit(self):
- self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
+ self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
self.SetTopWindow(self.frame)
return True
#---------------------------------------------------------------------------
+class AcceleratorEntry(object):
+ def __repr__(self):
+ return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+ def __init__(self, *args, **kwargs):
+ """__init__(int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry"""
+ newobj = _core.new_AcceleratorEntry(*args, **kwargs)
+ self.this = newobj.this
+ self.thisown = 1
+ del newobj.thisown
+ def __del__(self, destroy=_core.delete_AcceleratorEntry):
+ """__del__()"""
+ try:
+ if self.thisown: destroy(self)
+ except: pass
+
+ def Set(*args, **kwargs):
+ """Set(int flags, int keyCode, int cmd, MenuItem item=None)"""
+ return _core.AcceleratorEntry_Set(*args, **kwargs)
+
+ def SetMenuItem(*args, **kwargs):
+ """SetMenuItem(MenuItem item)"""
+ return _core.AcceleratorEntry_SetMenuItem(*args, **kwargs)
+
+ def GetMenuItem(*args, **kwargs):
+ """GetMenuItem() -> MenuItem"""
+ return _core.AcceleratorEntry_GetMenuItem(*args, **kwargs)
+
+ def GetFlags(*args, **kwargs):
+ """GetFlags() -> int"""
+ return _core.AcceleratorEntry_GetFlags(*args, **kwargs)
+
+ def GetKeyCode(*args, **kwargs):
+ """GetKeyCode() -> int"""
+ return _core.AcceleratorEntry_GetKeyCode(*args, **kwargs)
+
+ def GetCommand(*args, **kwargs):
+ """GetCommand() -> int"""
+ return _core.AcceleratorEntry_GetCommand(*args, **kwargs)
+
+
+class AcceleratorEntryPtr(AcceleratorEntry):
+ def __init__(self, this):
+ self.this = this
+ if not hasattr(self,"thisown"): self.thisown = 0
+ self.__class__ = AcceleratorEntry
+_core.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
+
+class AcceleratorTable(Object):
+ def __repr__(self):
+ return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(entries) -> AcceleratorTable
+
+ Construct an AcceleratorTable from a list of AcceleratorEntry items or
+ 3-tuples (flags, keyCode, cmdID)
+ """
+ newobj = _core.new_AcceleratorTable(*args, **kwargs)
+ self.this = newobj.this
+ self.thisown = 1
+ del newobj.thisown
+ def __del__(self, destroy=_core.delete_AcceleratorTable):
+ """__del__()"""
+ try:
+ if self.thisown: destroy(self)
+ except: pass
+
+ def Ok(*args, **kwargs):
+ """Ok() -> bool"""
+ return _core.AcceleratorTable_Ok(*args, **kwargs)
+
+
+class AcceleratorTablePtr(AcceleratorTable):
+ def __init__(self, this):
+ self.this = this
+ if not hasattr(self,"thisown"): self.thisown = 0
+ self.__class__ = AcceleratorTable
+_core.AcceleratorTable_swigregister(AcceleratorTablePtr)
+
+
+def GetAccelFromString(*args, **kwargs):
+ """GetAccelFromString(String label) -> AcceleratorEntry"""
+ return _core.GetAccelFromString(*args, **kwargs)
+#---------------------------------------------------------------------------
+
+class VisualAttributes(object):
+ """struct containing all the visual attributes of a control"""
+ def __repr__(self):
+ return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+ def __init__(self, *args, **kwargs):
+ """
+ __init__() -> VisualAttributes
+
+ struct containing all the visual attributes of a control
+ """
+ newobj = _core.new_VisualAttributes(*args, **kwargs)
+ self.this = newobj.this
+ self.thisown = 1
+ del newobj.thisown
+ def __del__(self, destroy=_core.delete_VisualAttributes):
+ """__del__()"""
+ try:
+ if self.thisown: destroy(self)
+ except: pass
+
+ font = property(_core.VisualAttributes_font_get, _core.VisualAttributes_font_set)
+ colFg = property(_core.VisualAttributes_colFg_get, _core.VisualAttributes_colFg_set)
+ colBg = property(_core.VisualAttributes_colBg_get, _core.VisualAttributes_colBg_set)
+
+class VisualAttributesPtr(VisualAttributes):
+ def __init__(self, this):
+ self.this = this
+ if not hasattr(self,"thisown"): self.thisown = 0
+ self.__class__ = VisualAttributes
+_core.VisualAttributes_swigregister(VisualAttributesPtr)
+NullAcceleratorTable = cvar.NullAcceleratorTable
+PanelNameStr = cvar.PanelNameStr
+
+WINDOW_VARIANT_NORMAL = _core.WINDOW_VARIANT_NORMAL
+WINDOW_VARIANT_SMALL = _core.WINDOW_VARIANT_SMALL
+WINDOW_VARIANT_MINI = _core.WINDOW_VARIANT_MINI
+WINDOW_VARIANT_LARGE = _core.WINDOW_VARIANT_LARGE
+WINDOW_VARIANT_MAX = _core.WINDOW_VARIANT_MAX
class Window(EvtHandler):
- """"""
+ """
+ wx.Window is the base class for all windows and represents any visible
+ object on the screen. All controls, top level windows and so on are
+ wx.Windows. Sizers and device contexts are not however, as they don't
+ appear on screen themselves.
+
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- long style=0, wxString name=PanelNameStr) -> Window"""
+ """
+ __init__(Window parent, int id=-1, Point pos=DefaultPosition,
+ Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
+
+ Construct and show a generic Window.
+ """
newobj = _core.new_Window(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
self._setOORInfo(self)
def Create(*args, **kwargs):
- """Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- long style=0, wxString name=PanelNameStr) -> bool"""
+ """
+ Create(Window parent, int id=-1, Point pos=DefaultPosition,
+ Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
+
+ Create the GUI part of the Window for 2-phase creation mode.
+ """
return _core.Window_Create(*args, **kwargs)
def Close(*args, **kwargs):
- """Close(bool force=False) -> bool"""
+ """
+ Close(bool force=False) -> bool
+
+ This function simply generates a EVT_CLOSE event whose handler usually
+ tries to close the window. It doesn't close the window itself,
+ however. If force is False (the default) then the window's close
+ handler will be allowed to veto the destruction of the window.
+
+ Usually Close is only used with the top level windows (wx.Frame and
+ wx.Dialog classes) as the others are not supposed to have any special
+ EVT_CLOSE logic.
+
+ The close handler should check whether the window is being deleted
+ forcibly, using wx.CloseEvent.GetForce, in which case it should
+ destroy the window using wx.Window.Destroy.
+
+ Note that calling Close does not guarantee that the window will be
+ destroyed; but it provides a way to simulate a manual close of a
+ window, which may or may not be implemented by destroying the
+ window. The default EVT_CLOSE handler for wx.Dialog does not
+ necessarily delete the dialog, since it will simply simulate an
+ wxID_CANCEL event which is handled by the appropriate button event
+ handler and may do anything at all.
+
+ To guarantee that the window will be destroyed, call wx.Window.Destroy
+ instead.
+ """
return _core.Window_Close(*args, **kwargs)
def Destroy(*args, **kwargs):
- """Destroy() -> bool
+ """
+ Destroy() -> bool
+
+ Destroys the window safely. Frames and dialogs are not destroyed
+ immediately when this function is called -- they are added to a list
+ of windows to be deleted on idle time, when all the window's events
+ have been processed. This prevents problems with events being sent to
+ non-existent windows.
-Deletes the C++ object this Python object is a proxy for."""
+ 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)
def DestroyChildren(*args, **kwargs):
- """DestroyChildren() -> bool"""
+ """
+ DestroyChildren() -> bool
+
+ Destroys all children of a window. Called automatically by the destructor.
+ """
return _core.Window_DestroyChildren(*args, **kwargs)
def IsBeingDeleted(*args, **kwargs):
- """IsBeingDeleted() -> bool"""
+ """
+ IsBeingDeleted() -> bool
+
+ Is the window in the process of being deleted?
+ """
return _core.Window_IsBeingDeleted(*args, **kwargs)
def SetTitle(*args, **kwargs):
- """SetTitle(wxString title)"""
+ """
+ SetTitle(String title)
+
+ Sets the window's title. Applicable only to frames and dialogs.
+ """
return _core.Window_SetTitle(*args, **kwargs)
def GetTitle(*args, **kwargs):
- """GetTitle() -> wxString"""
+ """
+ GetTitle() -> String
+
+ Gets the window's title. Applicable only to frames and dialogs.
+ """
return _core.Window_GetTitle(*args, **kwargs)
def SetLabel(*args, **kwargs):
- """SetLabel(wxString label)"""
+ """
+ SetLabel(String label)
+
+ Set the text which the window shows in its label if applicable.
+ """
return _core.Window_SetLabel(*args, **kwargs)
def GetLabel(*args, **kwargs):
- """GetLabel() -> wxString"""
+ """
+ GetLabel() -> String
+
+ Generic way of getting a label from any window, for
+ identification purposes. The interpretation of this function
+ differs from class to class. For frames and dialogs, the value
+ returned is the title. For buttons or static text controls, it is
+ the button text. This function can be useful for meta-programs
+ such as testing tools or special-needs access programs)which
+ need to identify windows by name.
+ """
return _core.Window_GetLabel(*args, **kwargs)
def SetName(*args, **kwargs):
- """SetName(wxString name)"""
+ """
+ SetName(String name)
+
+ Sets the window's name. The window name is used for ressource
+ setting in X, it is not the same as the window title/label
+ """
return _core.Window_SetName(*args, **kwargs)
def GetName(*args, **kwargs):
- """GetName() -> wxString"""
+ """
+ GetName() -> String
+
+ Returns the windows name. This name is not guaranteed to be
+ unique; it is up to the programmer to supply an appropriate name
+ in the window constructor or via wx.Window.SetName.
+ """
return _core.Window_GetName(*args, **kwargs)
+ def SetWindowVariant(*args, **kwargs):
+ """
+ SetWindowVariant(int variant)
+
+ Sets the variant of the window/font size to use for this window,
+ if the platform supports variants, for example, wxMac. Variant values are:
+
+ wx.WINDOW_VARIANT_NORMAL Normal size
+ wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal)
+ wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal)
+ wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal)
+
+ """
+ return _core.Window_SetWindowVariant(*args, **kwargs)
+
+ def GetWindowVariant(*args, **kwargs):
+ """GetWindowVariant() -> int"""
+ return _core.Window_GetWindowVariant(*args, **kwargs)
+
def SetId(*args, **kwargs):
- """SetId(int winid)"""
+ """
+ SetId(int winid)
+
+ Sets the identifier of the window. Each window has an integer
+ identifier. If the application has not provided one, an identifier
+ will be generated. Normally, the identifier should be provided on
+ creation and should not be modified subsequently.
+ """
return _core.Window_SetId(*args, **kwargs)
def GetId(*args, **kwargs):
- """GetId() -> int"""
+ """
+ GetId() -> int
+
+ Returns the identifier of the window. Each window has an integer
+ identifier. If the application has not provided one (or the default Id
+ -1 is used) then an unique identifier with a negative value will be
+ generated.
+ """
return _core.Window_GetId(*args, **kwargs)
def NewControlId(*args, **kwargs):
- """Window.NewControlId() -> int"""
+ """
+ NewControlId() -> int
+
+ Generate a control id for the controls which were not given one.
+ """
return _core.Window_NewControlId(*args, **kwargs)
NewControlId = staticmethod(NewControlId)
def NextControlId(*args, **kwargs):
- """Window.NextControlId(int winid) -> int"""
+ """
+ NextControlId(int winid) -> int
+
+ Get the id of the control following the one with the given
+ (autogenerated) id
+ """
return _core.Window_NextControlId(*args, **kwargs)
NextControlId = staticmethod(NextControlId)
def PrevControlId(*args, **kwargs):
- """Window.PrevControlId(int winid) -> int"""
+ """
+ PrevControlId(int winid) -> int
+
+ Get the id of the control preceding the one with the given
+ (autogenerated) id
+ """
return _core.Window_PrevControlId(*args, **kwargs)
PrevControlId = staticmethod(PrevControlId)
def SetSize(*args, **kwargs):
- """SetSize(Size size)"""
+ """
+ SetSize(Size size)
+
+ Sets the size of the window in pixels.
+ """
return _core.Window_SetSize(*args, **kwargs)
def SetDimensions(*args, **kwargs):
- """SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)"""
+ """
+ SetDimensions(int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
+
+ Sets the position and size of the window in pixels. The sizeFlags
+ parameter indicates the interpretation of the other params if they are
+ -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
+ shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
+ used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
+ dimensions of -1 and less to be interpreted as real dimensions, not
+ default values.
+ """
return _core.Window_SetDimensions(*args, **kwargs)
def SetRect(*args, **kwargs):
- """SetRect(Rect rect, int sizeFlags=SIZE_AUTO)"""
+ """
+ SetRect(Rect rect, int sizeFlags=SIZE_AUTO)
+
+ Sets the position and size of the window in pixels using a wx.Rect.
+ """
return _core.Window_SetRect(*args, **kwargs)
def SetSizeWH(*args, **kwargs):
- """SetSizeWH(int width, int height)"""
+ """
+ SetSizeWH(int width, int height)
+
+ Sets the size of the window in pixels.
+ """
return _core.Window_SetSizeWH(*args, **kwargs)
def Move(*args, **kwargs):
- """Move(Point pt, int flags=SIZE_USE_EXISTING)"""
+ """
+ Move(Point pt, int flags=SIZE_USE_EXISTING)
+
+ Moves the window to the given position.
+ """
return _core.Window_Move(*args, **kwargs)
SetPosition = Move
def MoveXY(*args, **kwargs):
- """MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)"""
+ """
+ MoveXY(int x, int y, int flags=SIZE_USE_EXISTING)
+
+ Moves the window to the given position.
+ """
return _core.Window_MoveXY(*args, **kwargs)
def Raise(*args, **kwargs):
- """Raise()"""
+ """
+ Raise()
+
+ Raises the window to the top of the window hierarchy if it is a
+ managed window (dialog or frame).
+ """
return _core.Window_Raise(*args, **kwargs)
def Lower(*args, **kwargs):
- """Lower()"""
+ """
+ Lower()
+
+ Lowers the window to the bottom of the window hierarchy if it is a
+ managed window (dialog or frame).
+ """
return _core.Window_Lower(*args, **kwargs)
def SetClientSize(*args, **kwargs):
- """SetClientSize(Size size)"""
+ """
+ SetClientSize(Size size)
+
+ This sets the size of the window client area in pixels. Using this
+ function to size a window tends to be more device-independent than
+ wx.Window.SetSize, since the application need not worry about what
+ dimensions the border or title bar have when trying to fit the window
+ around panel items, for example.
+ """
return _core.Window_SetClientSize(*args, **kwargs)
def SetClientSizeWH(*args, **kwargs):
- """SetClientSizeWH(int width, int height)"""
+ """
+ SetClientSizeWH(int width, int height)
+
+ This sets the size of the window client area in pixels. Using this
+ function to size a window tends to be more device-independent than
+ wx.Window.SetSize, since the application need not worry about what
+ dimensions the border or title bar have when trying to fit the window
+ around panel items, for example.
+ """
return _core.Window_SetClientSizeWH(*args, **kwargs)
def SetClientRect(*args, **kwargs):
- """SetClientRect(Rect rect)"""
+ """
+ SetClientRect(Rect rect)
+
+ This sets the size of the window client area in pixels. Using this
+ function to size a window tends to be more device-independent than
+ wx.Window.SetSize, since the application need not worry about what
+ dimensions the border or title bar have when trying to fit the window
+ around panel items, for example.
+ """
return _core.Window_SetClientRect(*args, **kwargs)
def GetPosition(*args, **kwargs):
- """GetPosition() -> Point
+ """
+ GetPosition() -> Point
-Get the window's position."""
+ Get the window's position.
+ """
return _core.Window_GetPosition(*args, **kwargs)
def GetPositionTuple(*args, **kwargs):
- """GetPositionTuple() -> (x,y)
+ """
+ GetPositionTuple() -> (x,y)
-Get the window's position."""
+ Get the window's position.
+ """
return _core.Window_GetPositionTuple(*args, **kwargs)
def GetSize(*args, **kwargs):
- """GetSize() -> Size
+ """
+ GetSize() -> Size
-Get the window size."""
+ Get the window size.
+ """
return _core.Window_GetSize(*args, **kwargs)
def GetSizeTuple(*args, **kwargs):
- """GetSizeTuple() -> (width, height)
+ """
+ GetSizeTuple() -> (width, height)
-Get the window size."""
+ Get the window size.
+ """
return _core.Window_GetSizeTuple(*args, **kwargs)
def GetRect(*args, **kwargs):
- """GetRect() -> Rect"""
+ """
+ GetRect() -> Rect
+
+ Returns the size and position of the window as a wx.Rect object.
+ """
return _core.Window_GetRect(*args, **kwargs)
def GetClientSize(*args, **kwargs):
- """GetClientSize() -> Size
+ """
+ GetClientSize() -> Size
-Get the window's client size."""
+ This gets the size of the window's 'client area' in pixels. The client
+ area is the area which may be drawn on by the programmer, excluding
+ title bar, border, scrollbars, etc.
+ """
return _core.Window_GetClientSize(*args, **kwargs)
def GetClientSizeTuple(*args, **kwargs):
- """GetClientSizeTuple() -> (width, height)
+ """
+ GetClientSizeTuple() -> (width, height)
-Get the window's client size."""
+ This gets the size of the window's 'client area' in pixels. The client
+ area is the area which may be drawn on by the programmer, excluding
+ title bar, border, scrollbars, etc.
+ """
return _core.Window_GetClientSizeTuple(*args, **kwargs)
def GetClientAreaOrigin(*args, **kwargs):
- """GetClientAreaOrigin() -> Point"""
+ """
+ GetClientAreaOrigin() -> Point
+
+ Get the origin of the client area of the window relative to the
+ window's top left corner (the client area may be shifted because of
+ the borders, scrollbars, other decorations...)
+ """
return _core.Window_GetClientAreaOrigin(*args, **kwargs)
def GetClientRect(*args, **kwargs):
- """GetClientRect() -> Rect"""
+ """
+ GetClientRect() -> Rect
+
+ Get the client area position and size as a wx.Rect object.
+ """
return _core.Window_GetClientRect(*args, **kwargs)
def GetBestSize(*args, **kwargs):
- """GetBestSize() -> Size
-
-Get the size best suited for the window (in fact, minimal acceptable size
-using which it will still look "nice")"""
+ """
+ GetBestSize() -> Size
+
+ This functions returns the best acceptable minimal size for the
+ window, if applicable. For example, for a static text control, it will be
+ the minimal size such that the control label is not truncated. For
+ windows containing subwindows (suzh aswx.Panel), the size returned
+ by this function will be the same as the size the window would have
+ had after calling Fit.
+ """
return _core.Window_GetBestSize(*args, **kwargs)
def GetBestSizeTuple(*args, **kwargs):
- """GetBestSizeTuple() -> (width, height)
-
-Get the size best suited for the window (in fact, minimal acceptable size
-using which it will still look "nice")"""
+ """
+ GetBestSizeTuple() -> (width, height)
+
+ This functions returns the best acceptable minimal size for the
+ window, if applicable. For example, for a static text control, it will be
+ the minimal size such that the control label is not truncated. For
+ windows containing subwindows (suzh aswx.Panel), the size returned
+ by this function will be the same as the size the window would have
+ had after calling Fit.
+ """
return _core.Window_GetBestSizeTuple(*args, **kwargs)
def GetAdjustedBestSize(*args, **kwargs):
- """GetAdjustedBestSize() -> Size"""
+ """
+ GetAdjustedBestSize() -> Size
+
+ 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)
def Center(*args, **kwargs):
- """Center(int direction=BOTH)"""
+ """
+ Center(int direction=BOTH)
+
+ Centers the window. The parameter specifies the direction for
+ cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
+ also include wx.CENTER_ON_SCREEN flag if you want to center the window
+ on the entire screen and not on its parent window. If it is a
+ top-level window and has no parent then it will always be centered
+ relative to the screen.
+ """
return _core.Window_Center(*args, **kwargs)
Centre = Center
def CenterOnScreen(*args, **kwargs):
- """CenterOnScreen(int dir=BOTH)"""
+ """
+ CenterOnScreen(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(int dir=BOTH)"""
+ """
+ CenterOnParent(int dir=BOTH)
+
+ Center with respect to the the parent window
+ """
return _core.Window_CenterOnParent(*args, **kwargs)
CentreOnParent = CenterOnParent
def Fit(*args, **kwargs):
- """Fit()"""
+ """
+ Fit()
+
+ Sizes the window so that it fits around its subwindows. This function
+ won't do anything if there are no subwindows and will only really work
+ correctly if sizers are used for the subwindows layout. Also, if the
+ window has exactly one subwindow it is better (faster and the result
+ is more precise as Fit adds some margin to account for fuzziness of
+ its calculations) to call window.SetClientSize(child.GetSize())
+ instead of calling Fit.
+ """
return _core.Window_Fit(*args, **kwargs)
def FitInside(*args, **kwargs):
- """FitInside()"""
+ """
+ FitInside()
+
+ Similar to Fit, but sizes the interior (virtual) size of a
+ window. Mainly useful with scrolled windows to reset scrollbars after
+ sizing changes that do not trigger a size event, and/or scrolled
+ windows without an interior sizer. This function similarly won't do
+ anything if there are no subwindows.
+ """
return _core.Window_FitInside(*args, **kwargs)
- def SetSizeHints(*args, **kwargs):
- """SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
- int incH=-1)"""
- return _core.Window_SetSizeHints(*args, **kwargs)
+ def SetSizeHints(*args):
+ """
+ SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
+ int incH=-1)
+ SetSizeHints(Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
+
+ Allows specification of minimum and maximum window sizes, and window
+ size increments. If a pair of values is not set (or set to -1), the
+ default values will be used. If this function is called, the user
+ will not be able to size the window outside the given bounds. The
+ resizing increments are only significant under Motif or Xt.
+ """
+ return _core.Window_SetSizeHints(*args)
- def SetVirtualSizeHints(*args, **kwargs):
- """SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)"""
- return _core.Window_SetVirtualSizeHints(*args, **kwargs)
+ def SetVirtualSizeHints(*args):
+ """
+ SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1)
+ SetVirtualSizeHints(Size minSize, Size maxSize=DefaultSize)
+
+ Allows specification of minimum and maximum virtual window sizes. If a
+ pair of values is not set (or set to -1), the default values will be
+ used. If this function is called, the user will not be able to size
+ the virtual area of the window outside the given bounds.
+ """
+ return _core.Window_SetVirtualSizeHints(*args)
def GetMinWidth(*args, **kwargs):
"""GetMinWidth() -> int"""
"""GetMaxSize() -> Size"""
return _core.Window_GetMaxSize(*args, **kwargs)
+ def GetMinSize(*args, **kwargs):
+ """GetMinSize() -> Size"""
+ return _core.Window_GetMinSize(*args, **kwargs)
+
def SetVirtualSize(*args, **kwargs):
- """SetVirtualSize(Size size)
+ """
+ SetVirtualSize(Size size)
-Set the the virtual size of a window. For most windows this is just the
-client area of the window, but for some like scrolled windows it is more or
-less independent of the screen window size."""
+ Set the the virtual size of a window in pixels. For most windows this
+ is just the client area of the window, but for some like scrolled
+ windows it is more or less independent of the screen window size.
+ """
return _core.Window_SetVirtualSize(*args, **kwargs)
def SetVirtualSizeWH(*args, **kwargs):
- """SetVirtualSizeWH(int w, int h)
+ """
+ SetVirtualSizeWH(int w, int h)
-Set the the virtual size of a window. For most windows this is just the
-client area of the window, but for some like scrolled windows it is more or
-less independent of the screen window size."""
+ Set the the virtual size of a window in pixels. For most windows this
+ is just the client area of the window, but for some like scrolled
+ windows it is more or less independent of the screen window size.
+ """
return _core.Window_SetVirtualSizeWH(*args, **kwargs)
def GetVirtualSize(*args, **kwargs):
- """GetVirtualSize() -> Size
+ """
+ GetVirtualSize() -> Size
-Get the the virtual size of the window. For most windows this is just
-the client area of the window, but for some like scrolled windows it is
-more or less independent of the screen window size."""
+ Get the the virtual size of the window in pixels. For most windows
+ this is just the client area of the window, but for some like scrolled
+ windows it is more or less independent of the screen window size.
+ """
return _core.Window_GetVirtualSize(*args, **kwargs)
def GetVirtualSizeTuple(*args, **kwargs):
- """GetVirtualSizeTuple() -> (width, height)
+ """
+ GetVirtualSizeTuple() -> (width, height)
-Get the the virtual size of the window. For most windows this is just
-the client area of the window, but for some like scrolled windows it is
-more or less independent of the screen window size."""
+ Get the the virtual size of the window in pixels. For most windows
+ this is just the client area of the window, but for some like scrolled
+ windows it is more or less independent of the screen window size.
+ """
return _core.Window_GetVirtualSizeTuple(*args, **kwargs)
def GetBestVirtualSize(*args, **kwargs):
- """GetBestVirtualSize() -> Size"""
+ """
+ GetBestVirtualSize() -> Size
+
+ Return the largest of ClientSize and BestSize (as determined by a
+ sizer, interior children, or other means)
+ """
return _core.Window_GetBestVirtualSize(*args, **kwargs)
def Show(*args, **kwargs):
- """Show(bool show=True) -> bool"""
+ """
+ Show(bool show=True) -> bool
+
+ Shows or hides the window. You may need to call Raise for a top level
+ window if you want to bring it to top, although this is not needed if
+ Show is called immediately after the frame creation. Returns True if
+ the window has been shown or hidden or False if nothing was done
+ because it already was in the requested state.
+ """
return _core.Window_Show(*args, **kwargs)
def Hide(*args, **kwargs):
- """Hide() -> bool"""
+ """
+ Hide() -> bool
+
+ Equivalent to calling Show(False).
+ """
return _core.Window_Hide(*args, **kwargs)
def Enable(*args, **kwargs):
- """Enable(bool enable=True) -> bool"""
+ """
+ Enable(bool enable=True) -> bool
+
+ Enable or disable the window for user input. Note that when a parent
+ window is disabled, all of its children are disabled as well and they
+ are reenabled again when the parent is. Returns true if the window
+ has been enabled or disabled, false if nothing was done, i.e. if the
+ window had already been in the specified state.
+ """
return _core.Window_Enable(*args, **kwargs)
def Disable(*args, **kwargs):
- """Disable() -> bool"""
+ """
+ Disable() -> bool
+
+ Disables the window, same as Enable(false).
+ """
return _core.Window_Disable(*args, **kwargs)
def IsShown(*args, **kwargs):
- """IsShown() -> bool"""
+ """
+ IsShown() -> bool
+
+ Returns true if the window is shown, false if it has been hidden.
+ """
return _core.Window_IsShown(*args, **kwargs)
def IsEnabled(*args, **kwargs):
- """IsEnabled() -> bool"""
+ """
+ IsEnabled() -> bool
+
+ Returns true if the window is enabled for input, false otherwise.
+ """
return _core.Window_IsEnabled(*args, **kwargs)
def SetWindowStyleFlag(*args, **kwargs):
- """SetWindowStyleFlag(long style)"""
+ """
+ SetWindowStyleFlag(long style)
+
+ Sets the style of the window. Please note that some styles cannot be
+ changed after the window creation and that Refresh() might be called
+ after changing the others for the change to take place immediately.
+ """
return _core.Window_SetWindowStyleFlag(*args, **kwargs)
def GetWindowStyleFlag(*args, **kwargs):
- """GetWindowStyleFlag() -> long"""
- return _core.Window_GetWindowStyleFlag(*args, **kwargs)
-
- def SetWindowStyle(*args, **kwargs):
- """SetWindowStyle(long style)"""
- return _core.Window_SetWindowStyle(*args, **kwargs)
+ """
+ GetWindowStyleFlag() -> long
- def GetWindowStyle(*args, **kwargs):
- """GetWindowStyle() -> long"""
- return _core.Window_GetWindowStyle(*args, **kwargs)
+ Gets the window style that was passed to the constructor or Create
+ method.
+ """
+ return _core.Window_GetWindowStyleFlag(*args, **kwargs)
+ SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
def HasFlag(*args, **kwargs):
- """HasFlag(int flag) -> bool"""
+ """
+ HasFlag(int flag) -> bool
+
+ Test if the given style is set for this window.
+ """
return _core.Window_HasFlag(*args, **kwargs)
def IsRetained(*args, **kwargs):
- """IsRetained() -> bool"""
+ """
+ IsRetained() -> bool
+
+ Returns true if the window is retained, false otherwise. Retained
+ windows are only available on X platforms.
+ """
return _core.Window_IsRetained(*args, **kwargs)
def SetExtraStyle(*args, **kwargs):
- """SetExtraStyle(long exStyle)"""
+ """
+ SetExtraStyle(long exStyle)
+
+ Sets the extra style bits for the window. Extra styles are the less
+ often used style bits which can't be set with the constructor or with
+ SetWindowStyleFlag()
+ """
return _core.Window_SetExtraStyle(*args, **kwargs)
def GetExtraStyle(*args, **kwargs):
- """GetExtraStyle() -> long"""
+ """
+ GetExtraStyle() -> long
+
+ Returns the extra style bits for the window.
+ """
return _core.Window_GetExtraStyle(*args, **kwargs)
def MakeModal(*args, **kwargs):
- """MakeModal(bool modal=True)"""
+ """
+ MakeModal(bool modal=True)
+
+ Disables all other windows in the application so that the user can
+ only interact with this window. Passing False will reverse this
+ effect.
+ """
return _core.Window_MakeModal(*args, **kwargs)
def SetThemeEnabled(*args, **kwargs):
- """SetThemeEnabled(bool enableTheme)"""
+ """
+ SetThemeEnabled(bool enableTheme)
+
+ This function tells a window if it should use the system's "theme"
+ code to draw the windows' background instead if its own background
+ drawing code. This will only have an effect on platforms that support
+ the notion of themes in user defined windows. One such platform is
+ GTK+ where windows can have (very colourful) backgrounds defined by a
+ user's selected theme.
+
+ Dialogs, notebook pages and the status bar have this flag set to true
+ by default so that the default look and feel is simulated best.
+ """
return _core.Window_SetThemeEnabled(*args, **kwargs)
def GetThemeEnabled(*args, **kwargs):
- """GetThemeEnabled() -> bool"""
- return _core.Window_GetThemeEnabled(*args, **kwargs)
+ """
+ GetThemeEnabled() -> bool
- def ShouldInheritColours(*args, **kwargs):
- """ShouldInheritColours() -> bool"""
- return _core.Window_ShouldInheritColours(*args, **kwargs)
+ Return the themeEnabled flag.
+ """
+ return _core.Window_GetThemeEnabled(*args, **kwargs)
def SetFocus(*args, **kwargs):
- """SetFocus()"""
+ """
+ SetFocus()
+
+ Set's the focus to this window, allowing it to receive keyboard input.
+ """
return _core.Window_SetFocus(*args, **kwargs)
def SetFocusFromKbd(*args, **kwargs):
- """SetFocusFromKbd()"""
+ """
+ SetFocusFromKbd()
+
+ Set focus to this window as the result of a keyboard action. Normally
+ only called internally.
+ """
return _core.Window_SetFocusFromKbd(*args, **kwargs)
def FindFocus(*args, **kwargs):
- """Window.FindFocus() -> Window"""
+ """
+ FindFocus() -> Window
+
+ Returns the window or control that currently has the keyboard focus,
+ or None.
+ """
return _core.Window_FindFocus(*args, **kwargs)
FindFocus = staticmethod(FindFocus)
def AcceptsFocus(*args, **kwargs):
- """AcceptsFocus() -> bool"""
+ """
+ AcceptsFocus() -> bool
+
+ Can this window have focus?
+ """
return _core.Window_AcceptsFocus(*args, **kwargs)
def AcceptsFocusFromKeyboard(*args, **kwargs):
- """AcceptsFocusFromKeyboard() -> bool"""
+ """
+ AcceptsFocusFromKeyboard() -> bool
+
+ Can this window be given focus by keyboard navigation? if not, the
+ only way to give it focus (provided it accepts it at all) is to click
+ it.
+ """
return _core.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
def GetDefaultItem(*args, **kwargs):
- """GetDefaultItem() -> Window"""
+ """
+ GetDefaultItem() -> Window
+
+ Get the default child of this parent, i.e. the one which is activated
+ by pressing <Enter> such as the OK button on a wx.Dialog.
+ """
return _core.Window_GetDefaultItem(*args, **kwargs)
def SetDefaultItem(*args, **kwargs):
- """SetDefaultItem(Window child) -> Window"""
+ """
+ SetDefaultItem(Window child) -> Window
+
+ Set this child as default, return the old default.
+ """
return _core.Window_SetDefaultItem(*args, **kwargs)
def SetTmpDefaultItem(*args, **kwargs):
- """SetTmpDefaultItem(Window win)"""
+ """
+ SetTmpDefaultItem(Window win)
+
+ Set this child as temporary default
+ """
return _core.Window_SetTmpDefaultItem(*args, **kwargs)
def GetChildren(*args, **kwargs):
- """GetChildren() -> PyObject"""
+ """
+ GetChildren() -> PyObject
+
+ Returns a list of the window's children. NOTE: Currently this is a
+ copy of the child window list maintained by the window, so the return
+ value of this function is only valid as long as the window's children
+ do not change.
+ """
return _core.Window_GetChildren(*args, **kwargs)
def GetParent(*args, **kwargs):
- """GetParent() -> Window"""
+ """
+ GetParent() -> Window
+
+ Returns the parent window of this window, or None if there isn't one.
+ """
return _core.Window_GetParent(*args, **kwargs)
def GetGrandParent(*args, **kwargs):
- """GetGrandParent() -> Window"""
+ """
+ GetGrandParent() -> Window
+
+ Returns the parent of the parent of this window, or None if there isn't one.
+ """
return _core.Window_GetGrandParent(*args, **kwargs)
def IsTopLevel(*args, **kwargs):
- """IsTopLevel() -> bool"""
+ """
+ IsTopLevel() -> bool
+
+ Returns true if the given window is a top-level one. Currently all
+ frames and dialogs are always considered to be top-level windows (even
+ if they have a parent window).
+ """
return _core.Window_IsTopLevel(*args, **kwargs)
def Reparent(*args, **kwargs):
- """Reparent(Window newParent) -> bool"""
+ """
+ Reparent(Window newParent) -> bool
+
+ Reparents the window, i.e the window will be removed from its current
+ parent window (e.g. a non-standard toolbar in a wxFrame) and then
+ re-inserted into another. Available on Windows and GTK. Returns True
+ if the parent was changed, False otherwise (error or newParent ==
+ oldParent)
+ """
return _core.Window_Reparent(*args, **kwargs)
def AddChild(*args, **kwargs):
- """AddChild(Window child)"""
+ """
+ AddChild(Window child)
+
+ Adds a child window. This is called automatically by window creation
+ functions so should not be required by the application programmer.
+ """
return _core.Window_AddChild(*args, **kwargs)
def RemoveChild(*args, **kwargs):
- """RemoveChild(Window child)"""
+ """
+ RemoveChild(Window child)
+
+ Removes a child window. This is called automatically by window
+ deletion functions so should not be required by the application
+ programmer.
+ """
return _core.Window_RemoveChild(*args, **kwargs)
def FindWindowById(*args, **kwargs):
- """FindWindowById(long winid) -> Window"""
+ """
+ FindWindowById(long winid) -> Window
+
+ Find a chld of this window by window ID
+ """
return _core.Window_FindWindowById(*args, **kwargs)
def FindWindowByName(*args, **kwargs):
- """FindWindowByName(wxString name) -> Window"""
+ """
+ FindWindowByName(String name) -> Window
+
+ Find a child of this window by name
+ """
return _core.Window_FindWindowByName(*args, **kwargs)
def GetEventHandler(*args, **kwargs):
- """GetEventHandler() -> EvtHandler"""
+ """
+ GetEventHandler() -> EvtHandler
+
+ Returns the event handler for this window. By default, the window is
+ its own event handler.
+ """
return _core.Window_GetEventHandler(*args, **kwargs)
def SetEventHandler(*args, **kwargs):
- """SetEventHandler(EvtHandler handler)"""
+ """
+ SetEventHandler(EvtHandler handler)
+
+ Sets the event handler for this window. An event handler is an object
+ that is capable of processing the events sent to a window. By default,
+ the window is its own event handler, but an application may wish to
+ substitute another, for example to allow central implementation of
+ event-handling for a variety of different window classes.
+
+ It is usually better to use wx.Window.PushEventHandler since this sets
+ up a chain of event handlers, where an event not handled by one event
+ handler is handed to the next one in the chain.
+ """
return _core.Window_SetEventHandler(*args, **kwargs)
def PushEventHandler(*args, **kwargs):
- """PushEventHandler(EvtHandler handler)"""
+ """
+ PushEventHandler(EvtHandler handler)
+
+ Pushes this event handler onto the event handler stack for the window.
+ An event handler is an object that is capable of processing the events
+ sent to a window. By default, the window is its own event handler, but
+ an application may wish to substitute another, for example to allow
+ central implementation of event-handling for a variety of different
+ window classes.
+
+ wx.Window.PushEventHandler allows an application to set up a chain of
+ event handlers, where an event not handled by one event handler is
+ handed to the next one in the chain. Use wx.Window.PopEventHandler to
+ remove the event handler.
+ """
return _core.Window_PushEventHandler(*args, **kwargs)
def PopEventHandler(*args, **kwargs):
- """PopEventHandler(bool deleteHandler=False) -> EvtHandler"""
+ """
+ PopEventHandler(bool deleteHandler=False) -> EvtHandler
+
+ Removes and returns the top-most event handler on the event handler
+ stack. If deleteHandler is True then the wx.EvtHandler object will be
+ destroyed after it is popped.
+ """
return _core.Window_PopEventHandler(*args, **kwargs)
def RemoveEventHandler(*args, **kwargs):
- """RemoveEventHandler(EvtHandler handler) -> bool"""
+ """
+ RemoveEventHandler(EvtHandler handler) -> bool
+
+ Find the given handler in the event handler chain and remove (but
+ not delete) it from the event handler chain, return True if it was
+ found and False otherwise (this also results in an assert failure so
+ this function should only be called when the handler is supposed to
+ be there.)
+ """
return _core.Window_RemoveEventHandler(*args, **kwargs)
def SetValidator(*args, **kwargs):
- """SetValidator(Validator validator)"""
+ """
+ SetValidator(Validator validator)
+
+ Deletes the current validator (if any) and sets the window validator,
+ having called wx.Validator.Clone to create a new validator of this
+ type.
+ """
return _core.Window_SetValidator(*args, **kwargs)
def GetValidator(*args, **kwargs):
- """GetValidator() -> Validator"""
+ """
+ GetValidator() -> Validator
+
+ Returns a pointer to the current validator for the window, or None if
+ there is none.
+ """
return _core.Window_GetValidator(*args, **kwargs)
+ def Validate(*args, **kwargs):
+ """
+ Validate() -> bool
+
+ Validates the current values of the child controls using their
+ validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
+ extra style flag set, the method will also call Validate() of all
+ child windows. Returns false if any of the validations failed.
+ """
+ return _core.Window_Validate(*args, **kwargs)
+
+ def TransferDataToWindow(*args, **kwargs):
+ """
+ TransferDataToWindow() -> bool
+
+ Transfers values to child controls from data areas specified by
+ their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
+ extra style flag set, the method will also call
+ TransferDataToWindow() of all child windows.
+ """
+ return _core.Window_TransferDataToWindow(*args, **kwargs)
+
+ def TransferDataFromWindow(*args, **kwargs):
+ """
+ TransferDataFromWindow() -> bool
+
+ Transfers values from child controls to data areas specified by
+ their validators. Returns false if a transfer failed. If the
+ window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the
+ method will also call TransferDataFromWindow() of all child
+ windows.
+ """
+ return _core.Window_TransferDataFromWindow(*args, **kwargs)
+
+ def InitDialog(*args, **kwargs):
+ """
+ InitDialog()
+
+ Sends an EVT_INIT_DIALOG event, whose handler usually transfers
+ data to the dialog via validators.
+ """
+ return _core.Window_InitDialog(*args, **kwargs)
+
def SetAcceleratorTable(*args, **kwargs):
- """SetAcceleratorTable(wxAcceleratorTable accel)"""
+ """
+ SetAcceleratorTable(AcceleratorTable accel)
+
+ Sets the accelerator table for this window.
+ """
return _core.Window_SetAcceleratorTable(*args, **kwargs)
def GetAcceleratorTable(*args, **kwargs):
- """GetAcceleratorTable() -> wxAcceleratorTable"""
+ """
+ GetAcceleratorTable() -> AcceleratorTable
+
+ Gets the accelerator table for this window.
+ """
return _core.Window_GetAcceleratorTable(*args, **kwargs)
def RegisterHotKey(*args, **kwargs):
- """RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool"""
+ """
+ RegisterHotKey(int hotkeyId, int modifiers, int keycode) -> bool
+
+ Registers a system wide hotkey. Every time the user presses the hotkey
+ registered here, this window will receive a hotkey event. It will
+ receive the event even if the application is in the background and
+ does not have the input focus because the user is working with some
+ other application. To bind an event handler function to this hotkey
+ use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
+ hotkey was registered successfully.
+ """
return _core.Window_RegisterHotKey(*args, **kwargs)
def UnregisterHotKey(*args, **kwargs):
- """UnregisterHotKey(int hotkeyId) -> bool"""
+ """
+ UnregisterHotKey(int hotkeyId) -> bool
+
+ Unregisters a system wide hotkey.
+ """
return _core.Window_UnregisterHotKey(*args, **kwargs)
def ConvertDialogPointToPixels(*args, **kwargs):
- """ConvertDialogPointToPixels(Point pt) -> Point"""
+ """
+ ConvertDialogPointToPixels(Point pt) -> Point
+
+ Converts a point or size from dialog units to pixels. Dialog units
+ are used for maintaining a dialog's proportions even if the font
+ changes. For the x dimension, the dialog units are multiplied by the
+ average character width and then divided by 4. For the y dimension,
+ the dialog units are multiplied by the average character height and
+ then divided by 8.
+ """
return _core.Window_ConvertDialogPointToPixels(*args, **kwargs)
def ConvertDialogSizeToPixels(*args, **kwargs):
- """ConvertDialogSizeToPixels(Size sz) -> Size"""
+ """
+ ConvertDialogSizeToPixels(Size sz) -> Size
+
+ Converts a point or size from dialog units to pixels. Dialog units
+ are used for maintaining a dialog's proportions even if the font
+ changes. For the x dimension, the dialog units are multiplied by the
+ average character width and then divided by 4. For the y dimension,
+ the dialog units are multiplied by the average character height and
+ then divided by 8.
+ """
return _core.Window_ConvertDialogSizeToPixels(*args, **kwargs)
def DLG_PNT(*args, **kwargs):
- """DLG_PNT(Point pt) -> Point"""
+ """
+ DLG_PNT(Point pt) -> Point
+
+ Converts a point or size from dialog units to pixels. Dialog units
+ are used for maintaining a dialog's proportions even if the font
+ changes. For the x dimension, the dialog units are multiplied by the
+ average character width and then divided by 4. For the y dimension,
+ the dialog units are multiplied by the average character height and
+ then divided by 8.
+ """
return _core.Window_DLG_PNT(*args, **kwargs)
def DLG_SZE(*args, **kwargs):
- """DLG_SZE(Size sz) -> Size"""
+ """
+ DLG_SZE(Size sz) -> Size
+
+ Converts a point or size from dialog units to pixels. Dialog units
+ are used for maintaining a dialog's proportions even if the font
+ changes. For the x dimension, the dialog units are multiplied by the
+ average character width and then divided by 4. For the y dimension,
+ the dialog units are multiplied by the average character height and
+ then divided by 8.
+ """
return _core.Window_DLG_SZE(*args, **kwargs)
def ConvertPixelPointToDialog(*args, **kwargs):
return _core.Window_ConvertPixelSizeToDialog(*args, **kwargs)
def WarpPointer(*args, **kwargs):
- """WarpPointer(int x, int y)"""
+ """
+ WarpPointer(int x, int y)
+
+ Moves the pointer to the given position on the window.
+
+ NOTE: This function is not supported under Mac because Apple Human
+ Interface Guidelines forbid moving the mouse cursor programmatically.
+ """
return _core.Window_WarpPointer(*args, **kwargs)
def CaptureMouse(*args, **kwargs):
- """CaptureMouse()"""
+ """
+ CaptureMouse()
+
+ Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
+ release the capture.
+
+ Note that wxWindows maintains the stack of windows having captured the
+ mouse and when the mouse is released the capture returns to the window
+ which had had captured it previously and it is only really released if
+ there were no previous window. In particular, this means that you must
+ release the mouse as many times as you capture it.
+ """
return _core.Window_CaptureMouse(*args, **kwargs)
def ReleaseMouse(*args, **kwargs):
- """ReleaseMouse()"""
+ """
+ ReleaseMouse()
+
+ Releases mouse input captured with wx.Window.CaptureMouse.
+ """
return _core.Window_ReleaseMouse(*args, **kwargs)
def GetCapture(*args, **kwargs):
- """Window.GetCapture() -> Window"""
+ """
+ GetCapture() -> Window
+
+ Returns the window which currently captures the mouse or None
+ """
return _core.Window_GetCapture(*args, **kwargs)
GetCapture = staticmethod(GetCapture)
def HasCapture(*args, **kwargs):
- """HasCapture() -> bool"""
+ """
+ HasCapture() -> bool
+
+ Returns true if this window has the current mouse capture.
+ """
return _core.Window_HasCapture(*args, **kwargs)
def Refresh(*args, **kwargs):
- """Refresh(bool eraseBackground=True, Rect rect=None)"""
+ """
+ Refresh(bool eraseBackground=True, Rect rect=None)
+
+ Mark the specified rectangle (or the whole window) as "dirty" so it
+ will be repainted. Causes an EVT_PAINT event to be generated and sent
+ to the window.
+ """
return _core.Window_Refresh(*args, **kwargs)
def RefreshRect(*args, **kwargs):
- """RefreshRect(Rect rect)"""
+ """
+ RefreshRect(Rect rect)
+
+ 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.
+ """
return _core.Window_RefreshRect(*args, **kwargs)
def Update(*args, **kwargs):
- """Update()"""
+ """
+ Update()
+
+ Calling this method immediately repaints the invalidated area of the
+ 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
+ first if you want to immediately redraw the window (or some portion of
+ it) unconditionally.
+ """
return _core.Window_Update(*args, **kwargs)
def ClearBackground(*args, **kwargs):
- """ClearBackground()"""
+ """
+ ClearBackground()
+
+ Clears the window by filling it with the current background
+ colour. Does not cause an erase background event to be generated.
+ """
return _core.Window_ClearBackground(*args, **kwargs)
def Freeze(*args, **kwargs):
- """Freeze()"""
+ """
+ Freeze()
+
+ Freezes the window or, in other words, prevents any updates from taking place
+ on screen, the window is not redrawn at all. Thaw must be called to reenable
+ window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw
+ being delayed until all the nesting has been undone.
+
+ This method is useful for visual appearance optimization (for example,
+ it is a good idea to use it before inserting large amount of text into
+ a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
+ for all controls so it is mostly just a hint to wxWindows and not a
+ mandatory directive.
+ """
return _core.Window_Freeze(*args, **kwargs)
def Thaw(*args, **kwargs):
- """Thaw()"""
+ """
+ Thaw()
+
+ Reenables window updating after a previous call to Freeze. Calls to
+ Freeze/Thaw may be nested, so Thaw must be called the same number of times
+ that Freeze was before the window will be updated.
+ """
return _core.Window_Thaw(*args, **kwargs)
def PrepareDC(*args, **kwargs):
- """PrepareDC(wxDC dc)"""
+ """
+ PrepareDC(DC dc)
+
+ Call this function to prepare the device context for drawing a
+ scrolled image. It sets the device origin according to the current
+ scroll position.
+ """
return _core.Window_PrepareDC(*args, **kwargs)
def GetUpdateRegion(*args, **kwargs):
- """GetUpdateRegion() -> wxRegion"""
+ """
+ GetUpdateRegion() -> Region
+
+ Returns the region specifying which parts of the window have been
+ damaged. Should only be called within an EVT_PAINT handler.
+ """
return _core.Window_GetUpdateRegion(*args, **kwargs)
def GetUpdateClientRect(*args, **kwargs):
- """GetUpdateClientRect() -> Rect"""
+ """
+ GetUpdateClientRect() -> Rect
+
+ Get the update rectangle region bounding box in client coords.
+ """
return _core.Window_GetUpdateClientRect(*args, **kwargs)
def IsExposed(*args, **kwargs):
- """IsExposed(int x, int y, int w=1, int h=1) -> bool"""
+ """
+ IsExposed(int x, int y, int w=1, int h=1) -> bool
+
+ Returns true if the given point or rectangle area has been exposed
+ since the last repaint. Call this in an paint event handler to
+ optimize redrawing by only redrawing those areas, which have been
+ exposed.
+ """
return _core.Window_IsExposed(*args, **kwargs)
def IsExposedPoint(*args, **kwargs):
- """IsExposedPoint(Point pt) -> bool"""
+ """
+ IsExposedPoint(Point pt) -> bool
+
+ Returns true if the given point or rectangle area has been exposed
+ since the last repaint. Call this in an paint event handler to
+ optimize redrawing by only redrawing those areas, which have been
+ exposed.
+ """
return _core.Window_IsExposedPoint(*args, **kwargs)
- def isExposedRect(*args, **kwargs):
- """isExposedRect(Rect rect) -> bool"""
- return _core.Window_isExposedRect(*args, **kwargs)
+ def IsExposedRect(*args, **kwargs):
+ """
+ IsExposedRect(Rect rect) -> bool
+
+ Returns true if the given point or rectangle area has been exposed
+ since the last repaint. Call this in an paint event handler to
+ optimize redrawing by only redrawing those areas, which have been
+ exposed.
+ """
+ return _core.Window_IsExposedRect(*args, **kwargs)
+
+ def GetDefaultAttributes(*args, **kwargs):
+ """
+ GetDefaultAttributes() -> VisualAttributes
+
+ Get the default attributes for an instance of this class. This
+ is useful if you want to use the same font or colour in your own
+ control as in a standard control -- which is a much better idea
+ than hard coding specific colours or fonts which might look
+ completely out of place on the users system, especially if it
+ uses themes.
+ """
+ return _core.Window_GetDefaultAttributes(*args, **kwargs)
+ def GetClassDefaultAttributes(*args, **kwargs):
+ """
+ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+
+ Get the default attributes for this class. This is useful if
+ you want to use the same font or colour in your own control as
+ in a standard control -- which is a much better idea than hard
+ coding specific colours or fonts which might look completely out
+ of place on the users system, especially if it uses themes.
+
+ The variant parameter is only relevant under Mac currently and is
+ ignore under other platforms. Under Mac, it will change the size of the
+ returned font. See SetWindowVariant for more about this.
+ """
+ return _core.Window_GetClassDefaultAttributes(*args, **kwargs)
+
+ GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
def SetBackgroundColour(*args, **kwargs):
- """SetBackgroundColour(wxColour colour) -> bool"""
+ """
+ SetBackgroundColour(Colour colour) -> bool
+
+ Sets the background colour of the window. Returns True if the colour
+ was changed. The background colour is usually painted by the default
+ EVT_ERASE_BACKGROUND event handler function under Windows and
+ automatically under GTK.
+
+ Note that setting the background colour does not cause an immediate
+ refresh, so you may wish to call ClearBackground or Refresh after
+ calling this function.
+
+ Use this function with care under GTK+ as the new appearance of the
+ window might not look equally well when used with themes, i.e GTK+'s
+ ability to change its look as the user wishes with run-time loadable
+ modules.
+ """
return _core.Window_SetBackgroundColour(*args, **kwargs)
+ def SetDefaultBackgroundColour(*args, **kwargs):
+ """SetDefaultBackgroundColour(Colour colour)"""
+ return _core.Window_SetDefaultBackgroundColour(*args, **kwargs)
+
def SetForegroundColour(*args, **kwargs):
- """SetForegroundColour(wxColour colour) -> bool"""
+ """
+ SetForegroundColour(Colour colour) -> bool
+
+ Sets the foreground colour of the window. Returns True is the colour
+ was changed. The interpretation of foreground colour is dependent on
+ the window class; it may be the text colour or other colour, or it may
+ not be used at all.
+ """
return _core.Window_SetForegroundColour(*args, **kwargs)
+ def SetDefaultForegroundColour(*args, **kwargs):
+ """SetDefaultForegroundColour(Colour colour)"""
+ return _core.Window_SetDefaultForegroundColour(*args, **kwargs)
+
def GetBackgroundColour(*args, **kwargs):
- """GetBackgroundColour() -> wxColour"""
+ """
+ GetBackgroundColour() -> Colour
+
+ Returns the background colour of the window.
+ """
return _core.Window_GetBackgroundColour(*args, **kwargs)
def GetForegroundColour(*args, **kwargs):
- """GetForegroundColour() -> wxColour"""
+ """
+ GetForegroundColour() -> Colour
+
+ Returns the foreground colour of the window. The interpretation of
+ foreground colour is dependent on the window class; it may be the text
+ colour or other colour, or it may not be used at all.
+ """
return _core.Window_GetForegroundColour(*args, **kwargs)
def SetCursor(*args, **kwargs):
- """SetCursor(wxCursor cursor) -> bool"""
+ """
+ SetCursor(Cursor cursor) -> bool
+
+ Sets the window's cursor. Notice that the window cursor also sets it
+ for the children of the window implicitly.
+
+ The cursor may be wx.NullCursor in which case the window cursor will
+ be reset back to default.
+ """
return _core.Window_SetCursor(*args, **kwargs)
def GetCursor(*args, **kwargs):
- """GetCursor() -> wxCursor"""
+ """
+ GetCursor() -> Cursor
+
+ Return the cursor associated with this window.
+ """
return _core.Window_GetCursor(*args, **kwargs)
def SetFont(*args, **kwargs):
- """SetFont(wxFont font) -> bool"""
+ """
+ SetFont(Font font) -> bool
+
+ Sets the font for this window.
+ """
return _core.Window_SetFont(*args, **kwargs)
+ def SetDefaultFont(*args, **kwargs):
+ """SetDefaultFont(Font font)"""
+ return _core.Window_SetDefaultFont(*args, **kwargs)
+
def GetFont(*args, **kwargs):
- """GetFont() -> wxFont"""
+ """
+ GetFont() -> Font
+
+ Returns the default font used for this window.
+ """
return _core.Window_GetFont(*args, **kwargs)
def SetCaret(*args, **kwargs):
- """SetCaret(wxCaret caret)"""
+ """
+ SetCaret(Caret caret)
+
+ Sets the caret associated with the window.
+ """
return _core.Window_SetCaret(*args, **kwargs)
def GetCaret(*args, **kwargs):
- """GetCaret() -> wxCaret"""
+ """
+ GetCaret() -> Caret
+
+ Returns the caret associated with the window.
+ """
return _core.Window_GetCaret(*args, **kwargs)
def GetCharHeight(*args, **kwargs):
- """GetCharHeight() -> int"""
+ """
+ GetCharHeight() -> int
+
+ Get the (average) character size for the current font.
+ """
return _core.Window_GetCharHeight(*args, **kwargs)
def GetCharWidth(*args, **kwargs):
- """GetCharWidth() -> int"""
+ """
+ GetCharWidth() -> int
+
+ Get the (average) character size for the current font.
+ """
return _core.Window_GetCharWidth(*args, **kwargs)
def GetTextExtent(*args, **kwargs):
- """GetTextExtent(wxString string) -> (width, height)
+ """
+ GetTextExtent(String string) -> (width, height)
-Get the width and height of the text using the current font."""
+ Get the width and height of the text using the current font.
+ """
return _core.Window_GetTextExtent(*args, **kwargs)
def GetFullTextExtent(*args, **kwargs):
- """GetFullTextExtent(wxString string, Font font=None) ->
- (width, height, descent, externalLeading)
+ """
+ GetFullTextExtent(String string, Font font=None) ->
+ (width, height, descent, externalLeading)
-Get the width, height, decent and leading of the text using the current or specified font."""
+ Get the width, height, decent and leading of the text using the
+ current or specified font.
+ """
return _core.Window_GetFullTextExtent(*args, **kwargs)
def ClientToScreenXY(*args, **kwargs):
- """ClientToScreenXY(int x, int y)"""
+ """
+ ClientToScreenXY(int x, int y) -> (x,y)
+
+ Converts to screen coordinates from coordinates relative to this window.
+ """
return _core.Window_ClientToScreenXY(*args, **kwargs)
def ScreenToClientXY(*args, **kwargs):
- """ScreenToClientXY(int x, int y)"""
+ """
+ ScreenToClientXY(int x, int y) -> (x,y)
+
+ Converts from screen to client window coordinates.
+ """
return _core.Window_ScreenToClientXY(*args, **kwargs)
def ClientToScreen(*args, **kwargs):
- """ClientToScreen(Point pt) -> Point"""
+ """
+ ClientToScreen(Point pt) -> Point
+
+ Converts to screen coordinates from coordinates relative to this window.
+ """
return _core.Window_ClientToScreen(*args, **kwargs)
def ScreenToClient(*args, **kwargs):
- """ScreenToClient(Point pt) -> Point"""
+ """
+ ScreenToClient(Point pt) -> Point
+
+ Converts from screen to client window coordinates.
+ """
return _core.Window_ScreenToClient(*args, **kwargs)
def HitTestXY(*args, **kwargs):
- """HitTestXY(int x, int y) -> wxHitTest"""
+ """
+ HitTestXY(int x, int y) -> int
+
+ Test where the given (in client coords) point lies
+ """
return _core.Window_HitTestXY(*args, **kwargs)
def HitTest(*args, **kwargs):
- """HitTest(Point pt) -> wxHitTest"""
+ """
+ HitTest(Point pt) -> int
+
+ Test where the given (in client coords) point lies
+ """
return _core.Window_HitTest(*args, **kwargs)
- def GetBorderFlags(*args, **kwargs):
- """GetBorderFlags(long flags) -> wxBorder"""
- return _core.Window_GetBorderFlags(*args, **kwargs)
+ def GetBorder(*args):
+ """
+ GetBorder(long flags) -> int
+ GetBorder() -> int
- def GetBorder(*args, **kwargs):
- """GetBorder() -> wxBorder"""
- return _core.Window_GetBorder(*args, **kwargs)
+ Get border for the flags of this window
+ """
+ return _core.Window_GetBorder(*args)
def UpdateWindowUI(*args, **kwargs):
- """UpdateWindowUI(long flags=UPDATE_UI_NONE)"""
+ """
+ UpdateWindowUI(long flags=UPDATE_UI_NONE)
+
+ This function sends EVT_UPDATE_UI events to the window. The particular
+ implementation depends on the window; for example a wx.ToolBar will
+ send an update UI event for each toolbar button, and a wx.Frame will
+ send an update UI event for each menubar menu item. You can call this
+ function from your application to ensure that your UI is up-to-date at
+ a particular point in time (as far as your EVT_UPDATE_UI handlers are
+ concerned). This may be necessary if you have called
+ wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
+ limit the overhead that wxWindows incurs by sending update UI events
+ in idle time.
+
+ The flags should be a bitlist of one or more of the following values:
+
+ wx.UPDATE_UI_NONE No particular value
+ wx.UPDATE_UI_RECURSE Call the function for descendants
+ wx.UPDATE_UI_FROMIDLE Invoked from OnIdle
+
+ If you are calling this function from an OnIdle function, make sure
+ you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to
+ only update the UI elements that need to be updated in idle time. Some
+ windows update their elements only when necessary, for example when a
+ menu is about to be shown. The following is an example of how to call
+ UpdateWindowUI from an idle function.
+
+ def OnIdle(self, evt):
+ if wx.UpdateUIEvent.CanUpdate(self):
+ self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE);
+
+ """
return _core.Window_UpdateWindowUI(*args, **kwargs)
def PopupMenuXY(*args, **kwargs):
- """PopupMenuXY(Menu menu, int x, int y) -> bool"""
+ """
+ PopupMenuXY(Menu menu, int x, int y) -> bool
+
+ Pops up the given menu at the specified coordinates, relative to this
+ window, and returns control when the user has dismissed the menu. If a
+ menu item is selected, the corresponding menu event is generated and
+ will be processed as usual.
+ """
return _core.Window_PopupMenuXY(*args, **kwargs)
def PopupMenu(*args, **kwargs):
- """PopupMenu(Menu menu, Point pos) -> bool"""
+ """
+ PopupMenu(Menu menu, Point pos) -> bool
+
+ Pops up the given menu at the specified coordinates, relative to this
+ window, and returns control when the user has dismissed the menu. If a
+ menu item is selected, the corresponding menu event is generated and
+ will be processed as usual.
+ """
return _core.Window_PopupMenu(*args, **kwargs)
def GetHandle(*args, **kwargs):
- """GetHandle() -> long"""
+ """
+ GetHandle() -> long
+
+ Returns the platform-specific handle (as a long integer) of the
+ physical window. Currently on wxMac it returns the handle of the
+ toplevel parent of the window.
+ """
return _core.Window_GetHandle(*args, **kwargs)
def HasScrollbar(*args, **kwargs):
- """HasScrollbar(int orient) -> bool"""
+ """
+ HasScrollbar(int orient) -> bool
+
+ Does the window have the scrollbar for this orientation?
+ """
return _core.Window_HasScrollbar(*args, **kwargs)
def SetScrollbar(*args, **kwargs):
- """SetScrollbar(int orient, int pos, int thumbvisible, int range, bool refresh=True)"""
+ """
+ SetScrollbar(int orientation, int pos, int thumbvisible, int range,
+ bool refresh=True)
+
+ Sets the scrollbar properties of a built-in scrollbar.
+
+ orientation: Determines the scrollbar whose page size is to be
+ set. May be wx.HORIZONTAL or wx.VERTICAL.
+
+ position: The position of the scrollbar in scroll units.
+
+ thumbSize: The size of the thumb, or visible portion of the
+ scrollbar, in scroll units.
+
+ range: The maximum position of the scrollbar.
+
+ refresh: True to redraw the scrollbar, false otherwise.
+ """
return _core.Window_SetScrollbar(*args, **kwargs)
def SetScrollPos(*args, **kwargs):
- """SetScrollPos(int orient, int pos, bool refresh=True)"""
+ """
+ SetScrollPos(int orientation, int pos, bool refresh=True)
+
+ Sets the position of one of the built-in scrollbars.
+ """
return _core.Window_SetScrollPos(*args, **kwargs)
def GetScrollPos(*args, **kwargs):
- """GetScrollPos(int orient) -> int"""
+ """
+ GetScrollPos(int orientation) -> int
+
+ Returns the built-in scrollbar position.
+ """
return _core.Window_GetScrollPos(*args, **kwargs)
def GetScrollThumb(*args, **kwargs):
- """GetScrollThumb(int orient) -> int"""
+ """
+ GetScrollThumb(int orientation) -> int
+
+ Returns the built-in scrollbar thumb size.
+ """
return _core.Window_GetScrollThumb(*args, **kwargs)
def GetScrollRange(*args, **kwargs):
- """GetScrollRange(int orient) -> int"""
+ """
+ GetScrollRange(int orientation) -> int
+
+ Returns the built-in scrollbar range.
+ """
return _core.Window_GetScrollRange(*args, **kwargs)
def ScrollWindow(*args, **kwargs):
- """ScrollWindow(int dx, int dy, Rect rect=None)"""
+ """
+ ScrollWindow(int dx, int dy, Rect rect=None)
+
+ Physically scrolls the pixels in the window and move child windows
+ accordingly. Use this function to optimise your scrolling
+ implementations, to minimise the area that must be redrawn. Note that
+ it is rarely required to call this function from a user program.
+
+ dx: Amount to scroll horizontally.
+
+ dy: Amount to scroll vertically.
+
+ rect: Rectangle to invalidate. If this is None, the whole window
+ is invalidated. If you pass a rectangle corresponding to the
+ area of the window exposed by the scroll, your painting
+ handler can optimize painting by checking for the
+ invalidated region.
+ """
return _core.Window_ScrollWindow(*args, **kwargs)
def ScrollLines(*args, **kwargs):
- """ScrollLines(int lines) -> bool"""
+ """
+ ScrollLines(int lines) -> bool
+
+ If the platform and window class supports it, scrolls the window by
+ the given number of lines down, if lines is positive, or up if lines
+ is negative. Returns True if the window was scrolled, False if it was
+ already on top/bottom and nothing was done.
+ """
return _core.Window_ScrollLines(*args, **kwargs)
def ScrollPages(*args, **kwargs):
- """ScrollPages(int pages) -> bool"""
+ """
+ ScrollPages(int pages) -> bool
+
+ If the platform and window class supports it, scrolls the window by
+ the given number of pages down, if pages is positive, or up if pages
+ is negative. Returns True if the window was scrolled, False if it was
+ already on top/bottom and nothing was done.
+ """
return _core.Window_ScrollPages(*args, **kwargs)
def LineUp(*args, **kwargs):
- """LineUp() -> bool"""
+ """
+ LineUp() -> bool
+
+ This is just a wrapper for ScrollLines(-1).
+ """
return _core.Window_LineUp(*args, **kwargs)
def LineDown(*args, **kwargs):
- """LineDown() -> bool"""
+ """
+ LineDown() -> bool
+
+ This is just a wrapper for ScrollLines(1).
+ """
return _core.Window_LineDown(*args, **kwargs)
def PageUp(*args, **kwargs):
- """PageUp() -> bool"""
+ """
+ PageUp() -> bool
+
+ This is just a wrapper for ScrollPages(-1).
+ """
return _core.Window_PageUp(*args, **kwargs)
def PageDown(*args, **kwargs):
- """PageDown() -> bool"""
+ """
+ PageDown() -> bool
+
+ This is just a wrapper for ScrollPages(1).
+ """
return _core.Window_PageDown(*args, **kwargs)
def SetHelpText(*args, **kwargs):
- """SetHelpText(wxString text)"""
+ """
+ SetHelpText(String text)
+
+ Sets the help text to be used as context-sensitive help for this
+ window. Note that the text is actually stored by the current
+ wxHelpProvider implementation, and not in the window object itself.
+ """
return _core.Window_SetHelpText(*args, **kwargs)
def SetHelpTextForId(*args, **kwargs):
- """SetHelpTextForId(wxString text)"""
+ """
+ SetHelpTextForId(String text)
+
+ Associate this help text with all windows with the same id as this
+ one.
+ """
return _core.Window_SetHelpTextForId(*args, **kwargs)
def GetHelpText(*args, **kwargs):
- """GetHelpText() -> wxString"""
+ """
+ GetHelpText() -> String
+
+ Gets the help text to be used as context-sensitive help for this
+ window. Note that the text is actually stored by the current
+ wxHelpProvider implementation, and not in the window object itself.
+ """
return _core.Window_GetHelpText(*args, **kwargs)
def SetToolTipString(*args, **kwargs):
- """SetToolTipString(wxString tip)"""
+ """
+ SetToolTipString(String tip)
+
+ Attach a tooltip to the window.
+ """
return _core.Window_SetToolTipString(*args, **kwargs)
def SetToolTip(*args, **kwargs):
- """SetToolTip(wxToolTip tip)"""
+ """
+ SetToolTip(ToolTip tip)
+
+ Attach a tooltip to the window.
+ """
return _core.Window_SetToolTip(*args, **kwargs)
def GetToolTip(*args, **kwargs):
- """GetToolTip() -> wxToolTip"""
+ """
+ GetToolTip() -> ToolTip
+
+ get the associated tooltip or None if none
+ """
return _core.Window_GetToolTip(*args, **kwargs)
def SetDropTarget(*args, **kwargs):
- """SetDropTarget(wxDropTarget dropTarget)"""
- val = _core.Window_SetDropTarget(*args, **kwargs)
- args[1].thisown = 0
- return val
+ """
+ SetDropTarget(DropTarget dropTarget)
+
+ Associates a drop target with this window. If the window already has
+ a drop target, it is deleted.
+ """
+ return _core.Window_SetDropTarget(*args, **kwargs)
def GetDropTarget(*args, **kwargs):
- """GetDropTarget() -> wxDropTarget"""
+ """
+ GetDropTarget() -> DropTarget
+
+ Returns the associated drop target, which may be None.
+ """
return _core.Window_GetDropTarget(*args, **kwargs)
def SetConstraints(*args, **kwargs):
- """SetConstraints(LayoutConstraints constraints)"""
+ """
+ SetConstraints(LayoutConstraints constraints)
+
+ Sets the window to have the given layout constraints. If an existing
+ layout constraints object is already owned by the window, it will be
+ deleted. Pass None to disassociate and delete the window's current
+ constraints.
+
+ You must call SetAutoLayout to tell a window to use the constraints
+ automatically in its default EVT_SIZE handler; otherwise, you must
+ handle EVT_SIZE yourself and call Layout() explicitly. When setting
+ both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
+ effect.
+ """
return _core.Window_SetConstraints(*args, **kwargs)
def GetConstraints(*args, **kwargs):
- """GetConstraints() -> LayoutConstraints"""
+ """
+ GetConstraints() -> LayoutConstraints
+
+ Returns a pointer to the window's layout constraints, or None if there
+ are none.
+ """
return _core.Window_GetConstraints(*args, **kwargs)
def SetAutoLayout(*args, **kwargs):
- """SetAutoLayout(bool autoLayout)"""
+ """
+ SetAutoLayout(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.
+ """
return _core.Window_SetAutoLayout(*args, **kwargs)
def GetAutoLayout(*args, **kwargs):
- """GetAutoLayout() -> bool"""
+ """
+ GetAutoLayout() -> bool
+
+ Returns the current autoLayout setting
+ """
return _core.Window_GetAutoLayout(*args, **kwargs)
def Layout(*args, **kwargs):
- """Layout() -> bool"""
+ """
+ Layout() -> bool
+
+ Invokes the constraint-based layout algorithm or the sizer-based
+ algorithm for this window. See SetAutoLayout: when auto layout is on,
+ this function gets called automatically by the default EVT_SIZE
+ handler when the window is resized.
+ """
return _core.Window_Layout(*args, **kwargs)
def SetSizer(*args, **kwargs):
- """SetSizer(Sizer sizer, bool deleteOld=True)"""
+ """
+ SetSizer(Sizer sizer, bool deleteOld=True)
+
+ Sets the window to have the given layout sizer. The window will then
+ own the object, and will take care of its deletion. If an existing
+ layout sizer object is already owned by the window, it will be deleted
+ if the deleteOld parameter is true. Note that this function will also
+ call SetAutoLayout implicitly with a True parameter if the sizer is
+ non-NoneL and False otherwise.
+ """
return _core.Window_SetSizer(*args, **kwargs)
def SetSizerAndFit(*args, **kwargs):
- """SetSizerAndFit(Sizer sizer, bool deleteOld=True)"""
+ """
+ SetSizerAndFit(Sizer sizer, bool deleteOld=True)
+
+ The same as SetSizer, except it also sets the size hints for the
+ window based on the sizer's minimum size.
+ """
return _core.Window_SetSizerAndFit(*args, **kwargs)
def GetSizer(*args, **kwargs):
- """GetSizer() -> Sizer"""
+ """
+ GetSizer() -> Sizer
+
+ Return the sizer associated with the window by a previous call to
+ SetSizer or None if there isn't one.
+ """
return _core.Window_GetSizer(*args, **kwargs)
def SetContainingSizer(*args, **kwargs):
- """SetContainingSizer(Sizer sizer)"""
+ """
+ SetContainingSizer(Sizer sizer)
+
+ This normally does not need to be called by application code. It is
+ called internally when a window is added to a sizer, and is used so
+ the window can remove itself from the sizer when it is destroyed.
+ """
return _core.Window_SetContainingSizer(*args, **kwargs)
def GetContainingSizer(*args, **kwargs):
- """GetContainingSizer() -> Sizer"""
+ """
+ GetContainingSizer() -> Sizer
+
+ Return the sizer that this window is a member of, if any, otherwise None.
+ """
return _core.Window_GetContainingSizer(*args, **kwargs)
def PostCreate(self, pre):
- """Phase 3 of the 2-phase create <wink!>
- Call this method after precreating the window with the 2-phase create method."""
+ """
+ Phase 3 of the 2-phase create <wink!>
+ Call this method after precreating the window with the 2-phase create method.
+ """
self.this = pre.this
self.thisown = pre.thisown
pre.thisown = 0
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = Window
_core.Window_swigregister(WindowPtr)
-PanelNameStr = cvar.PanelNameStr
def PreWindow(*args, **kwargs):
- """PreWindow() -> Window"""
+ """
+ PreWindow() -> Window
+
+ Precreate a Window for 2-phase creation.
+ """
val = _core.new_PreWindow(*args, **kwargs)
val.thisown = 1
return val
def Window_NewControlId(*args, **kwargs):
- """Window_NewControlId() -> int"""
+ """
+ Window_NewControlId() -> int
+
+ Generate a control id for the controls which were not given one.
+ """
return _core.Window_NewControlId(*args, **kwargs)
def Window_NextControlId(*args, **kwargs):
- """Window_NextControlId(int winid) -> int"""
+ """
+ Window_NextControlId(int winid) -> int
+
+ Get the id of the control following the one with the given
+ (autogenerated) id
+ """
return _core.Window_NextControlId(*args, **kwargs)
def Window_PrevControlId(*args, **kwargs):
- """Window_PrevControlId(int winid) -> int"""
+ """
+ Window_PrevControlId(int winid) -> int
+
+ Get the id of the control preceding the one with the given
+ (autogenerated) id
+ """
return _core.Window_PrevControlId(*args, **kwargs)
def Window_FindFocus(*args, **kwargs):
- """Window_FindFocus() -> Window"""
+ """
+ Window_FindFocus() -> Window
+
+ Returns the window or control that currently has the keyboard focus,
+ or None.
+ """
return _core.Window_FindFocus(*args, **kwargs)
def Window_GetCapture(*args, **kwargs):
- """Window_GetCapture() -> Window"""
+ """
+ Window_GetCapture() -> Window
+
+ Returns the window which currently captures the mouse or None
+ """
return _core.Window_GetCapture(*args, **kwargs)
+def Window_GetClassDefaultAttributes(*args, **kwargs):
+ """
+ Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+
+ Get the default attributes for this class. This is useful if
+ you want to use the same font or colour in your own control as
+ in a standard control -- which is a much better idea than hard
+ coding specific colours or fonts which might look completely out
+ of place on the users system, especially if it uses themes.
+
+ The variant parameter is only relevant under Mac currently and is
+ ignore under other platforms. Under Mac, it will change the size of the
+ returned font. See SetWindowVariant for more about this.
+ """
+ return _core.Window_GetClassDefaultAttributes(*args, **kwargs)
+
def DLG_PNT(win, point_or_x, y=None):
+ """
+ Convenience function for converting a Point or (x,y) in
+ dialog units to pixel units.
+ """
if y is None:
return win.ConvertDialogPointToPixels(point_or_x)
else:
- return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
+ return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
def DLG_SZE(win, size_width, height=None):
+ """
+ Convenience function for converting a Size or (w,h) in
+ dialog units to pixel units.
+ """
if height is None:
return win.ConvertDialogSizeToPixels(size_width)
else:
- return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
+ return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
def FindWindowById(*args, **kwargs):
- """FindWindowById(long id, Window parent=None) -> Window"""
+ """
+ FindWindowById(long id, Window parent=None) -> Window
+
+ Find the first window in the application with the given id. If parent
+ is None, the search will start from all top-level frames and dialog
+ boxes; if non-None, the search will be limited to the given window
+ hierarchy. The search is recursive in both cases.
+ """
return _core.FindWindowById(*args, **kwargs)
def FindWindowByName(*args, **kwargs):
- """FindWindowByName(wxString name, Window parent=None) -> Window"""
+ """
+ FindWindowByName(String name, Window parent=None) -> Window
+
+ Find a window by its name (as given in a window constructor or Create
+ function call). If parent is None, the search will start from all
+ top-level frames and dialog boxes; if non-None, the search will be
+ limited to the given window hierarchy. The search is recursive in both
+ cases.
+
+ If no window with such name is found, wx.FindWindowByLabel is called.
+ """
return _core.FindWindowByName(*args, **kwargs)
def FindWindowByLabel(*args, **kwargs):
- """FindWindowByLabel(wxString label, Window parent=None) -> Window"""
+ """
+ FindWindowByLabel(String label, Window parent=None) -> Window
+
+ Find a window by its label. Depending on the type of window, the label
+ may be a window title or panel item label. If parent is None, the
+ search will start from all top-level frames and dialog boxes; if
+ non-None, the search will be limited to the given window
+ hierarchy. The search is recursive in both cases.
+ """
return _core.FindWindowByLabel(*args, **kwargs)
def Window_FromHWND(*args, **kwargs):
- """Window_FromHWND(unsigned long hWnd) -> Window"""
+ """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
return _core.Window_FromHWND(*args, **kwargs)
#---------------------------------------------------------------------------
class Validator(EvtHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.Validator_SetWindow(*args, **kwargs)
def IsSilent(*args, **kwargs):
- """Validator.IsSilent() -> bool"""
+ """IsSilent() -> bool"""
return _core.Validator_IsSilent(*args, **kwargs)
IsSilent = staticmethod(IsSilent)
def SetBellOnError(*args, **kwargs):
- """Validator.SetBellOnError(int doIt=True)"""
+ """SetBellOnError(int doIt=True)"""
return _core.Validator_SetBellOnError(*args, **kwargs)
SetBellOnError = staticmethod(SetBellOnError)
return _core.Validator_SetBellOnError(*args, **kwargs)
class PyValidator(Validator):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class Menu(EvtHandler):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(wxString title=wxPyEmptyString, long style=0) -> Menu"""
+ """__init__(String title=EmptyString, long style=0) -> Menu"""
newobj = _core.new_Menu(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
self._setOORInfo(self)
def Append(*args, **kwargs):
- """Append(int itemid, wxString text, wxString help=wxPyEmptyString,
- wxItemKind kind=ITEM_NORMAL)"""
+ """Append(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
return _core.Menu_Append(*args, **kwargs)
def AppendSeparator(*args, **kwargs):
- """AppendSeparator()"""
+ """AppendSeparator() -> MenuItem"""
return _core.Menu_AppendSeparator(*args, **kwargs)
def AppendCheckItem(*args, **kwargs):
- """AppendCheckItem(int itemid, wxString text, wxString help=wxPyEmptyString)"""
+ """AppendCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
return _core.Menu_AppendCheckItem(*args, **kwargs)
def AppendRadioItem(*args, **kwargs):
- """AppendRadioItem(int itemid, wxString text, wxString help=wxPyEmptyString)"""
+ """AppendRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
return _core.Menu_AppendRadioItem(*args, **kwargs)
def AppendMenu(*args, **kwargs):
- """AppendMenu(int itemid, wxString text, Menu submenu, wxString help=wxPyEmptyString)"""
+ """AppendMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
return _core.Menu_AppendMenu(*args, **kwargs)
def AppendItem(*args, **kwargs):
- """AppendItem(MenuItem item)"""
+ """AppendItem(MenuItem item) -> MenuItem"""
return _core.Menu_AppendItem(*args, **kwargs)
def Break(*args, **kwargs):
return _core.Menu_Break(*args, **kwargs)
def InsertItem(*args, **kwargs):
- """InsertItem(size_t pos, MenuItem item) -> bool"""
+ """InsertItem(size_t pos, MenuItem item) -> MenuItem"""
return _core.Menu_InsertItem(*args, **kwargs)
def Insert(*args, **kwargs):
- """Insert(size_t pos, int itemid, wxString text, wxString help=wxPyEmptyString,
- wxItemKind kind=ITEM_NORMAL)"""
+ """
+ Insert(size_t pos, int id, String text, String help=EmptyString,
+ int kind=ITEM_NORMAL) -> MenuItem
+ """
return _core.Menu_Insert(*args, **kwargs)
def InsertSeparator(*args, **kwargs):
- """InsertSeparator(size_t pos)"""
+ """InsertSeparator(size_t pos) -> MenuItem"""
return _core.Menu_InsertSeparator(*args, **kwargs)
def InsertCheckItem(*args, **kwargs):
- """InsertCheckItem(size_t pos, int itemid, wxString text, wxString help=wxPyEmptyString)"""
+ """InsertCheckItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
return _core.Menu_InsertCheckItem(*args, **kwargs)
def InsertRadioItem(*args, **kwargs):
- """InsertRadioItem(size_t pos, int itemid, wxString text, wxString help=wxPyEmptyString)"""
+ """InsertRadioItem(size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
return _core.Menu_InsertRadioItem(*args, **kwargs)
def InsertMenu(*args, **kwargs):
- """InsertMenu(size_t pos, int itemid, wxString text, Menu submenu,
- wxString help=wxPyEmptyString)"""
+ """InsertMenu(size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
return _core.Menu_InsertMenu(*args, **kwargs)
def PrependItem(*args, **kwargs):
- """PrependItem(MenuItem item)"""
+ """PrependItem(MenuItem item) -> MenuItem"""
return _core.Menu_PrependItem(*args, **kwargs)
def Prepend(*args, **kwargs):
- """Prepend(int itemid, wxString text, wxString help=wxPyEmptyString,
- wxItemKind kind=ITEM_NORMAL)"""
+ """Prepend(int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
return _core.Menu_Prepend(*args, **kwargs)
def PrependSeparator(*args, **kwargs):
- """PrependSeparator()"""
+ """PrependSeparator() -> MenuItem"""
return _core.Menu_PrependSeparator(*args, **kwargs)
def PrependCheckItem(*args, **kwargs):
- """PrependCheckItem(int itemid, wxString text, wxString help=wxPyEmptyString)"""
+ """PrependCheckItem(int id, String text, String help=EmptyString) -> MenuItem"""
return _core.Menu_PrependCheckItem(*args, **kwargs)
def PrependRadioItem(*args, **kwargs):
- """PrependRadioItem(int itemid, wxString text, wxString help=wxPyEmptyString)"""
+ """PrependRadioItem(int id, String text, String help=EmptyString) -> MenuItem"""
return _core.Menu_PrependRadioItem(*args, **kwargs)
def PrependMenu(*args, **kwargs):
- """PrependMenu(int itemid, wxString text, Menu submenu, wxString help=wxPyEmptyString)"""
+ """PrependMenu(int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
return _core.Menu_PrependMenu(*args, **kwargs)
def Remove(*args, **kwargs):
- """Remove(int itemid) -> MenuItem"""
+ """Remove(int id) -> MenuItem"""
return _core.Menu_Remove(*args, **kwargs)
def RemoveItem(*args, **kwargs):
return _core.Menu_RemoveItem(*args, **kwargs)
def Delete(*args, **kwargs):
- """Delete(int itemid) -> bool"""
+ """Delete(int id) -> bool"""
return _core.Menu_Delete(*args, **kwargs)
def DeleteItem(*args, **kwargs):
return _core.Menu_DeleteItem(*args, **kwargs)
def Destroy(*args, **kwargs):
- """Destroy()
+ """
+ Destroy()
-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)
def DestroyId(*args, **kwargs):
- """DestroyId(int itemid) -> bool
+ """
+ DestroyId(int id) -> bool
-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)
def DestroyItem(*args, **kwargs):
- """DestroyItem(MenuItem item) -> bool
+ """
+ DestroyItem(MenuItem item) -> bool
-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)
def GetMenuItemCount(*args, **kwargs):
return _core.Menu_GetMenuItems(*args, **kwargs)
def FindItem(*args, **kwargs):
- """FindItem(wxString item) -> int"""
+ """FindItem(String item) -> int"""
return _core.Menu_FindItem(*args, **kwargs)
def FindItemById(*args, **kwargs):
- """FindItemById(int itemid) -> MenuItem"""
+ """FindItemById(int id) -> MenuItem"""
return _core.Menu_FindItemById(*args, **kwargs)
def FindItemByPosition(*args, **kwargs):
return _core.Menu_FindItemByPosition(*args, **kwargs)
def Enable(*args, **kwargs):
- """Enable(int itemid, bool enable)"""
+ """Enable(int id, bool enable)"""
return _core.Menu_Enable(*args, **kwargs)
def IsEnabled(*args, **kwargs):
- """IsEnabled(int itemid) -> bool"""
+ """IsEnabled(int id) -> bool"""
return _core.Menu_IsEnabled(*args, **kwargs)
def Check(*args, **kwargs):
- """Check(int itemid, bool check)"""
+ """Check(int id, bool check)"""
return _core.Menu_Check(*args, **kwargs)
def IsChecked(*args, **kwargs):
- """IsChecked(int itemid) -> bool"""
+ """IsChecked(int id) -> bool"""
return _core.Menu_IsChecked(*args, **kwargs)
def SetLabel(*args, **kwargs):
- """SetLabel(int itemid, wxString label)"""
+ """SetLabel(int id, String label)"""
return _core.Menu_SetLabel(*args, **kwargs)
def GetLabel(*args, **kwargs):
- """GetLabel(int itemid) -> wxString"""
+ """GetLabel(int id) -> String"""
return _core.Menu_GetLabel(*args, **kwargs)
def SetHelpString(*args, **kwargs):
- """SetHelpString(int itemid, wxString helpString)"""
+ """SetHelpString(int id, String helpString)"""
return _core.Menu_SetHelpString(*args, **kwargs)
def GetHelpString(*args, **kwargs):
- """GetHelpString(int itemid) -> wxString"""
+ """GetHelpString(int id) -> String"""
return _core.Menu_GetHelpString(*args, **kwargs)
def SetTitle(*args, **kwargs):
- """SetTitle(wxString title)"""
+ """SetTitle(String title)"""
return _core.Menu_SetTitle(*args, **kwargs)
def GetTitle(*args, **kwargs):
- """GetTitle() -> wxString"""
+ """GetTitle() -> String"""
return _core.Menu_GetTitle(*args, **kwargs)
def SetEventHandler(*args, **kwargs):
#---------------------------------------------------------------------------
class MenuBar(Window):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
self._setOORInfo(self)
def Append(*args, **kwargs):
- """Append(Menu menu, wxString title) -> bool"""
+ """Append(Menu menu, String title) -> bool"""
return _core.MenuBar_Append(*args, **kwargs)
def Insert(*args, **kwargs):
- """Insert(size_t pos, Menu menu, wxString title) -> bool"""
+ """Insert(size_t pos, Menu menu, String title) -> bool"""
return _core.MenuBar_Insert(*args, **kwargs)
def GetMenuCount(*args, **kwargs):
return _core.MenuBar_GetMenu(*args, **kwargs)
def Replace(*args, **kwargs):
- """Replace(size_t pos, Menu menu, wxString title) -> Menu"""
+ """Replace(size_t pos, Menu menu, String title) -> Menu"""
return _core.MenuBar_Replace(*args, **kwargs)
def Remove(*args, **kwargs):
return _core.MenuBar_IsEnabledTop(*args, **kwargs)
def SetLabelTop(*args, **kwargs):
- """SetLabelTop(size_t pos, wxString label)"""
+ """SetLabelTop(size_t pos, String label)"""
return _core.MenuBar_SetLabelTop(*args, **kwargs)
def GetLabelTop(*args, **kwargs):
- """GetLabelTop(size_t pos) -> wxString"""
+ """GetLabelTop(size_t pos) -> String"""
return _core.MenuBar_GetLabelTop(*args, **kwargs)
def FindMenuItem(*args, **kwargs):
- """FindMenuItem(wxString menu, wxString item) -> int"""
+ """FindMenuItem(String menu, String item) -> int"""
return _core.MenuBar_FindMenuItem(*args, **kwargs)
def FindItemById(*args, **kwargs):
- """FindItemById(int itemid) -> MenuItem"""
+ """FindItemById(int id) -> MenuItem"""
return _core.MenuBar_FindItemById(*args, **kwargs)
def FindMenu(*args, **kwargs):
- """FindMenu(wxString title) -> int"""
+ """FindMenu(String title) -> int"""
return _core.MenuBar_FindMenu(*args, **kwargs)
def Enable(*args, **kwargs):
- """Enable(int itemid, bool enable)"""
+ """Enable(int id, bool enable)"""
return _core.MenuBar_Enable(*args, **kwargs)
def Check(*args, **kwargs):
- """Check(int itemid, bool check)"""
+ """Check(int id, bool check)"""
return _core.MenuBar_Check(*args, **kwargs)
def IsChecked(*args, **kwargs):
- """IsChecked(int itemid) -> bool"""
+ """IsChecked(int id) -> bool"""
return _core.MenuBar_IsChecked(*args, **kwargs)
def IsEnabled(*args, **kwargs):
- """IsEnabled(int itemid) -> bool"""
+ """IsEnabled(int id) -> bool"""
return _core.MenuBar_IsEnabled(*args, **kwargs)
def SetLabel(*args, **kwargs):
- """SetLabel(int itemid, wxString label)"""
+ """SetLabel(int id, String label)"""
return _core.MenuBar_SetLabel(*args, **kwargs)
def GetLabel(*args, **kwargs):
- """GetLabel(int itemid) -> wxString"""
+ """GetLabel(int id) -> String"""
return _core.MenuBar_GetLabel(*args, **kwargs)
def SetHelpString(*args, **kwargs):
- """SetHelpString(int itemid, wxString helpString)"""
+ """SetHelpString(int id, String helpString)"""
return _core.MenuBar_SetHelpString(*args, **kwargs)
def GetHelpString(*args, **kwargs):
- """GetHelpString(int itemid) -> wxString"""
+ """GetHelpString(int id) -> String"""
return _core.MenuBar_GetHelpString(*args, **kwargs)
def GetFrame(*args, **kwargs):
#---------------------------------------------------------------------------
class MenuItem(Object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(Menu parentMenu=None, int id=ID_SEPARATOR, wxString text=wxPyEmptyString,
- wxString help=wxPyEmptyString,
- wxItemKind kind=ITEM_NORMAL, Menu subMenu=None) -> MenuItem"""
+ """
+ __init__(Menu parentMenu=None, int id=ID_SEPARATOR, String text=EmptyString,
+ String help=EmptyString, int kind=ITEM_NORMAL,
+ Menu subMenu=None) -> MenuItem
+ """
newobj = _core.new_MenuItem(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
return _core.MenuItem_SetMenu(*args, **kwargs)
def SetId(*args, **kwargs):
- """SetId(int itemid)"""
+ """SetId(int id)"""
return _core.MenuItem_SetId(*args, **kwargs)
def GetId(*args, **kwargs):
return _core.MenuItem_IsSeparator(*args, **kwargs)
def SetText(*args, **kwargs):
- """SetText(wxString str)"""
+ """SetText(String str)"""
return _core.MenuItem_SetText(*args, **kwargs)
def GetLabel(*args, **kwargs):
- """GetLabel() -> wxString"""
+ """GetLabel() -> String"""
return _core.MenuItem_GetLabel(*args, **kwargs)
def GetText(*args, **kwargs):
- """GetText() -> wxString"""
+ """GetText() -> String"""
return _core.MenuItem_GetText(*args, **kwargs)
def GetLabelFromText(*args, **kwargs):
- """MenuItem.GetLabelFromText(wxString text) -> wxString"""
+ """GetLabelFromText(String text) -> String"""
return _core.MenuItem_GetLabelFromText(*args, **kwargs)
GetLabelFromText = staticmethod(GetLabelFromText)
def GetKind(*args, **kwargs):
- """GetKind() -> wxItemKind"""
+ """GetKind() -> int"""
return _core.MenuItem_GetKind(*args, **kwargs)
def SetCheckable(*args, **kwargs):
return _core.MenuItem_Toggle(*args, **kwargs)
def SetHelp(*args, **kwargs):
- """SetHelp(wxString str)"""
+ """SetHelp(String str)"""
return _core.MenuItem_SetHelp(*args, **kwargs)
def GetHelp(*args, **kwargs):
- """GetHelp() -> wxString"""
+ """GetHelp() -> String"""
return _core.MenuItem_GetHelp(*args, **kwargs)
def GetAccel(*args, **kwargs):
- """GetAccel() -> wxAcceleratorEntry"""
+ """GetAccel() -> AcceleratorEntry"""
return _core.MenuItem_GetAccel(*args, **kwargs)
def SetAccel(*args, **kwargs):
- """SetAccel(wxAcceleratorEntry accel)"""
+ """SetAccel(AcceleratorEntry accel)"""
return _core.MenuItem_SetAccel(*args, **kwargs)
def GetDefaultMarginWidth(*args, **kwargs):
- """MenuItem.GetDefaultMarginWidth() -> int"""
+ """GetDefaultMarginWidth() -> int"""
return _core.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
def SetBitmap(*args, **kwargs):
- """SetBitmap(wxBitmap bitmap)"""
+ """SetBitmap(Bitmap bitmap)"""
return _core.MenuItem_SetBitmap(*args, **kwargs)
def GetBitmap(*args, **kwargs):
- """GetBitmap() -> wxBitmap"""
+ """GetBitmap() -> Bitmap"""
return _core.MenuItem_GetBitmap(*args, **kwargs)
_core.MenuItem_swigregister(MenuItemPtr)
def MenuItem_GetLabelFromText(*args, **kwargs):
- """MenuItem_GetLabelFromText(wxString text) -> wxString"""
+ """MenuItem_GetLabelFromText(String text) -> String"""
return _core.MenuItem_GetLabelFromText(*args, **kwargs)
def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
#---------------------------------------------------------------------------
class Control(Window):
- """"""
+ """
+ This is the base class for a control or 'widget'.
+
+ A control is generally a small window which processes user input and/or
+ displays one or more item of data.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
- """__init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- long style=0, Validator validator=DefaultValidator,
- wxString name=wxPyControlNameStr) -> Control"""
+ """
+ __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ long style=0, Validator validator=DefaultValidator,
+ String name=ControlNameStr) -> Control
+
+ Create a Control. Normally you should only call this from a
+ subclass' __init__ as a plain old wx.Control is not very useful.
+ """
newobj = _core.new_Control(*args, **kwargs)
self.this = newobj.this
self.thisown = 1
self._setOORInfo(self)
def Create(*args, **kwargs):
- """Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
- long style=0, Validator validator=DefaultValidator,
- wxString name=wxPyControlNameStr) -> bool"""
+ """
+ Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
+ long style=0, Validator validator=DefaultValidator,
+ String name=ControlNameStr) -> bool
+
+ Do the 2nd phase and create the GUI control.
+ """
return _core.Control_Create(*args, **kwargs)
def Command(*args, **kwargs):
- """Command(CommandEvent event)"""
+ """
+ Command(CommandEvent event)
+
+ Simulates the effect of the user issuing a command to the
+ item. See wx.CommandEvent.
+ """
return _core.Control_Command(*args, **kwargs)
def GetLabel(*args, **kwargs):
- """GetLabel() -> wxString"""
+ """
+ GetLabel() -> String
+
+ Return a control's text.
+ """
return _core.Control_GetLabel(*args, **kwargs)
def SetLabel(*args, **kwargs):
- """SetLabel(wxString label)"""
+ """
+ SetLabel(String label)
+
+ Sets the item's text.
+ """
return _core.Control_SetLabel(*args, **kwargs)
+ def GetClassDefaultAttributes(*args, **kwargs):
+ """
+ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+
+ Get the default attributes for this class. This is useful if
+ you want to use the same font or colour in your own control as
+ in a standard control -- which is a much better idea than hard
+ coding specific colours or fonts which might look completely out
+ of place on the users system, especially if it uses themes.
+
+ The variant parameter is only relevant under Mac currently and is
+ ignore under other platforms. Under Mac, it will change the size of the
+ returned font. See SetWindowVariant for more about this.
+ """
+ return _core.Control_GetClassDefaultAttributes(*args, **kwargs)
+
+ GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
class ControlPtr(Control):
def __init__(self, this):
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = Control
_core.Control_swigregister(ControlPtr)
+ControlNameStr = cvar.ControlNameStr
def PreControl(*args, **kwargs):
- """PreControl() -> Control"""
+ """
+ PreControl() -> Control
+
+ Precreate a Control control for 2-phase creation
+ """
val = _core.new_PreControl(*args, **kwargs)
val.thisown = 1
return val
+def Control_GetClassDefaultAttributes(*args, **kwargs):
+ """
+ Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
+
+ Get the default attributes for this class. This is useful if
+ you want to use the same font or colour in your own control as
+ in a standard control -- which is a much better idea than hard
+ coding specific colours or fonts which might look completely out
+ of place on the users system, especially if it uses themes.
+
+ The variant parameter is only relevant under Mac currently and is
+ ignore under other platforms. Under Mac, it will change the size of the
+ returned font. See SetWindowVariant for more about this.
+ """
+ return _core.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 and
+ wx.ComboBox (which implements an extended interface deriving from
+ this one)
+
+ It defines the methods for accessing the control's items and
+ although each of the derived classes implements them differently,
+ they still all conform to the same interface.
+
+ The items in a wx.ItemContainer have (non empty) string labels
+ and, optionally, client data associated with them.
+
+ """
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def Append(*args, **kwargs):
- """Append(wxString item, PyObject clientData=None) -> int"""
+ """
+ Append(String item, PyObject clientData=None) -> int
+
+ Adds the item to the control, associating the given data with the
+ item if not None. The return value is the index of the newly
+ added item which may be different from the last one if the
+ control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style).
+ """
return _core.ItemContainer_Append(*args, **kwargs)
def AppendItems(*args, **kwargs):
- """AppendItems(wxArrayString strings)"""
+ """
+ AppendItems(wxArrayString strings)
+
+ Apend several items at once to the control. Notice that calling
+ this method may be much faster than appending the items one by
+ one if you need to add a lot of items.
+ """
return _core.ItemContainer_AppendItems(*args, **kwargs)
def Insert(*args, **kwargs):
- """Insert(wxString item, int pos, PyObject clientData=None) -> int"""
+ """
+ Insert(String item, int pos, PyObject clientData=None) -> int
+
+ Insert an item into the control before the item at the pos index,
+ optionally associating some data object with the item.
+ """
return _core.ItemContainer_Insert(*args, **kwargs)
def Clear(*args, **kwargs):
- """Clear()"""
+ """
+ Clear()
+
+ Removes all items from the control.
+ """
return _core.ItemContainer_Clear(*args, **kwargs)
def Delete(*args, **kwargs):
- """Delete(int n)"""
+ """
+ Delete(int n)
+
+ Deletes the item at the zero-based index 'n' from the control.
+ Note that it is an error (signalled by a PyAssertionError
+ exception if enabled) to remove an item with the index negative
+ or greater or equal than the number of items in the control.
+ """
return _core.ItemContainer_Delete(*args, **kwargs)
def GetCount(*args, **kwargs):
- """GetCount() -> int"""
+ """
+ GetCount() -> int
+
+ Returns the number of items in the control.
+ """
return _core.ItemContainer_GetCount(*args, **kwargs)
def IsEmpty(*args, **kwargs):
- """IsEmpty() -> bool"""
+ """
+ IsEmpty() -> bool
+
+ Returns True if the control is empty or False if it has some items.
+ """
return _core.ItemContainer_IsEmpty(*args, **kwargs)
def GetString(*args, **kwargs):
- """GetString(int n) -> wxString"""
+ """
+ GetString(int n) -> String
+
+ Returns the label of the item with the given index.
+ """
return _core.ItemContainer_GetString(*args, **kwargs)
def GetStrings(*args, **kwargs):
return _core.ItemContainer_GetStrings(*args, **kwargs)
def SetString(*args, **kwargs):
- """SetString(int n, wxString s)"""
+ """
+ SetString(int n, String s)
+
+ Sets the label for the given item.
+ """
return _core.ItemContainer_SetString(*args, **kwargs)
def FindString(*args, **kwargs):
- """FindString(wxString s) -> int"""
+ """
+ FindString(String s) -> int
+
+ Finds an item whose label matches the given string. Returns the
+ zero-based position of the item, or wx.NOT_FOUND if the string
+ was not found.
+ """
return _core.ItemContainer_FindString(*args, **kwargs)
def Select(*args, **kwargs):
- """Select(int n)"""
+ """
+ Select(int n)
+
+ Sets the item at index 'n' to be the selected item.
+ """
return _core.ItemContainer_Select(*args, **kwargs)
+ SetSelection = Select
def GetSelection(*args, **kwargs):
- """GetSelection() -> int"""
+ """
+ GetSelection() -> int
+
+ Returns the index of the selected item or wx.NOT_FOUND if no item is selected.
+ """
return _core.ItemContainer_GetSelection(*args, **kwargs)
def GetStringSelection(*args, **kwargs):
- """GetStringSelection() -> wxString"""
+ """
+ GetStringSelection() -> String
+
+ Returns the label of the selected item or an empty string if no item is selected.
+ """
return _core.ItemContainer_GetStringSelection(*args, **kwargs)
def GetClientData(*args, **kwargs):
- """GetClientData(int n) -> PyObject"""
+ """
+ GetClientData(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(int n, PyObject clientData)"""
+ """
+ SetClientData(int n, PyObject clientData)
+
+ Associate the given client data with the item at position n.
+ """
return _core.ItemContainer_SetClientData(*args, **kwargs)
#---------------------------------------------------------------------------
class ControlWithItems(Control,ItemContainer):
- """"""
+ """
+ wx.ControlWithItems combines the wx.ItemContainer class with the
+ wx.Control class, and is used for the base class of various
+ controls that have items.
+ """
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
#---------------------------------------------------------------------------
class SizerItem(Object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""GetProportion() -> int"""
return _core.SizerItem_GetProportion(*args, **kwargs)
+ SetOption = SetProportion
+ GetOption = GetProportion
def SetFlag(*args, **kwargs):
"""SetFlag(int flag)"""
return _core.SizerItem_SetFlag(*args, **kwargs)
_core.SizerItem_swigregister(SizerItemPtr)
def SizerItemSpacer(*args, **kwargs):
- """SizerItemSpacer(int width, int height, int proportion, int flag, int border,
- Object userData) -> SizerItem"""
+ """
+ SizerItemSpacer(int width, int height, int proportion, int flag, int border,
+ Object userData) -> SizerItem
+ """
val = _core.new_SizerItemSpacer(*args, **kwargs)
val.thisown = 1
return val
def SizerItemWindow(*args, **kwargs):
- """SizerItemWindow(Window window, int proportion, int flag, int border,
- Object userData) -> SizerItem"""
+ """
+ SizerItemWindow(Window window, int proportion, int flag, int border,
+ Object userData) -> SizerItem
+ """
val = _core.new_SizerItemWindow(*args, **kwargs)
val.thisown = 1
return val
def SizerItemSizer(*args, **kwargs):
- """SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
- Object userData) -> SizerItem"""
+ """
+ SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
+ Object userData) -> SizerItem
+ """
val = _core.new_SizerItemSizer(*args, **kwargs)
val.thisown = 1
return val
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,)
return _core.Sizer__setOORInfo(*args, **kwargs)
def Add(*args, **kwargs):
- """Add(PyObject item, int proportion=0, int flag=0, int border=0,
- PyObject userData=None)"""
+ """
+ Add(PyObject item, int proportion=0, int flag=0, int border=0,
+ PyObject userData=None)
+ """
return _core.Sizer_Add(*args, **kwargs)
def Insert(*args, **kwargs):
- """Insert(int before, PyObject item, int proportion=0, int flag=0,
- int border=0, PyObject userData=None)"""
+ """
+ Insert(int before, PyObject item, int proportion=0, int flag=0,
+ int border=0, PyObject userData=None)
+ """
return _core.Sizer_Insert(*args, **kwargs)
def Prepend(*args, **kwargs):
- """Prepend(PyObject item, int proportion=0, int flag=0, int border=0,
- PyObject userData=None)"""
+ """
+ Prepend(PyObject item, int proportion=0, int flag=0, int border=0,
+ PyObject userData=None)
+ """
return _core.Sizer_Prepend(*args, **kwargs)
def Remove(*args, **kwargs):
childinfo = (childinfo, )
self.Add(*childinfo)
-
+ # for backwards compatibility only, please do not use in new code
AddWindow = AddSizer = AddSpacer = Add
PrependWindow = PrependSizer = PrependSpacer = Prepend
InsertWindow = InsertSizer = InsertSpacer = Insert
_core.Sizer_swigregister(SizerPtr)
class PySizer(Sizer):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class BoxSizer(Sizer):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class StaticBoxSizer(BoxSizer):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class GridSizer(Sizer):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
FLEX_GROWMODE_SPECIFIED = _core.FLEX_GROWMODE_SPECIFIED
FLEX_GROWMODE_ALL = _core.FLEX_GROWMODE_ALL
class FlexGridSizer(GridSizer):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
def SetNonFlexibleGrowMode(*args, **kwargs):
- """SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode)"""
+ """SetNonFlexibleGrowMode(int mode)"""
return _core.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
def GetNonFlexibleGrowMode(*args, **kwargs):
- """GetNonFlexibleGrowMode() -> wxFlexSizerGrowMode"""
+ """GetNonFlexibleGrowMode() -> int"""
return _core.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
def GetRowHeights(*args, **kwargs):
#---------------------------------------------------------------------------
class GBPosition(object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.GBPosition_SetCol(*args, **kwargs)
def __eq__(*args, **kwargs):
- """__eq__(GBPosition p) -> bool"""
+ """__eq__(GBPosition other) -> bool"""
return _core.GBPosition___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
- """__ne__(GBPosition p) -> bool"""
+ """__ne__(GBPosition other) -> bool"""
return _core.GBPosition___ne__(*args, **kwargs)
def Set(*args, **kwargs):
elif index == 1: self.SetCol(val)
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.GBPosition, self.Get())
row = property(GetRow, SetRow)
col = property(GetCol, SetCol)
_core.GBPosition_swigregister(GBPositionPtr)
class GBSpan(object):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.GBSpan_SetColspan(*args, **kwargs)
def __eq__(*args, **kwargs):
- """__eq__(GBSpan o) -> bool"""
+ """__eq__(GBSpan other) -> bool"""
return _core.GBSpan___eq__(*args, **kwargs)
def __ne__(*args, **kwargs):
- """__ne__(GBSpan o) -> bool"""
+ """__ne__(GBSpan other) -> bool"""
return _core.GBSpan___ne__(*args, **kwargs)
def Set(*args, **kwargs):
elif index == 1: self.SetColspan(val)
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.GBSpan, self.Get())
rowspan = property(GetRowspan, SetRowspan)
colspan = property(GetColspan, SetColspan)
_core.GBSpan_swigregister(GBSpanPtr)
class GBSizerItem(SizerItem):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _core.GBSizerItem_SetSpan(*args, **kwargs)
def Intersects(*args):
- """Intersects(GBSizerItem other) -> bool
-Intersects(GBPosition pos, GBSpan span) -> bool"""
+ """
+ Intersects(GBSizerItem other) -> bool
+ Intersects(GBPosition pos, GBSpan span) -> bool
+ """
return _core.GBSizerItem_Intersects(*args)
def GetEndPos(*args, **kwargs):
DefaultSpan = cvar.DefaultSpan
def GBSizerItemWindow(*args, **kwargs):
- """GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
- int border, Object userData) -> GBSizerItem"""
+ """
+ GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
+ int border, Object userData) -> GBSizerItem
+ """
val = _core.new_GBSizerItemWindow(*args, **kwargs)
val.thisown = 1
return val
def GBSizerItemSizer(*args, **kwargs):
- """GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
- int border, Object userData) -> GBSizerItem"""
+ """
+ GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
+ int border, Object userData) -> GBSizerItem
+ """
val = _core.new_GBSizerItemSizer(*args, **kwargs)
val.thisown = 1
return val
def GBSizerItemSpacer(*args, **kwargs):
- """GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
- int flag, int border, Object userData) -> GBSizerItem"""
+ """
+ GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
+ int flag, int border, Object userData) -> GBSizerItem
+ """
val = _core.new_GBSizerItemSpacer(*args, **kwargs)
val.thisown = 1
return val
class GridBagSizer(FlexGridSizer):
- """"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
self.thisown = 1
del newobj.thisown
def Add(*args, **kwargs):
- """Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan,
- int flag=0, int border=0, PyObject userData=None) -> bool"""
+ """
+ Add(PyObject item, GBPosition pos, GBSpan span=DefaultSpan,
+ int flag=0, int border=0, PyObject userData=None) -> bool
+ """
return _core.GridBagSizer_Add(*args, **kwargs)
def AddItem(*args, **kwargs):
return _core.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
def GetItemPosition(*args):
- """GetItemPosition(Window window) -> GBPosition
-GetItemPosition(Sizer sizer) -> GBPosition
-GetItemPosition(size_t index) -> GBPosition"""
+ """
+ GetItemPosition(Window window) -> GBPosition
+ GetItemPosition(Sizer sizer) -> GBPosition
+ GetItemPosition(size_t index) -> GBPosition
+ """
return _core.GridBagSizer_GetItemPosition(*args)
def SetItemPosition(*args):
- """SetItemPosition(Window window, GBPosition pos) -> bool
-SetItemPosition(Sizer sizer, GBPosition pos) -> bool
-SetItemPosition(size_t index, GBPosition pos) -> bool"""
+ """
+ SetItemPosition(Window window, GBPosition pos) -> bool
+ SetItemPosition(Sizer sizer, GBPosition pos) -> bool
+ SetItemPosition(size_t index, GBPosition pos) -> bool
+ """
return _core.GridBagSizer_SetItemPosition(*args)
def GetItemSpan(*args):
- """GetItemSpan(Window window) -> GBSpan
-GetItemSpan(Sizer sizer) -> GBSpan
-GetItemSpan(size_t index) -> GBSpan"""
+ """
+ GetItemSpan(Window window) -> GBSpan
+ GetItemSpan(Sizer sizer) -> GBSpan
+ GetItemSpan(size_t index) -> GBSpan
+ """
return _core.GridBagSizer_GetItemSpan(*args)
def SetItemSpan(*args):
- """SetItemSpan(Window window, GBSpan span) -> bool
-SetItemSpan(Sizer sizer, GBSpan span) -> bool
-SetItemSpan(size_t index, GBSpan span) -> bool"""
+ """
+ SetItemSpan(Window window, GBSpan span) -> bool
+ SetItemSpan(Sizer sizer, GBSpan span) -> bool
+ SetItemSpan(size_t index, GBSpan span) -> bool
+ """
return _core.GridBagSizer_SetItemSpan(*args)
def FindItem(*args):
- """FindItem(Window window) -> GBSizerItem
-FindItem(Sizer sizer) -> GBSizerItem"""
+ """
+ FindItem(Window window) -> GBSizerItem
+ FindItem(Sizer sizer) -> GBSizerItem
+ """
return _core.GridBagSizer_FindItem(*args)
def FindItemAtPosition(*args, **kwargs):
return _core.GridBagSizer_CalcMin(*args, **kwargs)
def CheckForIntersection(*args):
- """CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool
-CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool"""
+ """
+ CheckForIntersection(GBSizerItem item, GBSizerItem excludeItem=None) -> bool
+ CheckForIntersection(GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
+ """
return _core.GridBagSizer_CheckForIntersection(*args)
SameAs = _core.SameAs
Absolute = _core.Absolute
class IndividualLayoutConstraint(Object):
- """"""
+ """
+ Objects of this class are stored in the wx.LayoutConstraint class as one of
+ eight possible constraints that a window can be involved in. You will never
+ need to create an instance of wx.IndividualLayoutConstraint, rather you should
+ use create a wx.LayoutContstraints instance and use the individual contstraints
+ that it contains.
+
+ Constraints are initially set to have the relationship wx.Unconstrained, which
+ means that their values should be calculated by looking at known constraints.
+
+ The Edge specifies the type of edge or dimension of a window.
+
+ Edges
+
+ wx.Left The left edge.
+ wx.Top The top edge.
+ wx.Right The right edge.
+ wx.Bottom The bottom edge.
+ wx.CentreX The x-coordinate of the centre of the window.
+ wx.CentreY The y-coordinate of the centre of the window.
+
+
+ The Relationship specifies the relationship that this edge or dimension has
+ with another specified edge or dimension. Normally, the user doesn't use these
+ directly because functions such as Below and RightOf are a convenience for
+ using the more general Set function.
+
+ Relationships
+
+ wx.Unconstrained The edge or dimension is unconstrained
+ (the default for edges.)
+ wx.AsIs The edge or dimension is to be taken from the current
+ window position or size (the default for dimensions.)
+ wx.Above The edge should be above another edge.
+ wx.Below The edge should be below another edge.
+ wx.LeftOf The edge should be to the left of another edge.
+ wx.RightOf The edge should be to the right of another edge.
+ wx.SameAs The edge or dimension should be the same as another edge
+ or dimension.
+ wx.PercentOf The edge or dimension should be a percentage of another
+ edge or dimension.
+ wx.Absolute The edge or dimension should be a given absolute value.
+
+
+ """
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def Set(*args, **kwargs):
- """Set(wxRelationship rel, Window otherW, wxEdge otherE, int val=0,
- int marg=wxLAYOUT_DEFAULT_MARGIN)"""
+ """Set(int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)"""
return _core.IndividualLayoutConstraint_Set(*args, **kwargs)
def LeftOf(*args, **kwargs):
- """LeftOf(Window sibling, int marg=0)"""
+ """
+ LeftOf(Window sibling, int marg=0)
+
+ Sibling relationship
+ """
return _core.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
def RightOf(*args, **kwargs):
- """RightOf(Window sibling, int marg=0)"""
+ """
+ RightOf(Window sibling, int marg=0)
+
+ Sibling relationship
+ """
return _core.IndividualLayoutConstraint_RightOf(*args, **kwargs)
def Above(*args, **kwargs):
- """Above(Window sibling, int marg=0)"""
+ """
+ Above(Window sibling, int marg=0)
+
+ Sibling relationship
+ """
return _core.IndividualLayoutConstraint_Above(*args, **kwargs)
def Below(*args, **kwargs):
- """Below(Window sibling, int marg=0)"""
+ """
+ Below(Window sibling, int marg=0)
+
+ Sibling relationship
+ """
return _core.IndividualLayoutConstraint_Below(*args, **kwargs)
def SameAs(*args, **kwargs):
- """SameAs(Window otherW, wxEdge edge, int marg=0)"""
+ """
+ SameAs(Window otherW, int edge, int marg=0)
+
+ 'Same edge' alignment
+ """
return _core.IndividualLayoutConstraint_SameAs(*args, **kwargs)
def PercentOf(*args, **kwargs):
- """PercentOf(Window otherW, wxEdge wh, int per)"""
+ """
+ PercentOf(Window otherW, int wh, int per)
+
+ The edge is a percentage of the other window's edge
+ """
return _core.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
def Absolute(*args, **kwargs):
- """Absolute(int val)"""
+ """
+ Absolute(int val)
+
+ Edge has absolute value
+ """
return _core.IndividualLayoutConstraint_Absolute(*args, **kwargs)
def Unconstrained(*args, **kwargs):
- """Unconstrained()"""
+ """
+ Unconstrained()
+
+ Dimension is unconstrained
+ """
return _core.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
def AsIs(*args, **kwargs):
- """AsIs()"""
+ """
+ AsIs()
+
+ Dimension is 'as is' (use current size settings)
+ """
return _core.IndividualLayoutConstraint_AsIs(*args, **kwargs)
def GetOtherWindow(*args, **kwargs):
return _core.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
def GetMyEdge(*args, **kwargs):
- """GetMyEdge() -> wxEdge"""
+ """GetMyEdge() -> int"""
return _core.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
def SetEdge(*args, **kwargs):
- """SetEdge(wxEdge which)"""
+ """SetEdge(int which)"""
return _core.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
def SetValue(*args, **kwargs):
return _core.IndividualLayoutConstraint_SetDone(*args, **kwargs)
def GetRelationship(*args, **kwargs):
- """GetRelationship() -> wxRelationship"""
+ """GetRelationship() -> int"""
return _core.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
def SetRelationship(*args, **kwargs):
- """SetRelationship(wxRelationship r)"""
+ """SetRelationship(int r)"""
return _core.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
def ResetIfWin(*args, **kwargs):
- """ResetIfWin(Window otherW) -> bool"""
+ """
+ ResetIfWin(Window otherW) -> bool
+
+ Reset constraint if it mentions otherWin
+ """
return _core.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
def SatisfyConstraint(*args, **kwargs):
- """SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool"""
+ """
+ SatisfyConstraint(LayoutConstraints constraints, Window win) -> bool
+
+ Try to satisfy constraint
+ """
return _core.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
def GetEdge(*args, **kwargs):
- """GetEdge(wxEdge which, Window thisWin, Window other) -> int"""
+ """
+ GetEdge(int which, Window thisWin, Window other) -> int
+
+ Get the value of this edge or dimension, or if this
+ is not determinable, -1.
+ """
return _core.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
_core.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
class LayoutConstraints(Object):
- """"""
+ """
+ Note: constraints are now deprecated and you should use sizers instead.
+
+ Objects of this class can be associated with a window to define its layout
+ constraints, with respect to siblings or its parent.
+
+ The class consists of the following eight constraints of class
+ wx.IndividualLayoutConstraint, some or all of which should be accessed
+ directly to set the appropriate constraints.
+
+ * left: represents the left hand edge of the window
+ * right: represents the right hand edge of the window
+ * top: represents the top edge of the window
+ * bottom: represents the bottom edge of the window
+ * width: represents the width of the window
+ * height: represents the height of the window
+ * centreX: represents the horizontal centre point of the window
+ * centreY: represents the vertical centre point of the window
+
+ Most constraints are initially set to have the relationship wxUnconstrained,
+ which means that their values should be calculated by looking at known
+ constraints. The exceptions are width and height, which are set to wxAsIs to
+ ensure that if the user does not specify a constraint, the existing width and
+ height will be used, to be compatible with panel items which often have take a
+ default size. If the constraint is wxAsIs, the dimension will not be changed.
+
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
left = property(_core.LayoutConstraints_left_get)
self.thisown = 1
del newobj.thisown
def SatisfyConstraints(*args, **kwargs):
- """SatisfyConstraints(Window win, int OUTPUT) -> bool"""
+ """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
return _core.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
def AreSatisfied(*args, **kwargs):
#----------------------------------------------------------------------------
-# Use Python's bool constants if available, make aliases if not
+# Use Python's bool constants if available, make some if not
try:
True
except NameError:
- True = 1==1
- False = 1==0
+ __builtins__.True = 1==1
+ __builtins__.False = 1==0
+ def bool(value): return not not value
+ __builtins__.bool = bool
-# Backwards compaatibility
-TRUE = true = True
-FALSE = false = False
# workarounds for bad wxRTTI names
class PyDeadObjectError(AttributeError):
pass
-
class _wxPyDeadObject(object):
"""
Instances of wx objects that are OOR capable will have their __class__
reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
- def __repr__( self ):
+ def __repr__(self):
if not hasattr(self, "_name"):
self._name = "[unknown]"
return self.reprStr % self._name
- def __getattr__( self, *args ):
+ def __getattr__(self, *args):
if not hasattr(self, "_name"):
self._name = "[unknown]"
- raise PyDeadObjectError( self.attrStr % self._name )
+ raise PyDeadObjectError(self.attrStr % self._name)
+
+ def __nonzero__(self):
+ return 0
+
+
+
+class PyUnbornObjectError(AttributeError):
+ pass
+
+class _wxPyUnbornObject(object):
+ """
+ Some stock objects are created when the wx.core module is
+ imported, but their C++ instance is not created until the wx.App
+ object is created and initialized. These object instances will
+ temporarily have their __class__ changed to this class so an
+ exception will be raised if they are used before the C++ instance
+ is ready.
+ """
+
+ reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
+ attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
+
+ def __repr__(self):
+ #if not hasattr(self, "_name"):
+ # self._name = "[unknown]"
+ return self.reprStr #% self._name
+
+ def __getattr__(self, *args):
+ #if not hasattr(self, "_name"):
+ # self._name = "[unknown]"
+ raise PyUnbornObjectError(self.attrStr) # % self._name )
def __nonzero__(self):
return 0
class FutureCall:
"""
- A convenience class for wxTimer, that calls the given callable
+ A convenience class for wx.Timer, that calls the given callable
object once after the given amount of milliseconds, passing any
positional or keyword args. The return value of the callable is
availbale after it has been run with the GetResult method.
self.callable = callable
self.SetArgs(*args, **kwargs)
self.runCount = 0
+ self.running = False
self.hasRun = False
self.result = None
self.timer = None
self.Stop()
self.timer = wx.PyTimer(self.Notify)
self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
+ self.running = True
Restart = Start
"""
if self.callable and getattr(self.callable, 'im_self', True):
self.runCount += 1
+ self.running = False
self.result = self.callable(*self.args, **self.kwargs)
self.hasRun = True
- wx.CallAfter(self.Stop)
+ if not self.running:
+ # if it wasn't restarted, then cleanup
+ wx.CallAfter(self.Stop)
#----------------------------------------------------------------------------
from controls import *
from misc import *
+
+# Fixup the stock objects since they can't be used yet. (They will be
+# restored in wx.PyApp.OnInit.)
+_core._wxPyFixStockObjects()
+
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------