efl.evas.Smart
Class¶efl.evas.
Smart
¶clipped (bool) – Make this Smart use a clipped class, ignoring the provided
callback methods, except calculate()
and resize()
.
New in version 1.14.
delete
(obj)¶Called in order to remove object from canvas and deallocate its resources.
Usually you delete object’s children here.
member_add
(obj, Object child)¶Called when children is added to object.
member_del
(obj, Object child)¶Called when children is removed from object.
move
(obj, int x, int y)¶Called in order to move object to given position.
Usually you move children here.
resize
(obj, int w, int h)¶Called in order to resize object.
show
(obj)¶Called in order to show the given element.
Usually you call the same function on children.
hide
(obj)¶Called in order to hide the given element.
Usually you call the same function on children.
color_set
(obj, int r, int g, int b, int a)¶Called in order to change object color.
clip_set
(obj, Eo clip)¶Called in order to limit object’s visible area.
clip_unset
(obj)¶Called in order to unlimit object’s visible area.
calculate
(obj)¶Called before object is used for rendering and it is marked as dirty/changed with changed()
.
efl.evas.SmartObject
Class¶efl.evas.
SmartObject
(Canvas canvas, Smart smart, **kwargs)¶Smart objects are user-defined Evas components, often used to group multiple basic elements, associate an object with a clip and deal with them as an unit. See evas documentation for more details.
Pay attention that just creating an object within the SmartObject
doesn’t make it a member! You must do member_add()
or use one of
the provided factories to ensure that. Failing to do so will leave
created objects on different layer and no stacking will be done for you.
Note
If you redefine object’s __init__(), you MUST call your parent! Failing to do so will result in objects that just work from Python and not from C, for instance, adding your object to Edje swallow that clips or set color it will not behave as expected.
Changed in version 1.14: API was broken because this class had some “hackish” behavior which could no longer be supported because of changes in Cython 0.21.1
The abstract methods are now in a separate class Smart
which
should be instantiated and passed to this classes constructor as
parameter smart