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):
return _gdi_.Palette_GetPixel(*args, **kwargs)
def GetRGB(*args, **kwargs):
- """GetRGB(int pixel) -> (R,G,B)"""
+ """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):
"""
return _gdi_.Brush_GetStipple(*args, **kwargs)
+ def IsHatch(*args, **kwargs):
+ """
+ IsHatch(self) -> bool
+
+ Is the current style a hatch type?
+ """
+ return _gdi_.Brush_IsHatch(*args, **kwargs)
+
def Ok(*args, **kwargs):
"""
Ok(self) -> bool
"""
return _gdi_.Bitmap_LoadFile(*args, **kwargs)
+ def GetPalette(*args, **kwargs):
+ """GetPalette(self) -> Palette"""
+ return _gdi_.Bitmap_GetPalette(*args, **kwargs)
+
def CopyFromIcon(*args, **kwargs):
"""CopyFromIcon(self, Icon icon) -> bool"""
return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)
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):
+ """Proxy of C++ Font class"""
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):
"""GetPointSize(self) -> int"""
return _gdi_.Font_GetPointSize(*args, **kwargs)
+ def GetPixelSize(*args, **kwargs):
+ """GetPixelSize(self) -> Size"""
+ return _gdi_.Font_GetPixelSize(*args, **kwargs)
+
+ def IsUsingSizeInPixels(*args, **kwargs):
+ """IsUsingSizeInPixels(self) -> bool"""
+ return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
+
def GetFamily(*args, **kwargs):
"""GetFamily(self) -> int"""
return _gdi_.Font_GetFamily(*args, **kwargs)
"""SetPointSize(self, int pointSize)"""
return _gdi_.Font_SetPointSize(*args, **kwargs)
+ def SetPixelSize(*args, **kwargs):
+ """SetPixelSize(self, Size pixelSize)"""
+ return _gdi_.Font_SetPixelSize(*args, **kwargs)
+
def SetFamily(*args, **kwargs):
"""SetFamily(self, int family)"""
return _gdi_.Font_SetFamily(*args, **kwargs)
val.thisown = 1
return val
+def FontFromPixelSize(*args, **kwargs):
+ """
+ FontFromPixelSize(Size pixelSize, int family, int style, int weight,
+ bool underlined=False, String face=wxEmptyString,
+ int encoding=FONTENCODING_DEFAULT) -> Font
+ """
+ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
+ val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
+ val.thisown = 1
+ return val
+
def Font_GetDefaultEncoding(*args, **kwargs):
"""Font_GetDefaultEncoding() -> int"""
return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
#---------------------------------------------------------------------------
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):
# to the default catalog path.
if wx.Platform == "__WXMSW__":
import os
- localedir = os.path.join(os.path.split(__file__)[0], "locale")
- Locale_AddCatalogLookupPathPrefix(localedir)
+ _localedir = os.path.join(os.path.split(__file__)[0], "locale")
+ Locale.AddCatalogLookupPathPrefix(_localedir)
del os
#----------------------------------------------------------------------------
"""
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,)
_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):