efl.evas.Smart Class

class efl.evas.Smart
Parameters

clipped (bool) – Make this Smart use a clipped class, ignoring the provided callback methods, except calculate() and resize().

New in version 1.14.

static delete(obj)

Called in order to remove object from canvas and deallocate its resources.

Usually you delete object’s children here.

static member_add(obj, Object child)

Called when children is added to object.

static member_del(obj, Object child)

Called when children is removed from object.

static move(obj, int x, int y)

Called in order to move object to given position.

Usually you move children here.

static resize(obj, int w, int h)

Called in order to resize object.

static show(obj)

Called in order to show the given element.

Usually you call the same function on children.

static hide(obj)

Called in order to hide the given element.

Usually you call the same function on children.

static color_set(obj, int r, int g, int b, int a)

Called in order to change object color.

static clip_set(obj, Eo clip)

Called in order to limit object’s visible area.

static clip_unset(obj)

Called in order to unlimit object’s visible area.

static calculate(obj)

Called before object is used for rendering and it is marked as dirty/changed with changed().

efl.evas.SmartObject Class

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.

Parameters
  • canvas (Canvas) – Evas canvas for this object

  • smart (Smart) – Smart prototype

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