X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78bba745fc1ded9def5066792f6611960372af4c..d30e0edda826c92918de02fade41f05d2c4417ca:/utils/wxPython/src/gtk/misc.py diff --git a/utils/wxPython/src/gtk/misc.py b/utils/wxPython/src/gtk/misc.py index 50d8781f5c..d72a369b9d 100644 --- a/utils/wxPython/src/gtk/misc.py +++ b/utils/wxPython/src/gtk/misc.py @@ -10,16 +10,34 @@ class wxSizePtr : def Set(self,arg0,arg1): val = miscc.wxSize_Set(self.this,arg0,arg1) return val + def GetX(self): + val = miscc.wxSize_GetX(self.this) + return val + def GetY(self): + val = miscc.wxSize_GetY(self.this) + return val def GetWidth(self): val = miscc.wxSize_GetWidth(self.this) return val def GetHeight(self): val = miscc.wxSize_GetHeight(self.this) return val - def __str__(self): - val = miscc.wxSize___str__(self.this) + def SetWidth(self,arg0): + val = miscc.wxSize_SetWidth(self.this,arg0) + return val + def SetHeight(self,arg0): + val = miscc.wxSize_SetHeight(self.this,arg0) + return val + def asTuple(self): + val = miscc.wxSize_asTuple(self.this) return val def __setattr__(self,name,value): + if name == "x" : + miscc.wxSize_x_set(self.this,value) + return + if name == "y" : + miscc.wxSize_y_set(self.this,value) + return if name == "width" : miscc.wxSize_width_set(self.this,value) return @@ -28,6 +46,10 @@ class wxSizePtr : return self.__dict__[name] = value def __getattr__(self,name): + if name == "x" : + return miscc.wxSize_x_get(self.this) + if name == "y" : + return miscc.wxSize_y_get(self.this) if name == "width" : return miscc.wxSize_width_get(self.this) if name == "height" : @@ -35,6 +57,8 @@ class wxSizePtr : raise AttributeError,name def __repr__(self): return "" + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) class wxSize(wxSizePtr): def __init__(self,*args) : self.this = apply(miscc.new_wxSize,()+args) @@ -84,8 +108,8 @@ class wxPointPtr : def Set(self,arg0,arg1): val = miscc.wxPoint_Set(self.this,arg0,arg1) return val - def __str__(self): - val = miscc.wxPoint___str__(self.this) + def asTuple(self): + val = miscc.wxPoint_asTuple(self.this) return val def __setattr__(self,name,value): if name == "x" : @@ -103,6 +127,8 @@ class wxPointPtr : raise AttributeError,name def __repr__(self): return "" + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) class wxPoint(wxPointPtr): def __init__(self,*args) : self.this = apply(miscc.new_wxPoint,()+args) @@ -164,6 +190,9 @@ class wxRectPtr : def GetRight(self): val = miscc.wxRect_GetRight(self.this) return val + def asTuple(self): + val = miscc.wxRect_asTuple(self.this) + return val def __setattr__(self,name,value): if name == "x" : miscc.wxRect_x_set(self.this,value) @@ -190,6 +219,8 @@ class wxRectPtr : raise AttributeError,name def __repr__(self): return "" + def __str__(self): return str(self.asTuple()) + def __repr__(self): return str(self.asTuple()) class wxRect(wxRectPtr): def __init__(self,*args) : self.this = apply(miscc.new_wxRect,()+args) @@ -325,6 +356,141 @@ class wxLayoutConstraints(wxLayoutConstraintsPtr): +class wxRegionPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self): + if self.thisown == 1 : + miscc.delete_wxRegion(self.this) + def Clear(self): + val = miscc.wxRegion_Clear(self.this) + return val + def Contains(self,arg0,arg1): + val = miscc.wxRegion_Contains(self.this,arg0,arg1) + return val + def ContainsPoint(self,arg0): + val = miscc.wxRegion_ContainsPoint(self.this,arg0.this) + return val + def ContainsRect(self,arg0): + val = miscc.wxRegion_ContainsRect(self.this,arg0.this) + return val + def GetBox(self): + val = miscc.wxRegion_GetBox(self.this) + val = wxRectPtr(val) + val.thisown = 1 + return val + def Intersect(self,arg0): + val = miscc.wxRegion_Intersect(self.this,arg0.this) + return val + def Subtract(self,arg0): + val = miscc.wxRegion_Subtract(self.this,arg0.this) + return val + def Union(self,arg0): + val = miscc.wxRegion_Union(self.this,arg0.this) + return val + def Xor(self,arg0): + val = miscc.wxRegion_Xor(self.this,arg0.this) + return val + def __repr__(self): + return "" +class wxRegion(wxRegionPtr): + def __init__(self) : + self.this = miscc.new_wxRegion() + self.thisown = 1 + + + + +class wxRegionIteratorPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self): + if self.thisown == 1 : + miscc.delete_wxRegionIterator(self.this) + def GetX(self): + val = miscc.wxRegionIterator_GetX(self.this) + return val + def GetY(self): + val = miscc.wxRegionIterator_GetY(self.this) + return val + def GetW(self): + val = miscc.wxRegionIterator_GetW(self.this) + return val + def GetWidth(self): + val = miscc.wxRegionIterator_GetWidth(self.this) + return val + def GetH(self): + val = miscc.wxRegionIterator_GetH(self.this) + return val + def GetHeight(self): + val = miscc.wxRegionIterator_GetHeight(self.this) + return val + def GetRect(self): + val = miscc.wxRegionIterator_GetRect(self.this) + val = wxRectPtr(val) + val.thisown = 1 + return val + def HaveRects(self): + val = miscc.wxRegionIterator_HaveRects(self.this) + return val + def Reset(self): + val = miscc.wxRegionIterator_Reset(self.this) + return val + def Next(self): + val = miscc.wxRegionIterator_Next(self.this) + return val + def __repr__(self): + return "" +class wxRegionIterator(wxRegionIteratorPtr): + def __init__(self,arg0) : + self.this = miscc.new_wxRegionIterator(arg0.this) + self.thisown = 1 + + + + +class wxAcceleratorEntryPtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def Set(self,arg0,arg1,arg2): + val = miscc.wxAcceleratorEntry_Set(self.this,arg0,arg1,arg2) + return val + def GetFlags(self): + val = miscc.wxAcceleratorEntry_GetFlags(self.this) + return val + def GetKeyCode(self): + val = miscc.wxAcceleratorEntry_GetKeyCode(self.this) + return val + def GetCommand(self): + val = miscc.wxAcceleratorEntry_GetCommand(self.this) + return val + def __repr__(self): + return "" +class wxAcceleratorEntry(wxAcceleratorEntryPtr): + def __init__(self,*args) : + self.this = apply(miscc.new_wxAcceleratorEntry,()+args) + self.thisown = 1 + + + + +class wxAcceleratorTablePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def __repr__(self): + return "" +class wxAcceleratorTable(wxAcceleratorTablePtr): + def __init__(self,arg0) : + self.this = miscc.new_wxAcceleratorTable(arg0.this) + self.thisown = 1 + + + + #-------------- FUNCTION WRAPPERS ------------------ @@ -377,6 +543,10 @@ def wxSetCursor(arg0): val = miscc.wxSetCursor(arg0.this) return val +wxNewId = miscc.wxNewId + +wxRegisterId = miscc.wxRegisterId + NewId = miscc.NewId RegisterId = miscc.RegisterId @@ -397,32 +567,20 @@ wxEndBusyCursor = miscc.wxEndBusyCursor wxExecute = miscc.wxExecute -def wxFindWindowByLabel(arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFindWindowByLabel,(arg0,)+args) - val = wxWindowPtr(val) - return val - -def wxFindWindowByName(arg0,*args): - argl = map(None,args) - try: argl[0] = argl[0].this - except: pass - args = tuple(argl) - val = apply(miscc.wxFindWindowByName,(arg0,)+args) - val = wxWindowPtr(val) - return val - wxGetMousePosition = miscc.wxGetMousePosition wxIsBusy = miscc.wxIsBusy wxNow = miscc.wxNow +wxSleep = miscc.wxSleep + wxYield = miscc.wxYield +wxSafeYield = miscc.wxSafeYield + +wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows + wxGetResource = miscc.wxGetResource wxResourceAddIdentifier = miscc.wxResourceAddIdentifier @@ -477,3 +635,6 @@ wxLeftOf = miscc.wxLeftOf wxRightOf = miscc.wxRightOf wxSameAs = miscc.wxSameAs wxAbsolute = miscc.wxAbsolute +wxOutRegion = miscc.wxOutRegion +wxPartRegion = miscc.wxPartRegion +wxInRegion = miscc.wxInRegion