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. This example show how to create a custom state from embryo. Clicking on the 3 labels will rotate the object in the given direction. +@example embryo_pong.edc +Super-simple Pong implementation in pure embryo. + @example embryo_run_program.edc This example show how to run an edje program from embryo code. @@ -475,6 +478,9 @@ This example show how to set the text in TEXT part from embryo code. @example embryo_timer.edc This example show the usage of timers in embryo. +@example external_elm_anchorblock.edc +This example use an elementary anchorblock and a button to animate the text. + @example external_elm_button.edc This example create some elementary buttons and do some actions on user click. 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 @@ + +#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. \ + \ + \ +

\ +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.

\ +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"; + } + } + } +}