Mapbuf Container

A mapbuf widget is a container widget that uses an Evas map to hold a content object. This widget is used to improve the moving and resizing performance of complex widgets.

The content object is treated as a single image by the Evas map. If you have a content object containing several child objects, frequently moving the mapbuf widget will be faster than frequently moving the content object.

The mapbuf widget inherits all the functions of the container class.

Table of Contents

Creating a Mapbuf

To create a mapbuf widget, use the elm_mapbuf_add() function:

Evas Object* mapbuf = elm_mapbuf_add(parent);

Adding Content to the Mapbuf

To add content to the mapbuf widget, use the elm_object_content_set() function with the “default” part:

elm_object_content_set(mapbuf, content);
Calling elm_object_content_set(mapbuf, content) is equivalent to calling elm_object_part_content_set(mapbuf, “default”, content).

To activate smooth map rendering and alpha rendering for the mapbuf widget:

elm_mapbuf_smooth_set(mapbuf, EINA_TRUE);
elm_mapbuf_alpha_set(mapbuf, EINA_TRUE);

Activating the Mapbuf

Finally, to use the mapbuf widget, you must activate it:

elm_mapbuf_enabled_set (mapbuf, EINA_TRUE);

This enables the map that is set or disables it. On enable, the object geometry will be saved, and the new geometry will change (position and size) to reflect the map geometry set.

Also, when enabled, alpha and smooth states will be used, so if the content isn't solid, alpha should be enabled, for example, otherwise a black rectangle will fill the content.

When disabled, the stored map will be freed and geometry prior to enabling the map will be restored.

It's disabled by default.


The mapbuf widget does not emit any signals and therefore does not provide any callbacks that you can register.

A Mapbuf Example