X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/105e45b9d02d7e9ed10923957ae1ce60c037273d..db8db70a19a52f14f284a99cafbf2f18c66372ea:/utils/wxPython/src/gtk/misc.py diff --git a/utils/wxPython/src/gtk/misc.py b/utils/wxPython/src/gtk/misc.py index 5b6db41e76..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) @@ -512,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 @@ -532,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