- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

external_elm_anchorblock.edc

This example use an elementary anchorblock and a button to animate the text.

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