X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d55e5bfc69a44b707b15fd27050d8bf634ef92c7..e2b79cc98f97159a78d3e7d4560366a5b3cd0dcf:/wxPython/contrib/activex/activex.py diff --git a/wxPython/contrib/activex/activex.py b/wxPython/contrib/activex/activex.py index f9a5010a0a..fbe686a9c0 100644 --- a/wxPython/contrib/activex/activex.py +++ b/wxPython/contrib/activex/activex.py @@ -1,11 +1,59 @@ -# This file was created automatically by SWIG. +# This file was created automatically by SWIG 1.3.29. # Don't modify this file, modify the SWIG interface instead. import _activex +import new +new_instancemethod = new.instancemethod +def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "thisown"): return self.this.own(value) + if (name == "this"): + if type(value).__name__ == 'PySwigObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) + if (not static) or hasattr(self,name): + self.__dict__[name] = value + else: + raise AttributeError("You cannot add attributes to %s" % self) + +def _swig_setattr(self,class_type,name,value): + return _swig_setattr_nondynamic(self,class_type,name,value,0) + +def _swig_getattr(self,class_type,name): + if (name == "thisown"): return self.this.own() + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError,name + +def _swig_repr(self): + try: strthis = "proxy of " + self.this.__repr__() + except: strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + +import types +try: + _object = types.ObjectType + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 +del types + + +def _swig_setattr_nondynamic_method(set): + def set_attr(self,name,value): + if (name == "thisown"): return self.this.own(value) + if hasattr(self,name) or (name == "this"): + set(self,name,value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + return set_attr + import _core wx = _core -__docfilter__ = wx.__docfilter__ +__docfilter__ = wx.__DocFilter(globals()) #--------------------------------------------------------------------------- class CLSID(object): @@ -16,9 +64,9 @@ class CLSID(object): 'WordPad.Document.1') or a classID string, (such as '{CA8A9783-280D-11CF-A24D-444553540000}'). """ - def __repr__(self): - return "<%s.%s; proxy of C++ CLSID instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): """ __init__(self, String id) -> CLSID @@ -28,16 +76,9 @@ class CLSID(object): 'WordPad.Document.1') or a classID string, (such as '{CA8A9783-280D-11CF-A24D-444553540000}'). """ - newobj = _activex.new_CLSID(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown - def __del__(self, destroy=_activex.delete_CLSID): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass - + _activex.CLSID_swiginit(self,_activex.new_CLSID(*args, **kwargs)) + __swig_destroy__ = _activex.delete_CLSID + __del__ = lambda self : None; def GetCLSIDString(*args, **kwargs): """GetCLSIDString(self) -> String""" return _activex.CLSID_GetCLSIDString(*args, **kwargs) @@ -47,20 +88,15 @@ class CLSID(object): return _activex.CLSID_GetProgIDString(*args, **kwargs) def __str__(self): return self.GetCLSIDString() - -class CLSIDPtr(CLSID): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = CLSID -_activex.CLSID_swigregister(CLSIDPtr) +_activex.CLSID_swigregister(CLSID) #--------------------------------------------------------------------------- class ParamX(object): - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxParamX instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + """Proxy of C++ ParamX class""" + 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" + __repr__ = _swig_repr flags = property(_activex.ParamX_flags_get) isPtr = property(_activex.ParamX_isPtr_get) isSafeArray = property(_activex.ParamX_isSafeArray_get) @@ -75,35 +111,25 @@ class ParamX(object): isRetVal = property(_activex.ParamX_IsRetVal) - -class ParamXPtr(ParamX): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = ParamX -_activex.ParamX_swigregister(ParamXPtr) +_activex.ParamX_swigregister(ParamX) class FuncX(object): - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxFuncX instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + """Proxy of C++ FuncX class""" + 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" + __repr__ = _swig_repr name = property(_activex.FuncX_name_get) memid = property(_activex.FuncX_memid_get) hasOut = property(_activex.FuncX_hasOut_get) retType = property(_activex.FuncX_retType_get) params = property(_activex.FuncX_params_get) - -class FuncXPtr(FuncX): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = FuncX -_activex.FuncX_swigregister(FuncXPtr) +_activex.FuncX_swigregister(FuncX) class PropX(object): - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPropX instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + """Proxy of C++ PropX class""" + 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" + __repr__ = _swig_repr name = property(_activex.PropX_name_get) memid = property(_activex.PropX_memid_get) type = property(_activex.PropX_type_get) @@ -113,18 +139,13 @@ class PropX(object): canSet = property(_activex.PropX_CanSet) - -class PropXPtr(PropX): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = PropX -_activex.PropX_swigregister(PropXPtr) +_activex.PropX_swigregister(PropX) class ParamXArray(object): - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxParamXArray instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + """Proxy of C++ ParamXArray class""" + 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" + __repr__ = _swig_repr def __nonzero__(*args, **kwargs): """__nonzero__(self) -> bool""" return _activex.ParamXArray___nonzero__(*args, **kwargs) @@ -137,18 +158,13 @@ class ParamXArray(object): """__getitem__(self, int idx) -> ParamX""" return _activex.ParamXArray___getitem__(*args, **kwargs) - -class ParamXArrayPtr(ParamXArray): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = ParamXArray -_activex.ParamXArray_swigregister(ParamXArrayPtr) +_activex.ParamXArray_swigregister(ParamXArray) class FuncXArray(object): - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxFuncXArray instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + """Proxy of C++ FuncXArray class""" + 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" + __repr__ = _swig_repr def __nonzero__(*args, **kwargs): """__nonzero__(self) -> bool""" return _activex.FuncXArray___nonzero__(*args, **kwargs) @@ -161,18 +177,13 @@ class FuncXArray(object): """__getitem__(self, int idx) -> FuncX""" return _activex.FuncXArray___getitem__(*args, **kwargs) - -class FuncXArrayPtr(FuncXArray): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = FuncXArray -_activex.FuncXArray_swigregister(FuncXArrayPtr) +_activex.FuncXArray_swigregister(FuncXArray) class PropXArray(object): - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxPropXArray instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + """Proxy of C++ PropXArray class""" + 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" + __repr__ = _swig_repr def __nonzero__(*args, **kwargs): """__nonzero__(self) -> bool""" return _activex.PropXArray___nonzero__(*args, **kwargs) @@ -185,13 +196,7 @@ class PropXArray(object): """__getitem__(self, int idx) -> PropX""" return _activex.PropXArray___getitem__(*args, **kwargs) - -class PropXArrayPtr(PropXArray): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = PropXArray -_activex.PropXArray_swigregister(PropXArrayPtr) +_activex.PropXArray_swigregister(PropXArray) #--------------------------------------------------------------------------- @@ -207,9 +212,9 @@ class ActiveXWindow(_core.Window): specified by the TypeInfo. """ - def __repr__(self): - return "<%s.%s; proxy of C++ wxActiveXWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): """ __init__(self, Window parent, CLSID clsId, int id=-1, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, @@ -218,10 +223,7 @@ class ActiveXWindow(_core.Window): Creates an ActiveX control from the clsID given and makes it act as much like a regular wx.Window as possible. """ - newobj = _activex.new_ActiveXWindow(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + _activex.ActiveXWindow_swiginit(self,_activex.new_ActiveXWindow(*args, **kwargs)) self._setOORInfo(self) def GetCLSID(*args, **kwargs): @@ -337,35 +339,29 @@ class ActiveXWindow(_core.Window): """ return self._CallAXMethod(name, args) - -class ActiveXWindowPtr(ActiveXWindow): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = ActiveXWindow -_activex.ActiveXWindow_swigregister(ActiveXWindowPtr) +_activex.ActiveXWindow_swigregister(ActiveXWindow) #--------------------------------------------------------------------------- def RegisterActiveXEvent(*args, **kwargs): - """ - RegisterActiveXEvent(String eventName) -> wxEventType + """ + RegisterActiveXEvent(String eventName) -> EventType Creates a standard wx event ID for the given eventName. """ - return _activex.RegisterActiveXEvent(*args, **kwargs) + return _activex.RegisterActiveXEvent(*args, **kwargs) class ActiveXEvent(_core.CommandEvent): """ An instance of ActiveXEvent is sent to the handler for all bound ActiveX events. Any event parameters from the ActiveX cntrol are turned into attributes of the Python proxy for this event object. Additionally, there is a property called eventName that will - return (suprizingly ) the name of the ActiveX event. + return (surprisingly ) the name of the ActiveX event. """ - def __init__(self): raise RuntimeError, "No constructor defined" - def __repr__(self): - return "<%s.%s; proxy of C++ wxActiveXEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + 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" + __repr__ = _swig_repr eventName = property(_activex.ActiveXEvent_EventName) def _preCallInit(*args, **kwargs): @@ -376,36 +372,23 @@ class ActiveXEvent(_core.CommandEvent): """_postCallCleanup(self, PyObject pyself)""" return _activex.ActiveXEvent__postCallCleanup(*args, **kwargs) - -class ActiveXEventPtr(ActiveXEvent): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = ActiveXEvent -_activex.ActiveXEvent_swigregister(ActiveXEventPtr) +_activex.ActiveXEvent_swigregister(ActiveXEvent) #--------------------------------------------------------------------------- class IEHtmlWindowBase(ActiveXWindow): - def __repr__(self): - return "<%s.%s; proxy of C++ wxIEHtmlWindowBase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): - newobj = _activex.new_IEHtmlWindowBase(*args, **kwargs) - self.this = newobj.this - self.thisown = 1 - del newobj.thisown + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + _activex.IEHtmlWindowBase_swiginit(self,_activex.new_IEHtmlWindowBase(*args, **kwargs)) + self._setOORInfo(self) + def SetCharset(*args, **kwargs): return _activex.IEHtmlWindowBase_SetCharset(*args, **kwargs) def LoadString(*args, **kwargs): return _activex.IEHtmlWindowBase_LoadString(*args, **kwargs) def LoadStream(*args, **kwargs): return _activex.IEHtmlWindowBase_LoadStream(*args, **kwargs) def GetStringSelection(*args, **kwargs): return _activex.IEHtmlWindowBase_GetStringSelection(*args, **kwargs) def GetText(*args, **kwargs): return _activex.IEHtmlWindowBase_GetText(*args, **kwargs) - -class IEHtmlWindowBasePtr(IEHtmlWindowBase): - def __init__(self, this): - self.this = this - if not hasattr(self,"thisown"): self.thisown = 0 - self.__class__ = IEHtmlWindowBase -_activex.IEHtmlWindowBase_swigregister(IEHtmlWindowBasePtr) +_activex.IEHtmlWindowBase_swigregister(IEHtmlWindowBase) #--------------------------------------------------------------------------- # Some helper and utility functions for ActiveX @@ -618,3 +601,4 @@ class %s(wx.activex.ActiveXWindow): #--------------------------------------------------------------------------- +