X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01f6b6d3c8c719123fd435aabb45fb9b2bbf79ff..9165401fbedc620814401be5e6d6729dfa59c311:/wxPython/src/gtk/_gdi.py diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index db99f94407..24753ce4ae 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -68,8 +68,7 @@ class GDIObject(_core.Object): """IsNull(self) -> bool""" return _gdi_.GDIObject_IsNull(*args, **kwargs) -GDIObject_swigregister = _gdi_.GDIObject_swigregister -GDIObject_swigregister(GDIObject) +_gdi_.GDIObject_swigregister(GDIObject) #--------------------------------------------------------------------------- @@ -234,8 +233,7 @@ class Colour(_core.Object): __safe_for_unpickling__ = True def __reduce__(self): return (Colour, self.Get()) -Colour_swigregister = _gdi_.Colour_swigregister -Colour_swigregister(Colour) +_gdi_.Colour_swigregister(Colour) def NamedColour(*args, **kwargs): """ @@ -286,8 +284,7 @@ class Palette(GDIObject): return _gdi_.Palette_Ok(*args, **kwargs) def __nonzero__(self): return self.Ok() -Palette_swigregister = _gdi_.Palette_swigregister -Palette_swigregister(Palette) +_gdi_.Palette_swigregister(Palette) #--------------------------------------------------------------------------- @@ -375,8 +372,7 @@ class Pen(GDIObject): return _gdi_.Pen___ne__(*args, **kwargs) def __nonzero__(self): return self.Ok() -Pen_swigregister = _gdi_.Pen_swigregister -Pen_swigregister(Pen) +_gdi_.Pen_swigregister(Pen) #--------------------------------------------------------------------------- @@ -465,8 +461,7 @@ class Brush(GDIObject): return _gdi_.Brush_Ok(*args, **kwargs) def __nonzero__(self): return self.Ok() -Brush_swigregister = _gdi_.Brush_swigregister -Brush_swigregister(Brush) +_gdi_.Brush_swigregister(Brush) def BrushFromBitmap(*args, **kwargs): """ @@ -652,8 +647,7 @@ class Bitmap(GDIObject): """__ne__(self, Bitmap other) -> bool""" return _gdi_.Bitmap___ne__(*args, **kwargs) -Bitmap_swigregister = _gdi_.Bitmap_swigregister -Bitmap_swigregister(Bitmap) +_gdi_.Bitmap_swigregister(Bitmap) def EmptyBitmap(*args, **kwargs): """ @@ -738,8 +732,7 @@ class Mask(_core.Object): _gdi_.Mask_swiginit(self,_gdi_.new_Mask(*args, **kwargs)) __swig_destroy__ = _gdi_.delete_Mask __del__ = lambda self : None; -Mask_swigregister = _gdi_.Mask_swigregister -Mask_swigregister(Mask) +_gdi_.Mask_swigregister(Mask) MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.") class Icon(GDIObject): @@ -788,8 +781,7 @@ class Icon(GDIObject): return _gdi_.Icon_CopyFromBitmap(*args, **kwargs) def __nonzero__(self): return self.Ok() -Icon_swigregister = _gdi_.Icon_swigregister -Icon_swigregister(Icon) +_gdi_.Icon_swigregister(Icon) def EmptyIcon(*args, **kwargs): """EmptyIcon() -> Icon""" @@ -841,8 +833,7 @@ class IconLocation(object): """GetIndex(self) -> int""" return _gdi_.IconLocation_GetIndex(*args, **kwargs) -IconLocation_swigregister = _gdi_.IconLocation_swigregister -IconLocation_swigregister(IconLocation) +_gdi_.IconLocation_swigregister(IconLocation) class IconBundle(object): """Proxy of C++ IconBundle class""" @@ -865,8 +856,7 @@ class IconBundle(object): """GetIcon(self, Size size) -> Icon""" return _gdi_.IconBundle_GetIcon(*args, **kwargs) -IconBundle_swigregister = _gdi_.IconBundle_swigregister -IconBundle_swigregister(IconBundle) +_gdi_.IconBundle_swigregister(IconBundle) def IconBundleFromFile(*args, **kwargs): """IconBundleFromFile(String file, long type) -> IconBundle""" @@ -908,8 +898,7 @@ class Cursor(GDIObject): return _gdi_.Cursor_Ok(*args, **kwargs) def __nonzero__(self): return self.Ok() -Cursor_swigregister = _gdi_.Cursor_swigregister -Cursor_swigregister(Cursor) +_gdi_.Cursor_swigregister(Cursor) def StockCursor(*args, **kwargs): """ @@ -1037,8 +1026,7 @@ class Region(GDIObject): """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool""" return _gdi_.Region_UnionBitmapColour(*args, **kwargs) -Region_swigregister = _gdi_.Region_swigregister -Region_swigregister(Region) +_gdi_.Region_swigregister(Region) def RegionFromBitmap(*args, **kwargs): """RegionFromBitmap(Bitmap bmp) -> Region""" @@ -1108,8 +1096,7 @@ class RegionIterator(_core.Object): """__nonzero__(self) -> bool""" return _gdi_.RegionIterator___nonzero__(*args, **kwargs) -RegionIterator_swigregister = _gdi_.RegionIterator_swigregister -RegionIterator_swigregister(RegionIterator) +_gdi_.RegionIterator_swigregister(RegionIterator) #--------------------------------------------------------------------------- @@ -1301,7 +1288,7 @@ class NativeFontInfo(object): return _gdi_.NativeFontInfo_SetUnderlined(*args, **kwargs) def SetFaceName(*args, **kwargs): - """SetFaceName(self, String facename)""" + """SetFaceName(self, String facename) -> bool""" return _gdi_.NativeFontInfo_SetFaceName(*args, **kwargs) def SetFamily(*args, **kwargs): @@ -1332,8 +1319,7 @@ class NativeFontInfo(object): """ToUserString(self) -> String""" return _gdi_.NativeFontInfo_ToUserString(*args, **kwargs) -NativeFontInfo_swigregister = _gdi_.NativeFontInfo_swigregister -NativeFontInfo_swigregister(NativeFontInfo) +_gdi_.NativeFontInfo_swigregister(NativeFontInfo) class NativeEncodingInfo(object): """Proxy of C++ NativeEncodingInfo class""" @@ -1354,8 +1340,7 @@ class NativeEncodingInfo(object): """ToString(self) -> String""" return _gdi_.NativeEncodingInfo_ToString(*args, **kwargs) -NativeEncodingInfo_swigregister = _gdi_.NativeEncodingInfo_swigregister -NativeEncodingInfo_swigregister(NativeEncodingInfo) +_gdi_.NativeEncodingInfo_swigregister(NativeEncodingInfo) def GetNativeFontEncoding(*args, **kwargs): @@ -1440,8 +1425,7 @@ class FontMapper(object): """SetDialogTitle(self, String title)""" return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs) -FontMapper_swigregister = _gdi_.FontMapper_swigregister -FontMapper_swigregister(FontMapper) +_gdi_.FontMapper_swigregister(FontMapper) def FontMapper_Get(*args): """FontMapper_Get() -> FontMapper""" @@ -1695,7 +1679,7 @@ class Font(GDIObject): def SetFaceName(*args, **kwargs): """ - SetFaceName(self, String faceName) + SetFaceName(self, String faceName) -> bool Sets the facename for the font. The facename, which should be a valid font installed on the end-user's system. @@ -1734,7 +1718,7 @@ class Font(GDIObject): def SetNativeFontInfoFromString(*args, **kwargs): """ - SetNativeFontInfoFromString(self, String info) + SetNativeFontInfoFromString(self, String info) -> bool Set the font's attributes from string representation of a `wx.NativeFontInfo` object. @@ -1743,7 +1727,7 @@ class Font(GDIObject): def SetNativeFontInfoUserDesc(*args, **kwargs): """ - SetNativeFontInfoUserDesc(self, String info) + SetNativeFontInfoUserDesc(self, String info) -> bool Set the font's attributes from a string formerly returned from `GetNativeFontInfoDesc`. @@ -1801,8 +1785,7 @@ class Font(GDIObject): return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) SetDefaultEncoding = staticmethod(SetDefaultEncoding) -Font_swigregister = _gdi_.Font_swigregister -Font_swigregister(Font) +_gdi_.Font_swigregister(Font) def FontFromNativeInfo(*args, **kwargs): """ @@ -1927,15 +1910,43 @@ class FontEnumerator(object): return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs) def GetEncodings(*args, **kwargs): - """GetEncodings(self) -> PyObject""" + """GetEncodings() -> PyObject""" return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs) + GetEncodings = staticmethod(GetEncodings) def GetFacenames(*args, **kwargs): - """GetFacenames(self) -> PyObject""" + """GetFacenames() -> PyObject""" return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs) -FontEnumerator_swigregister = _gdi_.FontEnumerator_swigregister -FontEnumerator_swigregister(FontEnumerator) + GetFacenames = staticmethod(GetFacenames) + def IsValidFacename(*args, **kwargs): + """ + IsValidFacename(String str) -> bool + + Convenience function that returns true if the given face name exist in + the user's system + """ + return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs) + + IsValidFacename = staticmethod(IsValidFacename) +_gdi_.FontEnumerator_swigregister(FontEnumerator) + +def FontEnumerator_GetEncodings(*args): + """FontEnumerator_GetEncodings() -> PyObject""" + return _gdi_.FontEnumerator_GetEncodings(*args) + +def FontEnumerator_GetFacenames(*args): + """FontEnumerator_GetFacenames() -> PyObject""" + return _gdi_.FontEnumerator_GetFacenames(*args) + +def FontEnumerator_IsValidFacename(*args, **kwargs): + """ + FontEnumerator_IsValidFacename(String str) -> bool + + Convenience function that returns true if the given face name exist in + the user's system + """ + return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs) #--------------------------------------------------------------------------- @@ -2178,8 +2189,7 @@ class LanguageInfo(object): Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set) CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set) Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set) -LanguageInfo_swigregister = _gdi_.LanguageInfo_swigregister -LanguageInfo_swigregister(LanguageInfo) +_gdi_.LanguageInfo_swigregister(LanguageInfo) LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE @@ -2294,8 +2304,7 @@ class Locale(object): """GetName(self) -> String""" return _gdi_.Locale_GetName(*args, **kwargs) -Locale_swigregister = _gdi_.Locale_swigregister -Locale_swigregister(Locale) +_gdi_.Locale_swigregister(Locale) def Locale_GetSystemLanguage(*args): """Locale_GetSystemLanguage() -> int""" @@ -2375,8 +2384,7 @@ class EncodingConverter(_core.Object): CanConvert = staticmethod(CanConvert) def __nonzero__(self): return self.IsOk() -EncodingConverter_swigregister = _gdi_.EncodingConverter_swigregister -EncodingConverter_swigregister(EncodingConverter) +_gdi_.EncodingConverter_swigregister(EncodingConverter) def GetTranslation(*args): """ @@ -3369,7 +3377,7 @@ class DC(_core.Object): """ GetPPI(self) -> Size - Resolution in Pixels per inch + Resolution in pixels per inch """ return _gdi_.DC_GetPPI(*args, **kwargs) @@ -3869,8 +3877,7 @@ class DC(_core.Object): raise ValueError('backgrounds and coords must have same length') return self._DrawTextList(textList, coords, foregrounds, backgrounds) -DC_swigregister = _gdi_.DC_swigregister -DC_swigregister(DC) +_gdi_.DC_swigregister(DC) #--------------------------------------------------------------------------- @@ -3919,8 +3926,7 @@ class MemoryDC(DC): """ return _gdi_.MemoryDC_SelectObject(*args, **kwargs) -MemoryDC_swigregister = _gdi_.MemoryDC_swigregister -MemoryDC_swigregister(MemoryDC) +_gdi_.MemoryDC_swigregister(MemoryDC) def MemoryDCFromDC(*args, **kwargs): """ @@ -3972,8 +3978,7 @@ class BufferedDC(MemoryDC): """ return _gdi_.BufferedDC_UnMask(*args, **kwargs) -BufferedDC_swigregister = _gdi_.BufferedDC_swigregister -BufferedDC_swigregister(BufferedDC) +_gdi_.BufferedDC_swigregister(BufferedDC) class BufferedPaintDC(BufferedDC): """ @@ -4012,8 +4017,7 @@ class BufferedPaintDC(BufferedDC): """ _gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs)) -BufferedPaintDC_swigregister = _gdi_.BufferedPaintDC_swigregister -BufferedPaintDC_swigregister(BufferedPaintDC) +_gdi_.BufferedPaintDC_swigregister(BufferedPaintDC) #--------------------------------------------------------------------------- @@ -4077,8 +4081,7 @@ class ScreenDC(DC): """ return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs) -ScreenDC_swigregister = _gdi_.ScreenDC_swigregister -ScreenDC_swigregister(ScreenDC) +_gdi_.ScreenDC_swigregister(ScreenDC) #--------------------------------------------------------------------------- @@ -4105,8 +4108,7 @@ class ClientDC(DC): Constructor. Pass the window on which you wish to paint. """ _gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs)) -ClientDC_swigregister = _gdi_.ClientDC_swigregister -ClientDC_swigregister(ClientDC) +_gdi_.ClientDC_swigregister(ClientDC) #--------------------------------------------------------------------------- @@ -4136,8 +4138,7 @@ class PaintDC(DC): Constructor. Pass the window on which you wish to paint. """ _gdi_.PaintDC_swiginit(self,_gdi_.new_PaintDC(*args, **kwargs)) -PaintDC_swigregister = _gdi_.PaintDC_swigregister -PaintDC_swigregister(PaintDC) +_gdi_.PaintDC_swigregister(PaintDC) #--------------------------------------------------------------------------- @@ -4157,8 +4158,7 @@ class WindowDC(DC): Constructor. Pass the window on which you wish to paint. """ _gdi_.WindowDC_swiginit(self,_gdi_.new_WindowDC(*args, **kwargs)) -WindowDC_swigregister = _gdi_.WindowDC_swigregister -WindowDC_swigregister(WindowDC) +_gdi_.WindowDC_swigregister(WindowDC) #--------------------------------------------------------------------------- @@ -4182,8 +4182,7 @@ class MirrorDC(DC): *mirror* is True. """ _gdi_.MirrorDC_swiginit(self,_gdi_.new_MirrorDC(*args, **kwargs)) -MirrorDC_swigregister = _gdi_.MirrorDC_swigregister -MirrorDC_swigregister(MirrorDC) +_gdi_.MirrorDC_swigregister(MirrorDC) #--------------------------------------------------------------------------- @@ -4226,8 +4225,7 @@ class PostScriptDC(DC): return _gdi_.PostScriptDC_GetResolution(*args, **kwargs) GetResolution = staticmethod(GetResolution) -PostScriptDC_swigregister = _gdi_.PostScriptDC_swigregister -PostScriptDC_swigregister(PostScriptDC) +_gdi_.PostScriptDC_swigregister(PostScriptDC) def PostScriptDC_SetResolution(*args, **kwargs): """ @@ -4255,8 +4253,7 @@ class MetaFile(_core.Object): def __init__(self, *args, **kwargs): """__init__(self, String filename=EmptyString) -> MetaFile""" _gdi_.MetaFile_swiginit(self,_gdi_.new_MetaFile(*args, **kwargs)) -MetaFile_swigregister = _gdi_.MetaFile_swigregister -MetaFile_swigregister(MetaFile) +_gdi_.MetaFile_swigregister(MetaFile) class MetaFileDC(DC): """Proxy of C++ MetaFileDC class""" @@ -4268,8 +4265,7 @@ class MetaFileDC(DC): String description=EmptyString) -> MetaFileDC """ _gdi_.MetaFileDC_swiginit(self,_gdi_.new_MetaFileDC(*args, **kwargs)) -MetaFileDC_swigregister = _gdi_.MetaFileDC_swigregister -MetaFileDC_swigregister(MetaFileDC) +_gdi_.MetaFileDC_swigregister(MetaFileDC) class PrinterDC(DC): """Proxy of C++ PrinterDC class""" @@ -4278,8 +4274,7 @@ class PrinterDC(DC): def __init__(self, *args, **kwargs): """__init__(self, wxPrintData printData) -> PrinterDC""" _gdi_.PrinterDC_swiginit(self,_gdi_.new_PrinterDC(*args, **kwargs)) -PrinterDC_swigregister = _gdi_.PrinterDC_swigregister -PrinterDC_swigregister(PrinterDC) +_gdi_.PrinterDC_swigregister(PrinterDC) #--------------------------------------------------------------------------- @@ -4343,11 +4338,10 @@ class ImageList(_core.Object): return _gdi_.ImageList_RemoveAll(*args, **kwargs) def GetSize(*args, **kwargs): - """GetSize() -> (width,height)""" + """GetSize(index) -> (width,height)""" return _gdi_.ImageList_GetSize(*args, **kwargs) -ImageList_swigregister = _gdi_.ImageList_swigregister -ImageList_swigregister(ImageList) +_gdi_.ImageList_swigregister(ImageList) #--------------------------------------------------------------------------- @@ -4431,49 +4425,54 @@ class StockGDI(object): def _initStockObjects(): import wx - wx.ITALIC_FONT = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC) - wx.NORMAL_FONT = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL) - wx.SMALL_FONT = StockGDI.instance().GetFont(StockGDI.FONT_SMALL) - wx.SWISS_FONT = StockGDI.instance().GetFont(StockGDI.FONT_SWISS) + wx.ITALIC_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC).this + wx.NORMAL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL).this + wx.SMALL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SMALL).this + wx.SWISS_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SWISS).this - wx.BLACK_DASHED_PEN = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED) - wx.BLACK_PEN = StockGDI.GetPen(StockGDI.PEN_BLACK) - wx.CYAN_PEN = StockGDI.GetPen(StockGDI.PEN_CYAN) - wx.GREEN_PEN = StockGDI.GetPen(StockGDI.PEN_GREEN) - wx.GREY_PEN = StockGDI.GetPen(StockGDI.PEN_GREY) - wx.LIGHT_GREY_PEN = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY) - wx.MEDIUM_GREY_PEN = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY) - wx.RED_PEN = StockGDI.GetPen(StockGDI.PEN_RED) - wx.TRANSPARENT_PEN = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT) - wx.WHITE_PEN = StockGDI.GetPen(StockGDI.PEN_WHITE) - - wx.BLACK_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_BLACK) - wx.BLUE_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_BLUE) - wx.CYAN_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_CYAN) - wx.GREEN_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_GREEN) - wx.GREY_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_GREY) - wx.LIGHT_GREY_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY) - wx.MEDIUM_GREY_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY) - wx.RED_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_RED) - wx.TRANSPARENT_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT) - wx.WHITE_BRUSH = StockGDI.GetBrush(StockGDI.BRUSH_WHITE) - - wx.BLACK = StockGDI.GetColour(StockGDI.COLOUR_BLACK) - wx.BLUE = StockGDI.GetColour(StockGDI.COLOUR_BLUE) - wx.CYAN = StockGDI.GetColour(StockGDI.COLOUR_CYAN) - wx.GREEN = StockGDI.GetColour(StockGDI.COLOUR_GREEN) - wx.LIGHT_GREY = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY) - wx.RED = StockGDI.GetColour(StockGDI.COLOUR_RED) - wx.WHITE = StockGDI.GetColour(StockGDI.COLOUR_WHITE) - - wx.CROSS_CURSOR = StockGDI.GetCursor(StockGDI.CURSOR_CROSS) - wx.HOURGLASS_CURSOR = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS) - wx.STANDARD_CURSOR = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD) + wx.BLACK_DASHED_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED).this + wx.BLACK_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACK).this + wx.CYAN_PEN.this = StockGDI.GetPen(StockGDI.PEN_CYAN).this + wx.GREEN_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREEN).this + wx.GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREY).this + wx.LIGHT_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY).this + wx.MEDIUM_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY).this + wx.RED_PEN.this = StockGDI.GetPen(StockGDI.PEN_RED).this + wx.TRANSPARENT_PEN.this = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT).this + wx.WHITE_PEN.this = StockGDI.GetPen(StockGDI.PEN_WHITE).this + + wx.BLACK_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLACK).this + wx.BLUE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLUE).this + wx.CYAN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_CYAN).this + wx.GREEN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREEN).this + wx.GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREY).this + wx.LIGHT_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY).this + wx.MEDIUM_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY).this + wx.RED_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_RED).this + wx.TRANSPARENT_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT).this + wx.WHITE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_WHITE).this + + wx.BLACK.this = StockGDI.GetColour(StockGDI.COLOUR_BLACK).this + wx.BLUE.this = StockGDI.GetColour(StockGDI.COLOUR_BLUE).this + wx.CYAN.this = StockGDI.GetColour(StockGDI.COLOUR_CYAN).this + wx.GREEN.this = StockGDI.GetColour(StockGDI.COLOUR_GREEN).this + wx.LIGHT_GREY.this = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY).this + wx.RED.this = StockGDI.GetColour(StockGDI.COLOUR_RED).this + wx.WHITE.this = StockGDI.GetColour(StockGDI.COLOUR_WHITE).this + + wx.CROSS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_CROSS).this + wx.HOURGLASS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS).this + wx.STANDARD_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD).this + + wx.TheFontList.this = _wxPyInitTheFontList().this + wx.ThePenList.this = _wxPyInitThePenList().this + wx.TheBrushList.this = _wxPyInitTheBrushList().this + wx.TheColourDatabase.this = _wxPyInitTheColourDatabase().this + _initStockObjects = staticmethod(_initStockObjects) -StockGDI_swigregister = _gdi_.StockGDI_swigregister -StockGDI_swigregister(StockGDI) +_gdi_.StockGDI_swigregister(StockGDI) def StockGDI_DeleteAll(*args): """StockGDI_DeleteAll()""" @@ -4499,6 +4498,47 @@ def StockGDI_GetPen(*args, **kwargs): """StockGDI_GetPen(int item) -> Pen""" return _gdi_.StockGDI_GetPen(*args, **kwargs) +# Create an uninitialized instance for the stock objects, they will +# be initialized later when the wx.App object is created. +ITALIC_FONT = Font.__new__(Font) +NORMAL_FONT = Font.__new__(Font) +SMALL_FONT = Font.__new__(Font) +SWISS_FONT = Font.__new__(Font) + +BLACK_DASHED_PEN = Pen.__new__(Pen) +BLACK_PEN = Pen.__new__(Pen) +CYAN_PEN = Pen.__new__(Pen) +GREEN_PEN = Pen.__new__(Pen) +GREY_PEN = Pen.__new__(Pen) +LIGHT_GREY_PEN = Pen.__new__(Pen) +MEDIUM_GREY_PEN = Pen.__new__(Pen) +RED_PEN = Pen.__new__(Pen) +TRANSPARENT_PEN = Pen.__new__(Pen) +WHITE_PEN = Pen.__new__(Pen) + +BLACK_BRUSH = Brush.__new__(Brush) +BLUE_BRUSH = Brush.__new__(Brush) +CYAN_BRUSH = Brush.__new__(Brush) +GREEN_BRUSH = Brush.__new__(Brush) +GREY_BRUSH = Brush.__new__(Brush) +LIGHT_GREY_BRUSH = Brush.__new__(Brush) +MEDIUM_GREY_BRUSH = Brush.__new__(Brush) +RED_BRUSH = Brush.__new__(Brush) +TRANSPARENT_BRUSH = Brush.__new__(Brush) +WHITE_BRUSH = Brush.__new__(Brush) + +BLACK = Colour.__new__(Colour) +BLUE = Colour.__new__(Colour) +CYAN = Colour.__new__(Colour) +GREEN = Colour.__new__(Colour) +LIGHT_GREY = Colour.__new__(Colour) +RED = Colour.__new__(Colour) +WHITE = Colour.__new__(Colour) + +CROSS_CURSOR = Cursor.__new__(Cursor) +HOURGLASS_CURSOR = Cursor.__new__(Cursor) +STANDARD_CURSOR = Cursor.__new__(Cursor) + class GDIObjListBase(object): """Proxy of C++ GDIObjListBase class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') @@ -4508,8 +4548,7 @@ class GDIObjListBase(object): _gdi_.GDIObjListBase_swiginit(self,_gdi_.new_GDIObjListBase(*args, **kwargs)) __swig_destroy__ = _gdi_.delete_GDIObjListBase __del__ = lambda self : None; -GDIObjListBase_swigregister = _gdi_.GDIObjListBase_swigregister -GDIObjListBase_swigregister(GDIObjListBase) +_gdi_.GDIObjListBase_swigregister(GDIObjListBase) cvar = _gdi_.cvar NullBitmap = cvar.NullBitmap NullIcon = cvar.NullIcon @@ -4540,8 +4579,7 @@ class PenList(GDIObjListBase): AddPen = wx._deprecated(AddPen) RemovePen = wx._deprecated(RemovePen) -PenList_swigregister = _gdi_.PenList_swigregister -PenList_swigregister(PenList) +_gdi_.PenList_swigregister(PenList) class BrushList(GDIObjListBase): """Proxy of C++ BrushList class""" @@ -4563,8 +4601,7 @@ class BrushList(GDIObjListBase): AddBrush = wx._deprecated(AddBrush) RemoveBrush = wx._deprecated(RemoveBrush) -BrushList_swigregister = _gdi_.BrushList_swigregister -BrushList_swigregister(BrushList) +_gdi_.BrushList_swigregister(BrushList) class FontList(GDIObjListBase): """Proxy of C++ FontList class""" @@ -4590,8 +4627,7 @@ class FontList(GDIObjListBase): AddFont = wx._deprecated(AddFont) RemoveFont = wx._deprecated(RemoveFont) -FontList_swigregister = _gdi_.FontList_swigregister -FontList_swigregister(FontList) +_gdi_.FontList_swigregister(FontList) class ColourDatabase(object): """Proxy of C++ ColourDatabase class""" @@ -4619,8 +4655,7 @@ class ColourDatabase(object): """Append(self, String name, int red, int green, int blue)""" return _gdi_.ColourDatabase_Append(*args, **kwargs) -ColourDatabase_swigregister = _gdi_.ColourDatabase_swigregister -ColourDatabase_swigregister(ColourDatabase) +_gdi_.ColourDatabase_swigregister(ColourDatabase) #--------------------------------------------------------------------------- @@ -4640,29 +4675,12 @@ def _wxPyInitTheBrushList(*args): def _wxPyInitTheColourDatabase(*args): """_wxPyInitTheColourDatabase() -> ColourDatabase""" return _gdi_._wxPyInitTheColourDatabase(*args) -# This function makes a class used to do delayed initialization of some -# stock wx objects. When they are used the first time then an init function -# is called to make the real instance, which is then used to replace the -# original instance and class seen by the programmer. -def _wxPyMakeDelayedInitWrapper(initFunc): - class _wxPyStockObjectWrapper(object): - def __init__(self, *args): - self._args = args - def __getattr__(self, name): - obj = initFunc(*self._args) - self.__class__ = obj.__class__ - self.__dict__ = obj.__dict__ - return getattr(self, name) - def __str__(self): - return self.__getattr__("__str__")() - def __repr__(self): - return self.__getattr__("__repr__")() - return _wxPyStockObjectWrapper - -wxTheFontList = _wxPyMakeDelayedInitWrapper(_wxPyInitTheFontList)() -wxThePenList = _wxPyMakeDelayedInitWrapper(_wxPyInitThePenList)() -wxTheBrushList = _wxPyMakeDelayedInitWrapper(_wxPyInitTheBrushList)() -wxTheColourDatabase = _wxPyMakeDelayedInitWrapper(_wxPyInitTheColourDatabase)() +# Create an uninitialized instance for the stock objects, they will +# be initialized later when the wx.App object is created. +TheFontList = FontList.__new__(FontList) +ThePenList = PenList.__new__(PenList) +TheBrushList = BrushList.__new__(BrushList) +TheColourDatabase = ColourDatabase.__new__(ColourDatabase) NullColor = NullColour #--------------------------------------------------------------------------- @@ -4729,8 +4747,7 @@ class Effects(_core.Object): """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool""" return _gdi_.Effects_TileBitmap(*args, **kwargs) -Effects_swigregister = _gdi_.Effects_swigregister -Effects_swigregister(Effects) +_gdi_.Effects_swigregister(Effects) #--------------------------------------------------------------------------- @@ -4783,8 +4800,7 @@ class SplitterRenderParams(object): widthSash = property(_gdi_.SplitterRenderParams_widthSash_get) border = property(_gdi_.SplitterRenderParams_border_get) isHotSensitive = property(_gdi_.SplitterRenderParams_isHotSensitive_get) -SplitterRenderParams_swigregister = _gdi_.SplitterRenderParams_swigregister -SplitterRenderParams_swigregister(SplitterRenderParams) +_gdi_.SplitterRenderParams_swigregister(SplitterRenderParams) class RendererVersion(object): """ @@ -4814,8 +4830,7 @@ class RendererVersion(object): IsCompatible = staticmethod(IsCompatible) version = property(_gdi_.RendererVersion_version_get) age = property(_gdi_.RendererVersion_age_get) -RendererVersion_swigregister = _gdi_.RendererVersion_swigregister -RendererVersion_swigregister(RendererVersion) +_gdi_.RendererVersion_swigregister(RendererVersion) def RendererVersion_IsCompatible(*args, **kwargs): """RendererVersion_IsCompatible(RendererVersion ver) -> bool""" @@ -4834,6 +4849,11 @@ class RendererNative(object): genereic controls in ways that are as close to the native look as possible. + Note that each drawing function restores the `wx.DC` attributes if it + changes them, so it is safe to assume that the same pen, brush and + colours that were active before the call to this function are still in + effect after it. + """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self): raise AttributeError, "No constructor defined" @@ -4997,8 +5017,7 @@ class RendererNative(object): """ return _gdi_.RendererNative_GetVersion(*args, **kwargs) -RendererNative_swigregister = _gdi_.RendererNative_swigregister -RendererNative_swigregister(RendererNative) +_gdi_.RendererNative_swigregister(RendererNative) def RendererNative_Get(*args): """