2 * @defgroup Mapbuf Mapbuf
5 * @image html mapbuf_inheritance_tree.png
6 * @image latex mapbuf_inheritance_tree.eps
8 * @image html img/widget/mapbuf/preview-00.png
9 * @image latex img/widget/mapbuf/preview-00.eps width=\textwidth
11 * This holds one content object and uses an Evas Map of transformation
12 * points to be later used with this content. So the content will be
13 * moved, resized, etc as a single image. So it will improve performance
14 * when you have a complex interface, with a lot of elements, and will
15 * need to resize or move it frequently (the content object and its
18 * This widget inherits from @ref elm-container-class, so that the
19 * functions meant to act on it will work for mapbuf objects:
21 * @li @ref elm_object_part_content_set
22 * @li @ref elm_object_part_content_get
23 * @li @ref elm_object_part_content_unset
25 * Default content parts of the mapbuf widget that you can use are:
26 * @li "default" - The main content of the mapbuf
28 * To enable map, elm_mapbuf_enabled_set() should be used.
30 * See how to use this widget in this example:
40 * Add a new mapbuf widget to the given parent Elementary
43 * @param parent The parent object.
44 * @return A new mapbuf widget handle or @c NULL, on errors.
46 * This function inserts a new mapbuf widget on the canvas.
50 EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent);
53 * Enable or disable the map.
55 * @param obj The mapbuf object.
56 * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it.
58 * This enables the map that is set or disables it. On enable, the object
59 * geometry will be saved, and the new geometry will change (position and
60 * size) to reflect the map geometry set.
62 * Also, when enabled, alpha and smooth states will be used, so if the
63 * content isn't solid, alpha should be enabled, for example, otherwise
64 * a black rectangle will fill the content.
66 * When disabled, the stored map will be freed and geometry prior to
67 * enabling the map will be restored.
69 * It's disabled by default.
71 * @see elm_mapbuf_alpha_set()
72 * @see elm_mapbuf_smooth_set()
76 EAPI void elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled);
79 * Get a value whether map is enabled or not.
81 * @param obj The mapbuf object.
82 * @return @c EINA_TRUE means map is enabled. @c EINA_FALSE indicates
83 * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
85 * @see elm_mapbuf_enabled_set() for details.
89 EAPI Eina_Bool elm_mapbuf_enabled_get(const Evas_Object *obj);
92 * Enable or disable smooth map rendering.
94 * @param obj The mapbuf object.
95 * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE
98 * This sets smoothing for map rendering. If the object is a type that has
99 * its own smoothing settings, then both the smooth settings for this object
100 * and the map must be turned off.
102 * By default smooth maps are enabled.
106 EAPI void elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth);
109 * Get a value whether smooth map rendering is enabled or not.
111 * @param obj The mapbuf object.
112 * @return @c EINA_TRUE means smooth map rendering is enabled. @c EINA_FALSE
113 * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
115 * @see elm_mapbuf_smooth_set() for details.
119 EAPI Eina_Bool elm_mapbuf_smooth_get(const Evas_Object *obj);
122 * Set or unset alpha flag for map rendering.
124 * @param obj The mapbuf object.
125 * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE
128 * This sets alpha flag for map rendering. If the object is a type that has
129 * its own alpha settings, then this will take precedence. Only image objects
130 * have this currently. It stops alpha blending of the map area, and is
131 * useful if you know the object and/or all sub-objects is 100% solid.
133 * Alpha is enabled by default.
137 EAPI void elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha);
140 * Get a value whether alpha blending is enabled or not.
142 * @param obj The mapbuf object.
143 * @return @c EINA_TRUE means alpha blending is enabled. @c EINA_FALSE
144 * indicates it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
146 * @see elm_mapbuf_alpha_set() for details.
150 EAPI Eina_Bool elm_mapbuf_alpha_get(const Evas_Object *obj);