summaryrefslogtreecommitdiff
path: root/legacy/edje/doc
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2010-10-11 22:51:56 +0000
committerDavide Andreoli <dave@gurumeditation.it>2010-10-11 22:51:56 +0000
commit6eb28124cb260230871b0f5a2b1f5a7cb6d7018f (patch)
tree6e0d46b1718175ffa6c82551b8c1fff7d750194c /legacy/edje/doc
parent9908fe0298cc824948c3d0cc367102c1478bbeb2 (diff)
Another edje EXTERNAL example, this time make an elementary Anchorblock rotate around in 3D.
SVN revision: 53279
Diffstat (limited to 'legacy/edje/doc')
-rw-r--r--legacy/edje/doc/edje.dox.in6
-rw-r--r--legacy/edje/doc/examples/external_elm_anchorblock.edc160
2 files changed, 166 insertions, 0 deletions
diff --git a/legacy/edje/doc/edje.dox.in b/legacy/edje/doc/edje.dox.in
index 233d8d3a5b..56b3779d26 100644
--- a/legacy/edje/doc/edje.dox.in
+++ b/legacy/edje/doc/edje.dox.in
@@ -463,6 +463,9 @@ Unlike Ebits, Edje separates the layout and behavior logic.
463This example show how to create a custom state from embryo. Clicking on the 463This example show how to create a custom state from embryo. Clicking on the
4643 labels will rotate the object in the given direction. 4643 labels will rotate the object in the given direction.
465 465
466@example embryo_pong.edc
467Super-simple Pong implementation in pure embryo.
468
466@example embryo_run_program.edc 469@example embryo_run_program.edc
467This example show how to run an edje program from embryo code. 470This example show how to run an edje program from embryo code.
468 471
@@ -475,6 +478,9 @@ This example show how to set the text in TEXT part from embryo code.
475@example embryo_timer.edc 478@example embryo_timer.edc
476This example show the usage of timers in embryo. 479This example show the usage of timers in embryo.
477 480
481@example external_elm_anchorblock.edc
482This example use an elementary anchorblock and a button to animate the text.
483
478@example external_elm_button.edc 484@example external_elm_button.edc
479This example create some elementary buttons and do some actions on user click. 485This example create some elementary buttons and do some actions on user click.
480 486
diff --git a/legacy/edje/doc/examples/external_elm_anchorblock.edc b/legacy/edje/doc/examples/external_elm_anchorblock.edc
new file mode 100644
index 0000000000..33f99daa43
--- /dev/null
+++ b/legacy/edje/doc/examples/external_elm_anchorblock.edc
@@ -0,0 +1,160 @@
1
2#define LOREM "Vestibulum nunc mi, adipiscing dapibus turpis. Integer ornare \
3vestibulum. Quisque libero augue, non tristique tortor. Praesent urna augue, \
4blandit id sodales vel, varius at purus. Ut congue mollis elit, quis vehicula \
5enim ornare vitae. Suspendisse non faucibus massa. Nunc facilisis sapien ut \
6erat laoreet vitae pharetra purus commodo. Donec in ipsum justo, sit amet \
7lacinia massa. Pellentesque sed dolor lectus. Integer nec nisi ut massa \
8vestibulum vulputate mollis ut lacus. Morbi lobortis dictum lacus nec \
9faucibus. <item relsize=16x16 vsize=full href=emoticon/angry></item> \
10<item relsize=16x16 vsize=full href=emoticon/evil></item> \
11<item relsize=16x16 vsize=full href=emoticon/google-smile></item> \
12<item relsize=16x16 vsize=full href=emoticon/omg></item><br><br> \
13Phasellus ultricies nisl sit amet ligula tristique in adipiscing neque \
14vulputate. Maecenas est ante, porttitor eget commodo non, blandit et erat. \
15Duis adipiscing, tortor quis gravida vulputate, magna lorem mollis tortor, \
16elementum ullamcorper dui mi ut metus. Nunc dictum nisi sed arcu mattis \
17pellentesque. Aliquam erat volutpat. Nullam faucibus suscipit dui a \
18condimentum. Fusce a diam tortor. Curabitur egestas gravida magna, eget \
19lacinia magna fringilla in. Donec eget tincidunt ipsum. Suspendisse velit \
20massa, sollicitudin in laoreet a, posuere malesuada enim. \
21Duis a nulla purus.<br><br> \
22Aenean nec sodales lacus. Sed ipsum felis, blandit sed aliquet ac, viverra \
23vitae odio. Proin nisi nisi, commodo at cursus ut, auctor at elit. Sed tempor \
24placerat orci eget venenatis. Duis ut dolor nibh, non luctus tellus. Duis \
25placerat aliquet sem, et dignissim tellus rutrum at. Etiam sapien lacus, \
26auctor quis interdum vel, pellentesque sit amet arcu. Proin accumsan, mauris \
27non dapibus fermentum, nisl leo cursus nisi, eget auctor lacus ante a nisl. \
28Suspendisse ullamcorper suscipit mi, et blandit augue aliquet non. Aenean \
29vulputate ullamcorper ante, ut tincidunt orci sagittis nec. In hendrerit nunc \
30eget sapien eleifend luctus. Pellentesque vulputate diam ac arcu suscipit nec \
31vestibulum dolor blandit. Sed et massa vel ante tempor fermentum nec ac arcu. \
32Duis turpis odio, vehicula sit amet pellentesque non, facilisis quis ligula. \
33Sed ante nisl, cursus in pulvinar in, interdum vitae diam. Cras condimentum \
34diam ac purus tempor suscipit eget sed metus. Nam erat nunc, eleifend vitae \
35vehicula vitae, venenatis faucibus est. Nam auctor mauris metus. Nam eget \
36vehicula nunc. Nulla ut nisi id sapien rhoncus vestibulum."
37
38collections {
39 group { name: "main";
40 /* set a min window size */
41 min: 300 400;
42
43 /* tell edje that we are going to use elementary external parts */
44 externals {
45 external: "elm";
46 }
47
48 parts {
49 part { name: "bg";
50 type: RECT;
51 description { state: "default" 0.0;
52 color: 255 255 255 255;
53 }
54 }
55
56 part { name: "title";
57 type: TEXT;
58 effect: SOFT_SHADOW;
59 description { state: "default" 0.0;
60 color: 255 255 255 255;
61 color3: 70 70 70 70;
62 text {
63 text: "Elementary Anchorblock";
64 font: "Sans";
65 size: 16;
66 align: 0.5 0.0;
67 }
68 }
69 }
70
71 /* EXTERNAL elementary anchorblock */
72 part { name: "anchorblock";
73 type: EXTERNAL;
74 source: "elm/anchorblock";
75 description { state: "default" 0.0;
76 color: 200 200 0 200;
77 rel1.offset: 5 35;
78 rel2.offset: -6 -45;
79 align: 0.0 0.0;
80 map {
81 on: 1;
82 perspective_on: 1;
83 smooth: 1;
84 }
85 params.string: "text" LOREM;
86 }
87 description { state: "anim" 0.0;
88 inherit: "default" 0.0;
89 map.rotation.z: 100;
90 }
91 description { state: "anim" 0.1;
92 inherit: "default" 0.0;
93 map.rotation.y: 180;
94 }
95 description { state: "anim" 0.2;
96 inherit: "default" 0.0;
97 map.rotation.x: 150;
98 }
99 description { state: "anim" 0.3;
100 inherit: "default" 0.0;
101 map.rotation.z: 100;
102 map.rotation.y: 100;
103 }
104 }
105
106 /* EXTERNAL elementary button to trigger the animation */
107 part { name: "button";
108 type: EXTERNAL;
109 source: "elm/button";
110 description { state: "default" 0;
111 rel1 {
112 relative: 0.0 1.0;
113 offset: 5 -40;
114 }
115 rel2 {
116 offset: -6 -2;
117 }
118 params {
119 string: "label" "Animate";
120 }
121 }
122 }
123 }
124
125 programs {
126 /* button clicked, start the animation cycle */
127 program { name: "button_click";
128 signal: "clicked";
129 source: "button";
130 action: STATE_SET "anim" 0.0;
131 transition: LINEAR 1.0;
132 target: "anchorblock";
133 after: "anim2";
134 }
135 program { name: "anim2";
136 action: STATE_SET "anim" 0.1;
137 transition: LINEAR 1.0;
138 target: "anchorblock";
139 after: "anim3";
140 }
141 program { name: "anim3";
142 action: STATE_SET "anim" 0.2;
143 transition: LINEAR 1.0;
144 target: "anchorblock";
145 after: "anim4";
146 }
147 program { name: "anim4";
148 action: STATE_SET "anim" 0.3;
149 transition: LINEAR 1.0;
150 target: "anchorblock";
151 after: "anim5";
152 }
153 program { name: "anim5";
154 action: STATE_SET "default" 0.0;
155 transition: LINEAR 1.0;
156 target: "anchorblock";
157 }
158 }
159 }
160}