elementary/map - map supports language,changed
[framework/uifw/elementary.git] / src / lib / elm_mapbuf.h
1 /**
2  * @defgroup Mapbuf Mapbuf
3  * @ingroup Elementary
4  *
5  * @image html mapbuf_inheritance_tree.png
6  * @image latex mapbuf_inheritance_tree.eps
7  *
8  * @image html img/widget/mapbuf/preview-00.png
9  * @image latex img/widget/mapbuf/preview-00.eps width=\textwidth
10  *
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
16  * children).
17  *
18  * This widget inherits from @ref elm-container-class, so that the
19  * functions meant to act on it will work for mapbuf objects:
20  *
21  * @li @ref elm_object_part_content_set
22  * @li @ref elm_object_part_content_get
23  * @li @ref elm_object_part_content_unset
24  *
25  * Default content parts of the mapbuf widget that you can use are:
26  * @li "default" - The main content of the mapbuf
27  *
28  * To enable map, elm_mapbuf_enabled_set() should be used.
29  *
30  * See how to use this widget in this example:
31  * @ref mapbuf_example
32  */
33
34 /**
35  * @addtogroup Mapbuf
36  * @{
37  */
38
39 /**
40  * Add a new mapbuf widget to the given parent Elementary
41  * (container) object.
42  *
43  * @param parent The parent object.
44  * @return A new mapbuf widget handle or @c NULL, on errors.
45  *
46  * This function inserts a new mapbuf widget on the canvas.
47  *
48  * @ingroup Mapbuf
49  */
50 EAPI Evas_Object                 *elm_mapbuf_add(Evas_Object *parent);
51
52 /**
53  * Enable or disable the map.
54  *
55  * @param obj The mapbuf object.
56  * @param enabled @c EINA_TRUE to enable map or @c EINA_FALSE to disable it.
57  *
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.
61  *
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.
65  *
66  * When disabled, the stored map will be freed and geometry prior to
67  * enabling the map will be restored.
68  *
69  * It's disabled by default.
70  *
71  * @see elm_mapbuf_alpha_set()
72  * @see elm_mapbuf_smooth_set()
73  *
74  * @ingroup Mapbuf
75  */
76 EAPI void                         elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled);
77
78 /**
79  * Get a value whether map is enabled or not.
80  *
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.
84  *
85  * @see elm_mapbuf_enabled_set() for details.
86  *
87  * @ingroup Mapbuf
88  */
89 EAPI Eina_Bool                    elm_mapbuf_enabled_get(const Evas_Object *obj);
90
91 /**
92  * Enable or disable smooth map rendering.
93  *
94  * @param obj The mapbuf object.
95  * @param smooth @c EINA_TRUE to enable smooth map rendering or @c EINA_FALSE
96  * to disable it.
97  *
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.
101  *
102  * By default smooth maps are enabled.
103  *
104  * @ingroup Mapbuf
105  */
106 EAPI void                         elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth);
107
108 /**
109  * Get a value whether smooth map rendering is enabled or not.
110  *
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.
114  *
115  * @see elm_mapbuf_smooth_set() for details.
116  *
117  * @ingroup Mapbuf
118  */
119 EAPI Eina_Bool                    elm_mapbuf_smooth_get(const Evas_Object *obj);
120
121 /**
122  * Set or unset alpha flag for map rendering.
123  *
124  * @param obj The mapbuf object.
125  * @param alpha @c EINA_TRUE to enable alpha blending or @c EINA_FALSE
126  * to disable it.
127  *
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.
132  *
133  * Alpha is enabled by default.
134  *
135  * @ingroup Mapbuf
136  */
137 EAPI void                         elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha);
138
139 /**
140  * Get a value whether alpha blending is enabled or not.
141  *
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.
145  *
146  * @see elm_mapbuf_alpha_set() for details.
147  *
148  * @ingroup Mapbuf
149  */
150 EAPI Eina_Bool                    elm_mapbuf_alpha_get(const Evas_Object *obj);
151
152 /**
153  * @}
154  */