3 typedef struct _E_Widget_Data E_Widget_Data;
9 static void _e_wid_del_hook(Evas_Object *obj);
11 /* local subsystem functions */
13 /* externally accessible functions */
15 * Creates a new list widget
17 * @param evas the evas pointer
18 * @param homogenous should widgets append to the list be evenly spaced out
19 * @param horiz the direction the list should be displayed
20 * @return the new list wdiget
23 e_widget_list_add(Evas *evas, int homogenous, int horiz)
28 obj = e_widget_add(evas);
30 e_widget_del_hook_set(obj, _e_wid_del_hook);
31 wd = calloc(1, sizeof(E_Widget_Data));
32 e_widget_data_set(obj, wd);
36 e_box_orientation_set(o, horiz);
37 e_box_homogenous_set(o, homogenous);
39 e_widget_sub_object_add(obj, o);
40 e_widget_resize_object_set(obj, o);
46 * Prepend a widget to the list
48 * @param obj the list widget to prepend the sub widget too
49 * @param sobj the sub widget
50 * @param fill DOCUMENT ME!
51 * @param expand DOCUMENT ME!
52 * @param align who the sub widget to be aligned, to wards the center or sides
53 * @return the new list wdiget
56 e_widget_list_object_prepend(Evas_Object *obj, Evas_Object *sobj, int fill, int expand, double align)
61 wd = e_widget_data_get(obj);
63 e_box_pack_start(wd->o_box, sobj);
65 e_widget_size_min_get(sobj, &mw, &mh);
66 if (e_box_orientation_get(wd->o_box) == 1)
67 e_box_pack_options_set(sobj,
69 expand, expand, /* expand */
70 0.5, align, /* align */
72 99999, 99999 /* max */
75 e_box_pack_options_set(sobj,
77 expand, expand, /* expand */
78 align, 0.5, /* align */
80 99999, 99999 /* max */
82 e_box_size_min_get(wd->o_box, &mw, &mh);
83 e_widget_size_min_set(obj, mw, mh);
84 e_widget_sub_object_add(obj, sobj);
85 evas_object_show(sobj);
89 * Append a widget to the list
91 * @param obj the list widget to append the sub widget too
92 * @param sobj the sub widget
93 * @param fill DOCUMENT ME!
94 * @param expand DOCUMENT ME!
95 * @param align who the sub widget to be aligned, to wards the center or sides
96 * @return the new list wdiget
99 e_widget_list_object_append(Evas_Object *obj, Evas_Object *sobj, int fill, int expand, double align)
104 wd = e_widget_data_get(obj);
106 e_box_pack_end(wd->o_box, sobj);
108 e_widget_size_min_get(sobj, &mw, &mh);
109 if (e_box_orientation_get(wd->o_box) == 1)
110 e_box_pack_options_set(sobj,
112 expand, expand, /* expand */
113 0.5, align, /* align */
115 99999, 99999 /* max */
118 e_box_pack_options_set(sobj,
120 expand, expand, /* expand */
121 align, 0.5, /* align */
123 99999, 99999 /* max */
125 e_box_size_min_get(wd->o_box, &mw, &mh);
126 e_widget_size_min_set(obj, mw, mh);
127 e_widget_sub_object_add(obj, sobj);
128 evas_object_show(sobj);
132 e_widget_list_object_repack(Evas_Object *obj, Evas_Object *sobj, int fill, int expand, double align)
137 wd = e_widget_data_get(obj);
140 e_widget_size_min_get(sobj, &mw, &mh);
141 if (e_box_orientation_get(wd->o_box) == 1)
142 e_box_pack_options_set(sobj,
144 expand, expand, /* expand */
145 0.5, align, /* align */
147 99999, 99999 /* max */
150 e_box_pack_options_set(sobj,
152 expand, expand, /* expand */
153 align, 0.5, /* align */
155 99999, 99999 /* max */
157 e_box_size_min_get(wd->o_box, &mw, &mh);
158 e_widget_size_min_set(obj, mw, mh);
162 e_widget_list_homogeneous_set(Evas_Object *obj, int homogenous)
164 E_Widget_Data *wd = e_widget_data_get(obj);
165 e_box_homogenous_set(wd->o_box, homogenous);
169 _e_wid_del_hook(Evas_Object *obj)
173 wd = e_widget_data_get(obj);