X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..b8fbf1a035db2af6d3aba89203263a4711cb7c53:/wxPython/src/gtk/gdi.py diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index cd1d2386c7..78eeff00ba 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -2,7 +2,33 @@ import gdic from misc import * -class wxBitmapPtr : +class wxGDIObjectPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxGDIObject(self) + def GetVisible(self, *_args, **_kwargs): + val = apply(gdic.wxGDIObject_GetVisible,(self,) + _args, _kwargs) + return val + def SetVisible(self, *_args, **_kwargs): + val = apply(gdic.wxGDIObject_SetVisible,(self,) + _args, _kwargs) + return val + def IsNull(self, *_args, **_kwargs): + val = apply(gdic.wxGDIObject_IsNull,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxGDIObject(wxGDIObjectPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gdic.new_wxGDIObject,_args,_kwargs) + self.thisown = 1 + + + + +class wxBitmapPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -69,10 +95,13 @@ class wxBitmap(wxBitmapPtr): -class wxMaskPtr : +class wxMaskPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 + def Destroy(self, *_args, **_kwargs): + val = apply(gdic.wxMask_Destroy,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxMask(wxMaskPtr): @@ -83,7 +112,7 @@ class wxMask(wxMaskPtr): -class wxIconPtr : +class wxIconPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -114,6 +143,9 @@ class wxIconPtr : def SetDepth(self, *_args, **_kwargs): val = apply(gdic.wxIcon_SetDepth,(self,) + _args, _kwargs) return val + def CopyFromBitmap(self, *_args, **_kwargs): + val = apply(gdic.wxIcon_CopyFromBitmap,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) @@ -132,7 +164,7 @@ class wxIcon(wxIconPtr): -class wxCursorPtr : +class wxCursorPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -151,10 +183,13 @@ class wxCursor(wxCursorPtr): -class wxFontPtr : +class wxFontPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxFont(self) def Ok(self, *_args, **_kwargs): val = apply(gdic.wxFont_Ok,(self,) + _args, _kwargs) return val @@ -219,7 +254,30 @@ class wxFont(wxFontPtr): -class wxColourPtr : +class wxFontListPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def AddFont(self, *_args, **_kwargs): + val = apply(gdic.wxFontList_AddFont,(self,) + _args, _kwargs) + return val + def FindOrCreateFont(self, *_args, **_kwargs): + val = apply(gdic.wxFontList_FindOrCreateFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) + return val + def RemoveFont(self, *_args, **_kwargs): + val = apply(gdic.wxFontList_RemoveFont,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxFontList(wxFontListPtr): + def __init__(self,this): + self.this = this + + + + +class wxColourPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -257,16 +315,42 @@ class wxColour(wxColourPtr): -class wxPenPtr : +class wxColourDatabasePtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def FindColour(self, *_args, **_kwargs): + val = apply(gdic.wxColourDatabase_FindColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) + return val + def FindName(self, *_args, **_kwargs): + val = apply(gdic.wxColourDatabase_FindName,(self,) + _args, _kwargs) + return val + def Append(self, *_args, **_kwargs): + val = apply(gdic.wxColourDatabase_Append,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxColourDatabase(wxColourDatabasePtr): + def __init__(self,this): + self.this = this + + + + +class wxPenPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxPen(self) def GetCap(self, *_args, **_kwargs): val = apply(gdic.wxPen_GetCap,(self,) + _args, _kwargs) return val def GetColour(self, *_args, **_kwargs): val = apply(gdic.wxPen_GetColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetJoin(self, *_args, **_kwargs): val = apply(gdic.wxPen_GetJoin,(self,) + _args, _kwargs) @@ -311,13 +395,39 @@ class wxPen(wxPenPtr): -class wxBrushPtr : +class wxPenListPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 + def AddPen(self, *_args, **_kwargs): + val = apply(gdic.wxPenList_AddPen,(self,) + _args, _kwargs) + return val + def FindOrCreatePen(self, *_args, **_kwargs): + val = apply(gdic.wxPenList_FindOrCreatePen,(self,) + _args, _kwargs) + if val: val = wxPenPtr(val) + return val + def RemovePen(self, *_args, **_kwargs): + val = apply(gdic.wxPenList_RemovePen,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPenList(wxPenListPtr): + def __init__(self,this): + self.this = this + + + + +class wxBrushPtr(wxGDIObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxBrush(self) def GetColour(self, *_args, **_kwargs): val = apply(gdic.wxBrush_GetColour,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetStipple(self, *_args, **_kwargs): val = apply(gdic.wxBrush_GetStipple,(self,) + _args, _kwargs) @@ -348,7 +458,30 @@ class wxBrush(wxBrushPtr): -class wxDCPtr : +class wxBrushListPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def AddBrush(self, *_args, **_kwargs): + val = apply(gdic.wxBrushList_AddBrush,(self,) + _args, _kwargs) + return val + def FindOrCreateBrush(self, *_args, **_kwargs): + val = apply(gdic.wxBrushList_FindOrCreateBrush,(self,) + _args, _kwargs) + if val: val = wxBrushPtr(val) + return val + def RemoveBrush(self, *_args, **_kwargs): + val = apply(gdic.wxBrushList_RemoveBrush,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxBrushList(wxBrushListPtr): + def __init__(self,this): + self.this = this + + + + +class wxDCPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -490,7 +623,7 @@ class wxDCPtr : return val def GetTextBackground(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetTextBackground,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetTextExtent(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetTextExtent,(self,) + _args, _kwargs) @@ -500,7 +633,7 @@ class wxDCPtr : return val def GetTextForeground(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetTextForeground,(self,) + _args, _kwargs) - if val: val = wxColourPtr(val) + if val: val = wxColourPtr(val) ; val.thisown = 1 return val def GetUserScale(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetUserScale,(self,) + _args, _kwargs) @@ -722,7 +855,7 @@ class wxPostScriptDC(wxPostScriptDCPtr): -class wxPalettePtr : +class wxPalettePtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -748,7 +881,7 @@ class wxPalette(wxPalettePtr): -class wxImageListPtr : +class wxImageListPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 @@ -792,6 +925,129 @@ class wxImageList(wxImageListPtr): +class wxRegionPtr(wxGDIObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxRegion(self) + def Clear(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Clear,(self,) + _args, _kwargs) + return val + def Contains(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Contains,(self,) + _args, _kwargs) + return val + def ContainsPoint(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_ContainsPoint,(self,) + _args, _kwargs) + return val + def ContainsRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_ContainsRect,(self,) + _args, _kwargs) + return val + def ContainsRectDim(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_ContainsRectDim,(self,) + _args, _kwargs) + return val + def GetBox(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_GetBox,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def Intersect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Intersect,(self,) + _args, _kwargs) + return val + def IntersectRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_IntersectRect,(self,) + _args, _kwargs) + return val + def IntersectRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_IntersectRegion,(self,) + _args, _kwargs) + return val + def IsEmpty(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_IsEmpty,(self,) + _args, _kwargs) + return val + def Union(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Union,(self,) + _args, _kwargs) + return val + def UnionRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_UnionRect,(self,) + _args, _kwargs) + return val + def UnionRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_UnionRegion,(self,) + _args, _kwargs) + return val + def Subtract(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Subtract,(self,) + _args, _kwargs) + return val + def SubtractRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_SubtractRect,(self,) + _args, _kwargs) + return val + def SubtractRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_SubtractRegion,(self,) + _args, _kwargs) + return val + def Xor(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_Xor,(self,) + _args, _kwargs) + return val + def XorRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_XorRect,(self,) + _args, _kwargs) + return val + def XorRegion(self, *_args, **_kwargs): + val = apply(gdic.wxRegion_XorRegion,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxRegion(wxRegionPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gdic.new_wxRegion,_args,_kwargs) + self.thisown = 1 + + + + +class wxRegionIteratorPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxRegionIterator(self) + def GetX(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetX,(self,) + _args, _kwargs) + return val + def GetY(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetY,(self,) + _args, _kwargs) + return val + def GetW(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetW,(self,) + _args, _kwargs) + return val + def GetWidth(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetWidth,(self,) + _args, _kwargs) + return val + def GetH(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetH,(self,) + _args, _kwargs) + return val + def GetHeight(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetHeight,(self,) + _args, _kwargs) + return val + def GetRect(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_GetRect,(self,) + _args, _kwargs) + if val: val = wxRectPtr(val) ; val.thisown = 1 + return val + def HaveRects(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_HaveRects,(self,) + _args, _kwargs) + return val + def Reset(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_Reset,(self,) + _args, _kwargs) + return val + def Next(self, *_args, **_kwargs): + val = apply(gdic.wxRegionIterator_Next,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxRegionIterator(wxRegionIteratorPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gdic.new_wxRegionIterator,_args,_kwargs) + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ @@ -801,11 +1057,36 @@ def wxEmptyBitmap(*_args, **_kwargs): if val: val = wxBitmapPtr(val); val.thisown = 1 return val +def wxBitmapFromXPMData(*_args, **_kwargs): + val = apply(gdic.wxBitmapFromXPMData,_args,_kwargs) + if val: val = wxBitmapPtr(val); val.thisown = 1 + return val + +def wxBitmapFromIcon(*_args, **_kwargs): + val = apply(gdic.wxBitmapFromIcon,_args,_kwargs) + if val: val = wxBitmapPtr(val); val.thisown = 1 + return val + +def wxBitmapFromBits(*_args, **_kwargs): + val = apply(gdic.wxBitmapFromBits,_args,_kwargs) + if val: val = wxBitmapPtr(val); val.thisown = 1 + return val + def wxMaskColour(*_args, **_kwargs): val = apply(gdic.wxMaskColour,_args,_kwargs) if val: val = wxMaskPtr(val); val.thisown = 1 return val +def wxEmptyIcon(*_args, **_kwargs): + val = apply(gdic.wxEmptyIcon,_args,_kwargs) + if val: val = wxIconPtr(val); val.thisown = 1 + return val + +def wxIconFromXPMData(*_args, **_kwargs): + val = apply(gdic.wxIconFromXPMData,_args,_kwargs) + if val: val = wxIconPtr(val); val.thisown = 1 + return val + def wxStockCursor(*_args, **_kwargs): val = apply(gdic.wxStockCursor,_args,_kwargs) if val: val = wxCursorPtr(val); val.thisown = 1 @@ -901,6 +1182,9 @@ wxNullBrush = wxBrushPtr(gdic.cvar.wxNullBrush) wxNullPalette = wxPalettePtr(gdic.cvar.wxNullPalette) wxNullFont = wxFontPtr(gdic.cvar.wxNullFont) wxNullColour = wxColourPtr(gdic.cvar.wxNullColour) +wxTheFontList = wxFontListPtr(gdic.cvar.wxTheFontList) +wxThePenList = wxPenListPtr(gdic.cvar.wxThePenList) +wxTheColourDatabase = wxColourDatabasePtr(gdic.cvar.wxTheColourDatabase) wxIMAGELIST_DRAW_NORMAL = gdic.wxIMAGELIST_DRAW_NORMAL wxIMAGELIST_DRAW_TRANSPARENT = gdic.wxIMAGELIST_DRAW_TRANSPARENT wxIMAGELIST_DRAW_SELECTED = gdic.wxIMAGELIST_DRAW_SELECTED @@ -908,3 +1192,6 @@ wxIMAGELIST_DRAW_FOCUSED = gdic.wxIMAGELIST_DRAW_FOCUSED wxIMAGE_LIST_NORMAL = gdic.wxIMAGE_LIST_NORMAL wxIMAGE_LIST_SMALL = gdic.wxIMAGE_LIST_SMALL wxIMAGE_LIST_STATE = gdic.wxIMAGE_LIST_STATE +wxOutRegion = gdic.wxOutRegion +wxPartRegion = gdic.wxPartRegion +wxInRegion = gdic.wxInRegion