\hypertarget{external_elm_anchorblock_8edc-example}{\section{external\+\_\+elm\+\_\+anchorblock.\+edc}
}
This example use an elementary anchorblock and a button to animate the text.


\begin{DoxyCodeInclude}
1 
2 #define LOREM "Vestibulum nunc mi, adipiscing dapibus turpis. Integer ornare \(\backslash\)
3 vestibulum. Quisque libero augue, non tristique tortor. Praesent urna augue, \(\backslash\)
4 blandit id sodales vel, varius at purus. Ut congue mollis elit, quis vehicula \(\backslash\)
5 enim ornare vitae. Suspendisse non faucibus massa. Nunc facilisis sapien ut \(\backslash\)
6 erat laoreet vitae pharetra purus commodo. Donec in ipsum justo, sit amet \(\backslash\)
7 lacinia massa. Pellentesque sed dolor lectus. Integer nec nisi ut massa \(\backslash\)
8 vestibulum vulputate mollis ut lacus. Morbi lobortis dictum lacus nec \(\backslash\)
9 faucibus. <item relsize=16x16 vsize=full href=emoticon/angry></item> \(\backslash\)
10 <item relsize=16x16 vsize=full href=emoticon/evil></item> \(\backslash\)
11 <item relsize=16x16 vsize=full href=emoticon/google-smile></item> \(\backslash\)
12 <item relsize=16x16 vsize=full href=emoticon/omg></item><br><br> \(\backslash\)
13 Phasellus ultricies nisl sit amet ligula tristique in adipiscing neque \(\backslash\)
14 vulputate. Maecenas est ante, porttitor eget commodo non, blandit et erat. \(\backslash\)
15 Duis adipiscing, tortor quis gravida vulputate, magna lorem mollis tortor, \(\backslash\)
16 elementum ullamcorper dui mi ut metus. Nunc dictum nisi sed arcu mattis \(\backslash\)
17 pellentesque. Aliquam erat volutpat. Nullam faucibus suscipit dui a \(\backslash\)
18 condimentum. Fusce a diam tortor. Curabitur egestas gravida magna, eget \(\backslash\)
19 lacinia magna fringilla in. Donec eget tincidunt ipsum. Suspendisse velit \(\backslash\)
20 massa, sollicitudin in laoreet a, posuere malesuada enim. \(\backslash\)
21 Duis a nulla purus.<br><br> \(\backslash\)
22 Aenean nec sodales lacus. Sed ipsum felis, blandit sed aliquet ac, viverra \(\backslash\)
23 vitae odio. Proin nisi nisi, commodo at cursus ut, auctor at elit. Sed tempor \(\backslash\)
24 placerat orci eget venenatis. Duis ut dolor nibh, non luctus tellus. Duis \(\backslash\)
25 placerat aliquet sem, et dignissim tellus rutrum at. Etiam sapien lacus, \(\backslash\)
26 auctor quis interdum vel, pellentesque sit amet arcu. Proin accumsan, mauris \(\backslash\)
27 non dapibus fermentum, nisl leo cursus nisi, eget auctor lacus ante a nisl. \(\backslash\)
28 Suspendisse ullamcorper suscipit mi, et blandit augue aliquet non. Aenean \(\backslash\)
29 vulputate ullamcorper ante, ut tincidunt orci sagittis nec. In hendrerit nunc \(\backslash\)
30 eget sapien eleifend luctus. Pellentesque vulputate diam ac arcu suscipit nec \(\backslash\)
31 vestibulum dolor blandit. Sed et massa vel ante tempor fermentum nec ac arcu. \(\backslash\)
32 Duis turpis odio, vehicula sit amet pellentesque non, facilisis quis ligula. \(\backslash\)
33 Sed ante nisl, cursus in pulvinar in, interdum vitae diam. Cras condimentum \(\backslash\)
34 diam ac purus tempor suscipit eget sed metus. Nam erat nunc, eleifend vitae \(\backslash\)
35 vehicula vitae, venenatis faucibus est. Nam auctor mauris metus. Nam eget \(\backslash\)
36 vehicula nunc. Nulla ut nisi id sapien rhoncus vestibulum."
37 
38 collections \{
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 \}
\end{DoxyCodeInclude}
 