X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2dbef2723c6563bd1084486574e4915c4c5587de..37f9912de423f0b41e51f0e93a68303fc5396a12:/wxPython/src/mac/gdi.py diff --git a/wxPython/src/mac/gdi.py b/wxPython/src/mac/gdi.py index 7596b875ee..99802424e6 100644 --- a/wxPython/src/mac/gdi.py +++ b/wxPython/src/mac/gdi.py @@ -126,6 +126,10 @@ def ColourRGB(*args, **kwargs): val.thisown = 1 return val +Color = Colour +NamedColor = NamedColour +ColorRGB = ColourRGB + class Palette(GDIObject): def __repr__(self): return "<%s.%s; proxy of C++ wxPalette instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -231,6 +235,10 @@ class Pen(GDIObject): """GetDashes() -> PyObject""" return _gdi.Pen_GetDashes(*args, **kwargs) + def __eq__(*args, **kwargs): + """__eq__(Pen pen) -> bool""" + return _gdi.Pen___eq__(*args, **kwargs) + def __nonzero__(self): return self.Ok() class PenPtr(Pen): @@ -552,9 +560,10 @@ class Mask(core.Object): return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Bitmap bitmap) -> Mask + __init__(Bitmap bitmap, Colour colour=NullColour) -> Mask - Constructs a mask from a monochrome bitmap. + Constructs a mask from a bitmap and a colour in that bitmap that indicates + the transparent portions of the mask, by default BLACK is used. """ newobj = _gdi.new_Mask(*args, **kwargs) self.this = newobj.this @@ -568,17 +577,7 @@ class MaskPtr(Mask): self.__class__ = Mask _gdi.Mask_swigregister(MaskPtr) -def MaskColour(*args, **kwargs): - """ - MaskColour(Bitmap bitmap, Colour colour) -> Mask - - Constructs a mask from a bitmap and a colour in that bitmap that indicates the - background. - """ - val = _gdi.new_MaskColour(*args, **kwargs) - val.thisown = 1 - return val - +MaskColour = Mask class Icon(GDIObject): def __repr__(self): return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -2082,8 +2081,8 @@ _gdi.EncodingConverter_swigregister(EncodingConverterPtr) def GetTranslation(*args): """ - GetTranslation(String sz) -> String - GetTranslation(String sz1, String sz2, size_t n) -> String + GetTranslation(String str) -> String + GetTranslation(String str, String strPlural, size_t n) -> String """ return _gdi.GetTranslation(*args) @@ -2432,6 +2431,10 @@ class DC(core.Object): """ return _gdi.DC_GetMultiLineTextExtent(*args, **kwargs) + def GetPartialTextExtents(*args, **kwargs): + """GetPartialTextExtents(String text) -> wxArrayInt""" + return _gdi.DC_GetPartialTextExtents(*args, **kwargs) + def GetSize(*args, **kwargs): """ GetSize() -> Size @@ -2807,12 +2810,18 @@ def MemoryDCFromDC(*args, **kwargs): #--------------------------------------------------------------------------- +BUFFER_DC_OVERWRITE_BG = _gdi.BUFFER_DC_OVERWRITE_BG +BUFFER_DC_PRESERVE_BG = _gdi.BUFFER_DC_PRESERVE_BG +BUFFER_DC_DEFAULT = _gdi.BUFFER_DC_DEFAULT class BufferedDC(MemoryDC): def __repr__(self): return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - """__init__(DC dc, Bitmap buffer) -> BufferedDC""" - newobj = _gdi.new_BufferedDC(*args, **kwargs) + def __init__(self, *args): + """ + __init__(DC dc, Bitmap buffer) -> BufferedDC + __init__(DC dc, Size area, int flags=BUFFER_DC_DEFAULT) -> BufferedDC + """ + newobj = _gdi.new_BufferedDC(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown @@ -2830,9 +2839,9 @@ class BufferedDCPtr(BufferedDC): self.__class__ = BufferedDC _gdi.BufferedDC_swigregister(BufferedDCPtr) -def BufferedDCInternalBuffer(*args, **kwargs): - """BufferedDCInternalBuffer(DC dc, Size area) -> BufferedDC""" - val = _gdi.new_BufferedDCInternalBuffer(*args, **kwargs) +def BufferedDCInternalBuffer(*args): + """BufferedDCInternalBuffer(DC dc, Size area, int flags=BUFFER_DC_DEFAULT) -> BufferedDC""" + val = _gdi.new_BufferedDCInternalBuffer(*args) val.thisown = 1 val._dc = args[0] # save a ref so the other dc will not be deleted before self return val @@ -2840,9 +2849,12 @@ def BufferedDCInternalBuffer(*args, **kwargs): class BufferedPaintDC(BufferedDC): 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__(Window window, Bitmap buffer=NullBitmap) -> BufferedPaintDC""" - newobj = _gdi.new_BufferedPaintDC(*args, **kwargs) + def __init__(self, *args): + """ + __init__(Window window, Bitmap buffer) -> BufferedPaintDC + __init__(Window window, int flags=BUFFER_DC_DEFAULT) -> BufferedPaintDC + """ + newobj = _gdi.new_BufferedPaintDC(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown @@ -3402,6 +3414,49 @@ class PenListPtr(PenList): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = PenList _gdi.PenList_swigregister(PenListPtr) +cvar = _gdi.cvar +NORMAL_FONT = cvar.NORMAL_FONT +SMALL_FONT = cvar.SMALL_FONT +ITALIC_FONT = cvar.ITALIC_FONT +SWISS_FONT = cvar.SWISS_FONT +RED_PEN = cvar.RED_PEN +CYAN_PEN = cvar.CYAN_PEN +GREEN_PEN = cvar.GREEN_PEN +BLACK_PEN = cvar.BLACK_PEN +WHITE_PEN = cvar.WHITE_PEN +TRANSPARENT_PEN = cvar.TRANSPARENT_PEN +BLACK_DASHED_PEN = cvar.BLACK_DASHED_PEN +GREY_PEN = cvar.GREY_PEN +MEDIUM_GREY_PEN = cvar.MEDIUM_GREY_PEN +LIGHT_GREY_PEN = cvar.LIGHT_GREY_PEN +BLUE_BRUSH = cvar.BLUE_BRUSH +GREEN_BRUSH = cvar.GREEN_BRUSH +WHITE_BRUSH = cvar.WHITE_BRUSH +BLACK_BRUSH = cvar.BLACK_BRUSH +TRANSPARENT_BRUSH = cvar.TRANSPARENT_BRUSH +CYAN_BRUSH = cvar.CYAN_BRUSH +RED_BRUSH = cvar.RED_BRUSH +GREY_BRUSH = cvar.GREY_BRUSH +MEDIUM_GREY_BRUSH = cvar.MEDIUM_GREY_BRUSH +LIGHT_GREY_BRUSH = cvar.LIGHT_GREY_BRUSH +BLACK = cvar.BLACK +WHITE = cvar.WHITE +RED = cvar.RED +BLUE = cvar.BLUE +GREEN = cvar.GREEN +CYAN = cvar.CYAN +LIGHT_GREY = cvar.LIGHT_GREY +STANDARD_CURSOR = cvar.STANDARD_CURSOR +HOURGLASS_CURSOR = cvar.HOURGLASS_CURSOR +CROSS_CURSOR = cvar.CROSS_CURSOR +NullBitmap = cvar.NullBitmap +NullIcon = cvar.NullIcon +NullCursor = cvar.NullCursor +NullPen = cvar.NullPen +NullBrush = cvar.NullBrush +NullPalette = cvar.NullPalette +NullFont = cvar.NullFont +NullColour = cvar.NullColour class BrushList(core.Object): def __init__(self): raise RuntimeError, "No constructor defined" @@ -3505,6 +3560,7 @@ _gdi.FontList_swigregister(FontListPtr) #--------------------------------------------------------------------------- +NullColor = NullColour #--------------------------------------------------------------------------- class Effects(core.Object): @@ -3578,49 +3634,6 @@ class EffectsPtr(Effects): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = Effects _gdi.Effects_swigregister(EffectsPtr) -cvar = _gdi.cvar -NORMAL_FONT = cvar.NORMAL_FONT -SMALL_FONT = cvar.SMALL_FONT -ITALIC_FONT = cvar.ITALIC_FONT -SWISS_FONT = cvar.SWISS_FONT -RED_PEN = cvar.RED_PEN -CYAN_PEN = cvar.CYAN_PEN -GREEN_PEN = cvar.GREEN_PEN -BLACK_PEN = cvar.BLACK_PEN -WHITE_PEN = cvar.WHITE_PEN -TRANSPARENT_PEN = cvar.TRANSPARENT_PEN -BLACK_DASHED_PEN = cvar.BLACK_DASHED_PEN -GREY_PEN = cvar.GREY_PEN -MEDIUM_GREY_PEN = cvar.MEDIUM_GREY_PEN -LIGHT_GREY_PEN = cvar.LIGHT_GREY_PEN -BLUE_BRUSH = cvar.BLUE_BRUSH -GREEN_BRUSH = cvar.GREEN_BRUSH -WHITE_BRUSH = cvar.WHITE_BRUSH -BLACK_BRUSH = cvar.BLACK_BRUSH -TRANSPARENT_BRUSH = cvar.TRANSPARENT_BRUSH -CYAN_BRUSH = cvar.CYAN_BRUSH -RED_BRUSH = cvar.RED_BRUSH -GREY_BRUSH = cvar.GREY_BRUSH -MEDIUM_GREY_BRUSH = cvar.MEDIUM_GREY_BRUSH -LIGHT_GREY_BRUSH = cvar.LIGHT_GREY_BRUSH -BLACK = cvar.BLACK -WHITE = cvar.WHITE -RED = cvar.RED -BLUE = cvar.BLUE -GREEN = cvar.GREEN -CYAN = cvar.CYAN -LIGHT_GREY = cvar.LIGHT_GREY -STANDARD_CURSOR = cvar.STANDARD_CURSOR -HOURGLASS_CURSOR = cvar.HOURGLASS_CURSOR -CROSS_CURSOR = cvar.CROSS_CURSOR -NullBitmap = cvar.NullBitmap -NullIcon = cvar.NullIcon -NullCursor = cvar.NullCursor -NullPen = cvar.NullPen -NullBrush = cvar.NullBrush -NullPalette = cvar.NullPalette -NullFont = cvar.NullFont -NullColour = cvar.NullColour TheFontList = cvar.TheFontList ThePenList = cvar.ThePenList TheBrushList = cvar.TheBrushList