Mapbuf
A mapbuf component is a container UI component that uses an Evas map to hold a content object. This component is used to improve the moving and resizing performance of complex UI components.
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 component is faster than frequently moving the content object.
The mapbuf component inherits all the functions of the container class.
Figure: Mapbuf hierarchy
The mapbuf component does not emit any signals and therefore does not provide any callbacks that you can register.
Creating a Mapbuf
To create a mapbuf component, use the elm_mapbuf_add() function:
Evas_Object *mapbuf, *parent, *content; // Creating a mapbuf mapbuf = elm_mapbuf_add(parent);
Adding Content to the Mapbuf
To add content to the mapbuf component, use the elm_object_content_set() function with the default part:
elm_object_content_set(mapbuf, content);
Note |
---|
Calling the elm_object_content_set(mapbuf, content) function is equivalent to calling the elm_object_part_content_set(mapbuf, "default", content) function. |
To activate smooth map rendering and alpha rendering for the mapbuf component:
elm_mapbuf_smooth_set(mapbuf, EINA_TRUE); elm_mapbuf_alpha_set(mapbuf, EINA_TRUE);
Activating the Mapbuf
To use the mapbuf component, activate it:
elm_mapbuf_enabled_set(mapbuf, EINA_TRUE);
Note |
---|
Except as noted, this content is licensed under LGPLv2.1+. |