import _gdi_
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+ if (name == "this"):
+ if isinstance(value, class_type):
+ self.__dict__[name] = value.this
+ if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
+ del value.thisown
+ return
+ method = class_type.__swig_setmethods__.get(name,None)
+ if method: return method(self,value)
+ if (not static) or hasattr(self,name) or (name == "thisown"):
+ self.__dict__[name] = value
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+ return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+ method = class_type.__swig_getmethods__.get(name,None)
+ if method: return method(self)
+ raise AttributeError,name
+
+import types
+try:
+ _object = types.ObjectType
+ _newclass = 1
+except AttributeError:
+ class _object : pass
+ _newclass = 0
+del types
+
+
+def _swig_setattr_nondynamic_method(set):
+ def set_attr(self,name,value):
+ if hasattr(self,name) or (name in ("this", "thisown")):
+ set(self,name,value)
+ else:
+ raise AttributeError("You cannot add attributes to %s" % self)
+ return set_attr
+
+
import _core
wx = _core
#---------------------------------------------------------------------------
class GDIObject(_core.Object):
+ """Proxy of C++ GDIObject class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxGDIObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
ColorRGB = ColourRGB
class Palette(GDIObject):
+ """Proxy of C++ Palette class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPalette instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""GetRGB(self, int pixel) -> (R,G,B)"""
return _gdi_.Palette_GetRGB(*args, **kwargs)
+ def GetColoursCount(*args, **kwargs):
+ """GetColoursCount(self) -> int"""
+ return _gdi_.Palette_GetColoursCount(*args, **kwargs)
+
def Ok(*args, **kwargs):
"""Ok(self) -> bool"""
return _gdi_.Palette_Ok(*args, **kwargs)
#---------------------------------------------------------------------------
class Pen(GDIObject):
+ """Proxy of C++ Pen class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPen instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return _gdi_.Pen_SetWidth(*args, **kwargs)
def SetDashes(*args, **kwargs):
- """SetDashes(self, int dashes, wxDash dashes_array)"""
+ """SetDashes(self, int dashes)"""
return _gdi_.Pen_SetDashes(*args, **kwargs)
def GetDashes(*args, **kwargs):
self.__class__ = Brush
_gdi_.Brush_swigregister(BrushPtr)
+def BrushFromBitmap(*args, **kwargs):
+ """
+ BrushFromBitmap(Bitmap stippleBitmap) -> Brush
+
+ Constructs a stippled brush using a bitmap.
+ """
+ val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
+ val.thisown = 1
+ return val
+
class Bitmap(GDIObject):
"""
The wx.Bitmap class encapsulates the concept of a platform-dependent
MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
class Icon(GDIObject):
+ """Proxy of C++ Icon class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return val
class IconLocation(object):
+ """Proxy of C++ IconLocation class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxIconLocation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_gdi_.IconLocation_swigregister(IconLocationPtr)
class IconBundle(object):
+ """Proxy of C++ IconBundle class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxIconBundle instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
__init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
Construct a Cursor from a file. Specify the type of file using
- wx.BITAMP_TYPE* constants, and specify the hotspot if not using a cur
+ wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
file.
-
- This constructor is not available on wxGTK, use ``wx.StockCursor``,
- ``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.
"""
newobj = _gdi_.new_Cursor(*args, **kwargs)
self.this = newobj.this
StockCursor(int id) -> Cursor
Create a cursor using one of the stock cursors. Note that not all
- cursors are available on all platforms.
+ stock cursors are available on all platforms.
"""
val = _gdi_.new_StockCursor(*args, **kwargs)
val.thisown = 1
"""
CursorFromImage(Image image) -> Cursor
- Constructs a cursor from a wxImage. The cursor is monochrome, colors
- with the RGB elements all greater than 127 will be foreground, colors
- less than this background. The mask (if any) will be used as
- transparent.
+ Constructs a cursor from a `wx.Image`. The mask (if any) will be used
+ for setting the transparent portions of the cursor.
"""
val = _gdi_.new_CursorFromImage(*args, **kwargs)
val.thisown = 1
PartRegion = _gdi_.PartRegion
InRegion = _gdi_.InRegion
class Region(GDIObject):
+ """Proxy of C++ Region class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxRegion instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
return val
def RegionFromPoints(*args, **kwargs):
- """RegionFromPoints(int points, Point points_array, int fillStyle=WINDING_RULE) -> Region"""
+ """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
val = _gdi_.new_RegionFromPoints(*args, **kwargs)
val.thisown = 1
return val
class RegionIterator(_core.Object):
+ """Proxy of C++ RegionIterator class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxRegionIterator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class NativeFontInfo(object):
+ """Proxy of C++ NativeFontInfo class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxNativeFontInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_gdi_.NativeFontInfo_swigregister(NativeFontInfoPtr)
class NativeEncodingInfo(object):
+ """Proxy of C++ NativeEncodingInfo class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxNativeEncodingInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
facename = property(_gdi_.NativeEncodingInfo_facename_get, _gdi_.NativeEncodingInfo_facename_set)
#---------------------------------------------------------------------------
class FontMapper(object):
+ """Proxy of C++ FontMapper class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxFontMapper instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
#---------------------------------------------------------------------------
class Font(GDIObject):
+ """
+ A font is an object which determines the appearance of text. Fonts are
+ used for drawing text to a device context, and setting the appearance
+ of a window's text.
+
+ You can retrieve the current system font settings with `wx.SystemSettings`.
+ """
def __repr__(self):
return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
__init__(self, int pointSize, int family, int style, int weight, bool underline=False,
String face=EmptyString,
int encoding=FONTENCODING_DEFAULT) -> Font
+
+ Creates a font object with the specified attributes.
+
+ :param pointSize: The size of the font in points.
+
+ :param family: Font family. A generic way of referring to fonts
+ without specifying actual facename. It can be One of
+ the ``wx.FONTFAMILY_xxx`` constants.
+
+ :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
+
+ :param weight: Font weight, sometimes also referred to as font
+ boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
+
+ :param underline: The value can be ``True`` or ``False`` and
+ indicates whether the font will include an underline. This
+ may not be supported on all platforms.
+
+ :param face: An optional string specifying the actual typeface to
+ be used. If it is an empty string, a default typeface will be
+ chosen based on the family.
+
+ :param encoding: An encoding which may be one of the
+ ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
+ available, no font is created.
+
+ :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
+ `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
+
"""
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
newobj = _gdi_.new_Font(*args, **kwargs)
except: pass
def Ok(*args, **kwargs):
- """Ok(self) -> bool"""
+ """
+ Ok(self) -> bool
+
+ Returns ``True`` if this font was successfully created.
+ """
return _gdi_.Font_Ok(*args, **kwargs)
def __nonzero__(self): return self.Ok()
return _gdi_.Font___ne__(*args, **kwargs)
def GetPointSize(*args, **kwargs):
- """GetPointSize(self) -> int"""
+ """
+ GetPointSize(self) -> int
+
+ Gets the point size.
+ """
return _gdi_.Font_GetPointSize(*args, **kwargs)
def GetPixelSize(*args, **kwargs):
- """GetPixelSize(self) -> Size"""
+ """
+ GetPixelSize(self) -> Size
+
+ Returns the size in pixels if the font was constructed with a pixel
+ size.
+ """
return _gdi_.Font_GetPixelSize(*args, **kwargs)
def IsUsingSizeInPixels(*args, **kwargs):
- """IsUsingSizeInPixels(self) -> bool"""
+ """
+ IsUsingSizeInPixels(self) -> bool
+
+ Returns ``True`` if the font is using a pixelSize.
+ """
return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
def GetFamily(*args, **kwargs):
- """GetFamily(self) -> int"""
+ """
+ GetFamily(self) -> int
+
+ Gets the font family.
+ """
return _gdi_.Font_GetFamily(*args, **kwargs)
def GetStyle(*args, **kwargs):
- """GetStyle(self) -> int"""
+ """
+ GetStyle(self) -> int
+
+ Gets the font style.
+ """
return _gdi_.Font_GetStyle(*args, **kwargs)
def GetWeight(*args, **kwargs):
- """GetWeight(self) -> int"""
+ """
+ GetWeight(self) -> int
+
+ Gets the font weight.
+ """
return _gdi_.Font_GetWeight(*args, **kwargs)
def GetUnderlined(*args, **kwargs):
- """GetUnderlined(self) -> bool"""
+ """
+ GetUnderlined(self) -> bool
+
+ Returns ``True`` if the font is underlined, ``False`` otherwise.
+ """
return _gdi_.Font_GetUnderlined(*args, **kwargs)
def GetFaceName(*args, **kwargs):
- """GetFaceName(self) -> String"""
+ """
+ GetFaceName(self) -> String
+
+ Returns the typeface name associated with the font, or the empty
+ string if there is no typeface information.
+ """
return _gdi_.Font_GetFaceName(*args, **kwargs)
def GetEncoding(*args, **kwargs):
- """GetEncoding(self) -> int"""
+ """
+ GetEncoding(self) -> int
+
+ Get the font's encoding.
+ """
return _gdi_.Font_GetEncoding(*args, **kwargs)
def GetNativeFontInfo(*args, **kwargs):
- """GetNativeFontInfo(self) -> NativeFontInfo"""
+ """
+ GetNativeFontInfo(self) -> NativeFontInfo
+
+ Constructs a `wx.NativeFontInfo` object from this font.
+ """
return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
def IsFixedWidth(*args, **kwargs):
- """IsFixedWidth(self) -> bool"""
+ """
+ IsFixedWidth(self) -> bool
+
+ Returns true if the font is a fixed width (or monospaced) font, false
+ if it is a proportional one or font is invalid.
+ """
return _gdi_.Font_IsFixedWidth(*args, **kwargs)
def GetNativeFontInfoDesc(*args, **kwargs):
- """GetNativeFontInfoDesc(self) -> String"""
+ """
+ GetNativeFontInfoDesc(self) -> String
+
+ Returns the platform-dependent string completely describing this font
+ or an empty string if the font isn't valid.
+ """
return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
def GetNativeFontInfoUserDesc(*args, **kwargs):
- """GetNativeFontInfoUserDesc(self) -> String"""
+ """
+ GetNativeFontInfoUserDesc(self) -> String
+
+ Returns a human readable version of `GetNativeFontInfoDesc`.
+ """
return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
def SetPointSize(*args, **kwargs):
- """SetPointSize(self, int pointSize)"""
+ """
+ SetPointSize(self, int pointSize)
+
+ Sets the point size.
+ """
return _gdi_.Font_SetPointSize(*args, **kwargs)
def SetPixelSize(*args, **kwargs):
- """SetPixelSize(self, Size pixelSize)"""
+ """
+ SetPixelSize(self, Size pixelSize)
+
+ Sets the size in pixels rather than points. If there is platform API
+ support for this then it is used, otherwise a font with the closest
+ size is found using a binary search.
+ """
return _gdi_.Font_SetPixelSize(*args, **kwargs)
def SetFamily(*args, **kwargs):
- """SetFamily(self, int family)"""
+ """
+ SetFamily(self, int family)
+
+ Sets the font family.
+ """
return _gdi_.Font_SetFamily(*args, **kwargs)
def SetStyle(*args, **kwargs):
- """SetStyle(self, int style)"""
+ """
+ SetStyle(self, int style)
+
+ Sets the font style.
+ """
return _gdi_.Font_SetStyle(*args, **kwargs)
def SetWeight(*args, **kwargs):
- """SetWeight(self, int weight)"""
+ """
+ SetWeight(self, int weight)
+
+ Sets the font weight.
+ """
return _gdi_.Font_SetWeight(*args, **kwargs)
def SetFaceName(*args, **kwargs):
- """SetFaceName(self, String faceName)"""
+ """
+ SetFaceName(self, String faceName)
+
+ Sets the facename for the font. The facename, which should be a valid
+ font installed on the end-user's system.
+
+ To avoid portability problems, don't rely on a specific face, but
+ specify the font family instead or as well. A suitable font will be
+ found on the end-user's system. If both the family and the facename
+ are specified, wxWidgets will first search for the specific face, and
+ then for a font belonging to the same family.
+ """
return _gdi_.Font_SetFaceName(*args, **kwargs)
def SetUnderlined(*args, **kwargs):
- """SetUnderlined(self, bool underlined)"""
+ """
+ SetUnderlined(self, bool underlined)
+
+ Sets underlining.
+ """
return _gdi_.Font_SetUnderlined(*args, **kwargs)
def SetEncoding(*args, **kwargs):
- """SetEncoding(self, int encoding)"""
+ """
+ SetEncoding(self, int encoding)
+
+ Set the font encoding.
+ """
return _gdi_.Font_SetEncoding(*args, **kwargs)
def SetNativeFontInfo(*args, **kwargs):
- """SetNativeFontInfo(self, NativeFontInfo info)"""
+ """
+ SetNativeFontInfo(self, NativeFontInfo info)
+
+ Set the font's attributes from a `wx.NativeFontInfo` object.
+ """
return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
def SetNativeFontInfoFromString(*args, **kwargs):
- """SetNativeFontInfoFromString(self, String info)"""
+ """
+ SetNativeFontInfoFromString(self, String info)
+
+ Set the font's attributes from string representation of a
+ `wx.NativeFontInfo` object.
+ """
return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
def SetNativeFontInfoUserDesc(*args, **kwargs):
- """SetNativeFontInfoUserDesc(self, String info)"""
+ """
+ SetNativeFontInfoUserDesc(self, String info)
+
+ Set the font's attributes from a string formerly returned from
+ `GetNativeFontInfoDesc`.
+ """
return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
def GetFamilyString(*args, **kwargs):
- """GetFamilyString(self) -> String"""
+ """
+ GetFamilyString(self) -> String
+
+ Returns a string representation of the font family.
+ """
return _gdi_.Font_GetFamilyString(*args, **kwargs)
def GetStyleString(*args, **kwargs):
- """GetStyleString(self) -> String"""
+ """
+ GetStyleString(self) -> String
+
+ Returns a string representation of the font style.
+ """
return _gdi_.Font_GetStyleString(*args, **kwargs)
def GetWeightString(*args, **kwargs):
- """GetWeightString(self) -> String"""
+ """
+ GetWeightString(self) -> String
+
+ Return a string representation of the font weight.
+ """
return _gdi_.Font_GetWeightString(*args, **kwargs)
def SetNoAntiAliasing(*args, **kwargs):
return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
def GetDefaultEncoding(*args, **kwargs):
- """GetDefaultEncoding() -> int"""
+ """
+ GetDefaultEncoding() -> int
+
+ Returns the encoding used for all fonts created with an encoding of
+ ``wx.FONTENCODING_DEFAULT``.
+ """
return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
GetDefaultEncoding = staticmethod(GetDefaultEncoding)
def SetDefaultEncoding(*args, **kwargs):
- """SetDefaultEncoding(int encoding)"""
+ """
+ SetDefaultEncoding(int encoding)
+
+ Sets the default font encoding.
+ """
return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
SetDefaultEncoding = staticmethod(SetDefaultEncoding)
_gdi_.Font_swigregister(FontPtr)
def FontFromNativeInfo(*args, **kwargs):
- """FontFromNativeInfo(NativeFontInfo info) -> Font"""
+ """
+ FontFromNativeInfo(NativeFontInfo info) -> Font
+
+ Construct a `wx.Font` from a `wx.NativeFontInfo` object.
+ """
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
val.thisown = 1
return val
def FontFromNativeInfoString(*args, **kwargs):
- """FontFromNativeInfoString(String info) -> Font"""
+ """
+ FontFromNativeInfoString(String info) -> Font
+
+ Construct a `wx.Font` from the string representation of a
+ `wx.NativeFontInfo` object.
+ """
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
val.thisown = 1
return val
-def Font2(*args, **kwargs):
+def FFont(*args, **kwargs):
"""
- Font2(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
+ FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
+
+ A bit of a simpler way to create a `wx.Font` using flags instead of
+ individual attribute settings. The value of flags can be a
+ combination of the following:
+
+ ============================ ==
+ wx.FONTFLAG_DEFAULT
+ wx.FONTFLAG_ITALIC
+ wx.FONTFLAG_SLANT
+ wx.FONTFLAG_LIGHT
+ wx.FONTFLAG_BOLD
+ wx.FONTFLAG_ANTIALIASED
+ wx.FONTFLAG_NOT_ANTIALIASED
+ wx.FONTFLAG_UNDERLINED
+ wx.FONTFLAG_STRIKETHROUGH
+ ============================ ==
+
+ :see: `wx.Font.__init__`
"""
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
- val = _gdi_.new_Font2(*args, **kwargs)
+ val = _gdi_.new_FFont(*args, **kwargs)
val.thisown = 1
return val
FontFromPixelSize(Size pixelSize, int family, int style, int weight,
bool underlined=False, String face=wxEmptyString,
int encoding=FONTENCODING_DEFAULT) -> Font
+
+ Creates a font using a size in pixels rather than points. If there is
+ platform API support for this then it is used, otherwise a font with
+ the closest size is found using a binary search.
+
+ :see: `wx.Font.__init__`
"""
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
val.thisown = 1
return val
+def FFontFromPixelSize(*args, **kwargs):
+ """
+ FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
+ String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
+
+ Creates a font using a size in pixels rather than points. If there is
+ platform API support for this then it is used, otherwise a font with
+ the closest size is found using a binary search.
+
+ :see: `wx.Font.__init__`, `wx.FFont`
+ """
+ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
+ val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
+ val.thisown = 1
+ return val
+
def Font_GetDefaultEncoding(*args, **kwargs):
- """Font_GetDefaultEncoding() -> int"""
+ """
+ Font_GetDefaultEncoding() -> int
+
+ Returns the encoding used for all fonts created with an encoding of
+ ``wx.FONTENCODING_DEFAULT``.
+ """
return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
def Font_SetDefaultEncoding(*args, **kwargs):
- """Font_SetDefaultEncoding(int encoding)"""
+ """
+ Font_SetDefaultEncoding(int encoding)
+
+ Sets the default font encoding.
+ """
return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
+Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.")
#---------------------------------------------------------------------------
class FontEnumerator(object):
+ """Proxy of C++ FontEnumerator class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
class LanguageInfo(object):
+ """Proxy of C++ LanguageInfo class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
class Locale(object):
+ """Proxy of C++ Locale class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
PLATFORM_OS2 = _gdi_.PLATFORM_OS2
PLATFORM_MAC = _gdi_.PLATFORM_MAC
class EncodingConverter(_core.Object):
+ """Proxy of C++ EncodingConverter class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
*text*. The generic version simply builds a running total of the widths
of each character using GetTextExtent, however if the various
platforms have a native API function that is faster or more accurate
- than the generic implementaiton then it will be used instead.
+ than the generic implementation then it will be used instead.
"""
return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
"""
return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
- def SetOptimization(*args, **kwargs):
+ def ComputeScaleAndOrigin(*args, **kwargs):
"""
- SetOptimization(self, bool optimize)
+ ComputeScaleAndOrigin(self)
- If *optimize* is true this function sets optimization mode on. This
- currently means that under X, the device context will not try to set a
- pen or brush property if it is known to be set already. This approach
- can fall down if non-wxWidgets code is using the same device context
- or window, for example when the window is a panel on which the
- windowing system draws panel items. The wxWidgets device context
- 'memory' will now be out of step with reality.
+ Performs all necessary computations for given platform and context
+ type after each change of scale and origin parameters. Usually called
+ automatically internally after such changes.
- Setting optimization off, drawing, then setting it back on again, is a
- trick that must occasionally be employed.
"""
- return _gdi_.DC_SetOptimization(*args, **kwargs)
+ return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
- def GetOptimization(*args, **kwargs):
- """
- GetOptimization(self) -> bool
+ def SetOptimization(self, optimize):
+ pass
+ def GetOptimization(self):
+ return False
- Returns true if device context optimization is on. See
- `SetOptimization` for .
- """
- return _gdi_.DC_GetOptimization(*args, **kwargs)
+ SetOptimization = wx._deprecated(SetOptimization)
+ GetOptimization = wx._deprecated(GetOptimization)
def CalcBoundingBox(*args, **kwargs):
"""
#---------------------------------------------------------------------------
+BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
+BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
class BufferedDC(MemoryDC):
"""
This simple class provides a simple way to avoid flicker: when drawing
return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args):
"""
- __init__(self, DC dc, Bitmap buffer) -> BufferedDC
- __init__(self, DC dc, Size area) -> BufferedDC
+ __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
+ __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
Constructs a buffered DC.
"""
+
+
"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
- __init__(self, Window window, Bitmap buffer=NullBitmap) -> BufferedPaintDC
+ __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
Create a buffered paint DC. As with `wx.BufferedDC`, you may either
provide the bitmap to be used for buffering or let this object create
#---------------------------------------------------------------------------
class MetaFile(_core.Object):
+ """Proxy of C++ MetaFile class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_gdi_.MetaFile_swigregister(MetaFilePtr)
class MetaFileDC(DC):
+ """Proxy of C++ MetaFileDC class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_gdi_.MetaFileDC_swigregister(MetaFileDCPtr)
class PrinterDC(DC):
+ """Proxy of C++ PrinterDC class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
class ImageList(_core.Object):
+ """Proxy of C++ ImageList class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""AddIcon(self, Icon icon) -> int"""
return _gdi_.ImageList_AddIcon(*args, **kwargs)
+ def GetBitmap(*args, **kwargs):
+ """GetBitmap(self, int index) -> Bitmap"""
+ return _gdi_.ImageList_GetBitmap(*args, **kwargs)
+
+ def GetIcon(*args, **kwargs):
+ """GetIcon(self, int index) -> Icon"""
+ return _gdi_.ImageList_GetIcon(*args, **kwargs)
+
def Replace(*args, **kwargs):
"""Replace(self, int index, Bitmap bitmap) -> bool"""
return _gdi_.ImageList_Replace(*args, **kwargs)
#---------------------------------------------------------------------------
class PenList(_core.Object):
+ """Proxy of C++ PenList class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
NullColour = cvar.NullColour
class BrushList(_core.Object):
+ """Proxy of C++ BrushList class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
return _gdi_.BrushList_AddBrush(*args, **kwargs)
def FindOrCreateBrush(*args, **kwargs):
- """FindOrCreateBrush(self, Colour colour, int style) -> Brush"""
+ """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
def RemoveBrush(*args, **kwargs):
_gdi_.BrushList_swigregister(BrushListPtr)
class ColourDatabase(_core.Object):
+ """Proxy of C++ ColourDatabase class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
_gdi_.ColourDatabase_swigregister(ColourDatabasePtr)
class FontList(_core.Object):
+ """Proxy of C++ FontList class"""
def __init__(self): raise RuntimeError, "No constructor defined"
def __repr__(self):
return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
#---------------------------------------------------------------------------
class Effects(_core.Object):
+ """Proxy of C++ Effects class"""
def __repr__(self):
return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):