Module fig :: Class ObjectProxy

Class ObjectProxy




An ObjectProxy is a special Container that is used for search results (see Container.findObjects) which offers two additional features:

remove():

Use like foo.findObjects(type = fig.Polyline).remove()

Removes all objects within this object proxy from the parent container (the one findObjects was called on).

setting attributes:

foo.findObjects(type = fig.Polyline).lineWidth = 4

Setting an attribute is promoted to all contained objects which have that attribute. (E.g. setting fontSize will affect only Text objects.)



Instance Methods
 
__setattr__(self, key, value)
x.__setattr__('name', value) <==> x.name = value
 
__getattr__(self, key)
 
__getslice__(self, *args)
x[i:j]
 
remove(self, *args)
When no arguments are given, remove all objects from parent container.
 
__add__(self, other)
x+y

Inherited from Container: __deepcopy__, allObjects, bounds, findObjects, layer, layers

Inherited from list: __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iadd__, __imul__, __init__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, append, count, extend, index, insert, pop, reverse, sort

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __str__

Properties
  parent

Inherited from object: __class__

Method Details

__setattr__(self, key, value)

 
x.__setattr__('name', value) <==> x.name = value
Overrides: object.__setattr__
(inherited documentation)

__getslice__(self, *args)
(Slicling operator)

 

x[i:j]

Use of negative indices is not supported.

Overrides: list.__getslice__
(inherited documentation)

remove(self, *args)

 
When no arguments are given, remove all objects from parent container. Else, remove given object from this container.
Overrides: Container.remove

__add__(self, other)
(Addition operator)

 
x+y
Overrides: list.__add__
(inherited documentation)