summaryrefslogtreecommitdiff
path: root/src/examples/elementary/label_example_01.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-03-23 12:56:14 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-03-23 13:24:41 -0700
commitc2a1c49ab2042f559b28e840e54feb8494888e0e (patch)
treec6eb110b7c479499854eede9d0c3ab0a80c9a11a /src/examples/elementary/label_example_01.c
parent9340855597e7e465435c69b6278650346688da14 (diff)
elementary: move all legacy files to their expected new location.
Diffstat (limited to 'src/examples/elementary/label_example_01.c')
-rw-r--r--src/examples/elementary/label_example_01.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/examples/elementary/label_example_01.c b/src/examples/elementary/label_example_01.c
new file mode 100644
index 0000000000..03d3f78a23
--- /dev/null
+++ b/src/examples/elementary/label_example_01.c
@@ -0,0 +1,75 @@
1//Compile with:
2//gcc -o label_example_01 label_example_01.c -g `pkg-config --cflags --libs elementary`
3
4#include <Elementary.h>
5
6EAPI_MAIN int
7elm_main(int argc, char **argv)
8{
9 Evas_Object *win, *label, *label2, *label3, *label4, *label5, *label6;
10
11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
12
13 win = elm_win_util_standard_add("label", "Label");
14 elm_win_autodel_set(win, EINA_TRUE);
15
16 label = elm_label_add(win);
17 elm_object_text_set(label, "Some long text for our label, that is long but "
18 "not too long.");
19 elm_label_slide_duration_set(label, 3);
20 elm_label_slide_mode_set(label, ELM_LABEL_SLIDE_MODE_ALWAYS);
21 elm_object_style_set(label, "slide_bounce");
22 evas_object_move(label, 0, 10);
23 evas_object_resize(label, 200, 15);
24 evas_object_show(label);
25
26 label2 = elm_label_add(win);
27 elm_object_text_set(label2, "This is the text for our second label, which is"
28 " much longer than the previous one, maybe even "
29 "too long, but maybe not.");
30 elm_label_ellipsis_set(label2, EINA_TRUE);
31 evas_object_resize(label2, 200, 15);
32 evas_object_move(label2, 0, 30);
33 evas_object_show(label2);
34
35 label3 = elm_label_add(win);
36 elm_object_text_set(label3, "Some more long text much as before, long but "
37 "not too long.");
38 elm_label_line_wrap_set(label3, ELM_WRAP_CHAR);
39 elm_label_ellipsis_set(label3, EINA_TRUE);
40 evas_object_resize(label3, 200, 15);
41 evas_object_move(label3, 0, 50);
42 evas_object_show(label3);
43
44 label4 = elm_label_add(win);
45 elm_object_text_set(label4, "And for this label we choose a different text, "
46 "for no reason other than that we can.");
47 elm_label_line_wrap_set(label4, ELM_WRAP_CHAR);
48 evas_object_resize(label4, 200, 30);
49 evas_object_move(label4, 0, 80);
50 evas_object_show(label4);
51
52 label5 = elm_label_add(win);
53 elm_object_text_set(label5, "And for this label we choose a different text, "
54 "for no reason other than that we can.");
55 elm_label_line_wrap_set(label5, ELM_WRAP_WORD);
56 evas_object_resize(label5, 200, 40);
57 evas_object_move(label5, 0, 110);
58 evas_object_show(label5);
59
60 label6 = elm_label_add(win);
61 elm_object_text_set(label6, "Short text");
62 elm_object_style_set(label6, "marker");
63 evas_object_color_set(label6, 255, 0, 0, 255);
64 evas_object_resize(label6, 200, 15);
65 evas_object_move(label6, 0, 140);
66 evas_object_show(label6);
67
68 evas_object_resize(win, 200, 170);
69 evas_object_show(win);
70
71 elm_run();
72
73 return 0;
74}
75ELM_MAIN()