summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/bin/test_check.c
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2009-08-13 22:41:43 +0000
committerDavide Andreoli <dave@gurumeditation.it>2009-08-13 22:41:43 +0000
commitcf6f01b171e2434c139cc9c34da23dd31757d28a (patch)
tree50510a3effef269a921800c12521bfe39c0b762d /legacy/elementary/src/bin/test_check.c
parent163d1ce7562de52a4b00aebef4944f536d51ea9b (diff)
* Split up elementary test.c in several files, one per widget
SVN revision: 41749
Diffstat (limited to 'legacy/elementary/src/bin/test_check.c')
-rw-r--r--legacy/elementary/src/bin/test_check.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_check.c b/legacy/elementary/src/bin/test_check.c
new file mode 100644
index 0000000..ec4efb7
--- /dev/null
+++ b/legacy/elementary/src/bin/test_check.c
@@ -0,0 +1,64 @@
1#include <Elementary.h>
2
3void
4test_check(void *data, Evas_Object *obj, void *event_info)
5{
6 Evas_Object *win, *bg, *bx, *ic, *ck;
7 char buf[PATH_MAX];
8
9 win = elm_win_add(NULL, "check", ELM_WIN_BASIC);
10 elm_win_title_set(win, "Checks");
11 elm_win_autodel_set(win, 1);
12
13 bg = elm_bg_add(win);
14 elm_win_resize_object_add(win, bg);
15 evas_object_size_hint_weight_set(bg, 1.0, 1.0);
16 evas_object_show(bg);
17
18 bx = elm_box_add(win);
19 evas_object_size_hint_weight_set(bx, 1.0, 1.0);
20 elm_win_resize_object_add(win, bx);
21 evas_object_show(bx);
22
23 ic = elm_icon_add(win);
24 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
25 elm_icon_file_set(ic, buf, NULL);
26 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
27 ck = elm_check_add(win);
28 evas_object_size_hint_weight_set(ck, 1.0, 1.0);
29 evas_object_size_hint_align_set(ck, -1.0, 0.5);
30 elm_check_label_set(ck, "Icon sized to check");
31 elm_check_icon_set(ck, ic);
32 elm_check_state_set(ck, 1);
33 elm_box_pack_end(bx, ck);
34 evas_object_show(ck);
35 evas_object_show(ic);
36
37 ic = elm_icon_add(win);
38 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
39 elm_icon_file_set(ic, buf, NULL);
40 elm_icon_scale_set(ic, 0, 0);
41 ck = elm_check_add(win);
42 elm_check_label_set(ck, "Icon no scale");
43 elm_check_icon_set(ck, ic);
44 elm_box_pack_end(bx, ck);
45 evas_object_show(ck);
46 evas_object_show(ic);
47
48 ck = elm_check_add(win);
49 elm_check_label_set(ck, "Label Only");
50 elm_box_pack_end(bx, ck);
51 evas_object_show(ck);
52
53 ic = elm_icon_add(win);
54 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
55 elm_icon_file_set(ic, buf, NULL);
56 elm_icon_scale_set(ic, 0, 0);
57 ck = elm_check_add(win);
58 elm_check_icon_set(ck, ic);
59 elm_box_pack_end(bx, ck);
60 evas_object_show(ck);
61 evas_object_show(ic);
62
63 evas_object_show(win);
64}