6 #define FNAME widgets_list_3_grouped_start
7 #define NAME "Widgets List 3 Grouped"
8 #define ICON "widgets.png"
19 static Evas_Object *o_images[NUM];
20 static Evas_Object *o_icons[NUM];
21 static Evas_Object *o_texts[NUM];
23 static const char *icons[] =
43 static const char *labels[] =
80 static void _setup(void)
84 for (i = 0; i < NUM; i++)
86 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
88 efl_gfx_image_border_insets_set(o, 2, 2, 2, 2);
89 efl_file_simple_load(o, build_path("pan.png"), NULL);
90 efl_gfx_entity_size_set(o, EINA_SIZE2D(win_w, ICON_SIZE));
91 efl_gfx_entity_visible_set(o, EINA_TRUE);
93 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
95 efl_gfx_image_border_insets_set(o, 2, 2, 2, 2);
96 efl_file_simple_load(o, build_path(icons[i % 13]), NULL);
97 efl_gfx_entity_size_set(o, EINA_SIZE2D(ICON_SIZE - 8, ICON_SIZE - 8));
98 efl_gfx_entity_visible_set(o, EINA_TRUE);
100 o = evas_object_text_add(evas);
103 efl_text_font_family_set(o, "Vera-Bold");
104 efl_text_font_size_set(o, 10);
105 efl_text_set(o, labels[i % 26]);
107 evas_object_text_font_set(o, "Vera-Bold", 10);
108 evas_object_text_text_set(o, labels[i % 26]);
110 efl_gfx_color_set(o, 0, 0, 0, 255);
111 efl_gfx_entity_visible_set(o, EINA_TRUE);
113 for (i = 0; i < NUM; i++)
115 efl_gfx_stack_raise_to_top(o_images[i]);
117 for (i = 0; i < NUM; i++)
119 efl_gfx_stack_raise_to_top(o_icons[i]);
121 for (i = 0; i < NUM; i++)
124 efl_gfx_stack_above(o_icons[i], o_icons[i - 13]);
126 for (i = 0; i < NUM; i++)
128 efl_gfx_stack_raise_to_top(o_texts[i]);
134 static void _cleanup(void)
137 for (i = 0; i < NUM; i++)
139 efl_del(o_images[i]);
145 /* loop - do things */
146 static void _loop(double t, int f)
149 Evas_Coord x, y, tw, th, cent;
152 for (i = 0; i < NUM; i++)
154 efl_gfx_entity_position_set(o_images[i], EINA_POSITION2D(x, y));
155 efl_gfx_entity_position_set(o_icons[i], EINA_POSITION2D(x + 4, y + 4));
156 exp_size_get(o_texts[i], &tw, &th);
157 cent = (ICON_SIZE - th) / 2;
158 efl_gfx_entity_position_set(o_texts[i], EINA_POSITION2D(x + 8 + ICON_SIZE + 8, y + cent));
164 /* prepend special key handlers if interactive (before STD) */
165 static void _key(const char *key)
181 /* template stuff - ignore */
186 _ui_menu_item_add(ICON, NAME, FNAME);
197 ui_func_set(_key, _loop, _setup);