\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}

#define LOREM "Vestibulum nunc mi, adipiscing dapibus turpis. Integer ornare \(\backslash\)
vestibulum. Quisque libero augue, non tristique tortor. Praesent urna augue, \(\backslash\)
blandit id sodales vel, varius at purus. Ut congue mollis elit, quis vehicula \(\backslash\)
enim ornare vitae. Suspendisse non faucibus massa. Nunc facilisis sapien ut \(\backslash\)
erat laoreet vitae pharetra purus commodo. Donec in ipsum justo, sit amet \(\backslash\)
lacinia massa. Pellentesque sed dolor lectus. Integer nec nisi ut massa \(\backslash\)
vestibulum vulputate mollis ut lacus. Morbi lobortis dictum lacus nec \(\backslash\)
faucibus. <item relsize=16x16 vsize=full href=emoticon/angry></item> \(\backslash\)
<item relsize=16x16 vsize=full href=emoticon/evil></item> \(\backslash\)
<item relsize=16x16 vsize=full href=emoticon/google-smile></item> \(\backslash\)
<item relsize=16x16 vsize=full href=emoticon/omg></item><br><br> \(\backslash\)
Phasellus ultricies nisl sit amet ligula tristique in adipiscing neque \(\backslash\)
vulputate. Maecenas est ante, porttitor eget commodo non, blandit et erat. \(\backslash\)
Duis adipiscing, tortor quis gravida vulputate, magna lorem mollis tortor, \(\backslash\)
elementum ullamcorper dui mi ut metus. Nunc dictum nisi sed arcu mattis \(\backslash\)
pellentesque. Aliquam erat volutpat. Nullam faucibus suscipit dui a \(\backslash\)
condimentum. Fusce a diam tortor. Curabitur egestas gravida magna, eget \(\backslash\)
lacinia magna fringilla in. Donec eget tincidunt ipsum. Suspendisse velit \(\backslash\)
massa, sollicitudin in laoreet a, posuere malesuada enim. \(\backslash\)
Duis a nulla purus.<br><br> \(\backslash\)
Aenean nec sodales lacus. Sed ipsum felis, blandit sed aliquet ac, viverra \(\backslash\)
vitae odio. Proin nisi nisi, commodo at cursus ut, auctor at elit. Sed tempor \(\backslash\)
placerat orci eget venenatis. Duis ut dolor nibh, non luctus tellus. Duis \(\backslash\)
placerat aliquet sem, et dignissim tellus rutrum at. Etiam sapien lacus, \(\backslash\)
auctor quis interdum vel, pellentesque sit amet arcu. Proin accumsan, mauris \(\backslash\)
non dapibus fermentum, nisl leo cursus nisi, eget auctor lacus ante a nisl. \(\backslash\)
Suspendisse ullamcorper suscipit mi, et blandit augue aliquet non. Aenean \(\backslash\)
vulputate ullamcorper ante, ut tincidunt orci sagittis nec. In hendrerit nunc \(\backslash\)
eget sapien eleifend luctus. Pellentesque vulputate diam ac arcu suscipit nec \(\backslash\)
vestibulum dolor blandit. Sed et massa vel ante tempor fermentum nec ac arcu. \(\backslash\)
Duis turpis odio, vehicula sit amet pellentesque non, facilisis quis ligula. \(\backslash\)
Sed ante nisl, cursus in pulvinar in, interdum vitae diam. Cras condimentum \(\backslash\)
diam ac purus tempor suscipit eget sed metus. Nam erat nunc, eleifend vitae \(\backslash\)
vehicula vitae, venenatis faucibus est. Nam auctor mauris metus. Nam eget \(\backslash\)
vehicula nunc. Nulla ut nisi id sapien rhoncus vestibulum."

collections \{
   group \{ name: "main";
      /* set a min window size */
      min: 300 400;

      /* tell edje that we are going to use elementary external parts */
      externals \{
         external: "elm";
      \}

      parts \{
         part \{ name: "bg";
            type: RECT;
            description \{ state: "default" 0.0;
               color: 255 255 255 255;
            \}
         \}

         part \{ name: "title";
            type: TEXT;
            effect: SOFT\_SHADOW;
            description \{ state: "default" 0.0;
               color: 255 255 255 255;
               color3: 70 70 70 70;
               text \{
                  text: "Elementary Anchorblock";
                  font: "Sans";
                  size: 16;
                  align: 0.5 0.0;
               \}
            \}
         \}

         /* EXTERNAL elementary anchorblock */
         part \{ name: "anchorblock";
            type: EXTERNAL;
            source: "elm/anchorblock";
            description \{ state: "default" 0.0;
               color: 200 200 0 200;
               rel1.offset: 5 35;
               rel2.offset: -6 -45;
               align: 0.0 0.0;
               map \{
                  on: 1;
                  perspective\_on: 1;
                  smooth: 1;
               \}
               params.string: "text" LOREM;
            \}
            description \{ state: "anim" 0.0;
               inherit: "default" 0.0;
               map.rotation.z: 100;
            \}
            description \{ state: "anim" 0.1;
               inherit: "default" 0.0;
               map.rotation.y: 180;
            \}
            description \{ state: "anim" 0.2;
               inherit: "default" 0.0;
               map.rotation.x: 150;
            \}
            description \{ state: "anim" 0.3;
               inherit: "default" 0.0;
               map.rotation.z: 100;
               map.rotation.y: 100;
            \}
         \}
   
         /* EXTERNAL elementary button to trigger the animation */
         part \{ name: "button";
            type: EXTERNAL;
            source: "elm/button";
            description \{ state: "default" 0;
               rel1 \{
                  relative: 0.0 1.0;
                  offset: 5 -40;
               \}
               rel2 \{
                  offset: -6 -2;
               \}
               params \{
                  string: "label" "Animate";
               \}
            \}
         \}
      \}

      programs \{
         /* button clicked, start the animation cycle */
         program \{ name: "button\_click";
            signal: "clicked";
            source: "button";
            action: STATE\_SET "anim" 0.0;
            transition: LINEAR 1.0;
            target: "anchorblock";
            after: "anim2";
         \}
         program \{ name: "anim2";
            action: STATE\_SET "anim" 0.1;
            transition: LINEAR 1.0;
            target: "anchorblock";
            after: "anim3";
         \}
         program \{ name: "anim3";
            action: STATE\_SET "anim" 0.2;
            transition: LINEAR 1.0;
            target: "anchorblock";
            after: "anim4";
         \}
         program \{ name: "anim4";
            action: STATE\_SET "anim" 0.3;
            transition: LINEAR 1.0;
            target: "anchorblock";
            after: "anim5";
         \}
         program \{ name: "anim5";
            action: STATE\_SET "default" 0.0;
            transition: LINEAR 1.0;
            target: "anchorblock";
         \}
      \}
   \}
\}
\end{DoxyCodeInclude}
 