summaryrefslogtreecommitdiff
path: root/legacy/edje/doc
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2010-10-12 21:41:02 +0000
committerDavide Andreoli <dave@gurumeditation.it>2010-10-12 21:41:02 +0000
commita9c4cd5be7e7c86808e17a2150b141ddde128b64 (patch)
tree60dcb46e7f4f88dce8449245e37d82543d1188f3 /legacy/edje/doc
parent0d02671e99231434fe12100abe3f19d538bed3db (diff)
The daily edje example: EXTERNAL elementary checks in action.
SVN revision: 53316
Diffstat (limited to 'legacy/edje/doc')
-rw-r--r--legacy/edje/doc/edje.dox.in3
-rw-r--r--legacy/edje/doc/examples/external_elm_check.edc211
2 files changed, 214 insertions, 0 deletions
diff --git a/legacy/edje/doc/edje.dox.in b/legacy/edje/doc/edje.dox.in
index 56b3779d26..b172c1d30e 100644
--- a/legacy/edje/doc/edje.dox.in
+++ b/legacy/edje/doc/edje.dox.in
@@ -484,6 +484,9 @@ This example use an elementary anchorblock and a button to animate the text.
484@example external_elm_button.edc 484@example external_elm_button.edc
485This 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.
486 486
487@example external_elm_check.edc
488This example show EXTERNAL checkbox in action.
489
487@example external_emotion_elm.edc 490@example external_emotion_elm.edc
488Super-concise video player example using Edje/Emotion/Elementary. 491Super-concise video player example using Edje/Emotion/Elementary.
489 492
diff --git a/legacy/edje/doc/examples/external_elm_check.edc b/legacy/edje/doc/examples/external_elm_check.edc
new file mode 100644
index 0000000000..0d5423f1c1
--- /dev/null
+++ b/legacy/edje/doc/examples/external_elm_check.edc
@@ -0,0 +1,211 @@
1collections {
2 /* this groups is used as custom icon */
3 group { name: "icon_green";
4 parts {
5 part { name: "icon_green";
6 type: RECT;
7 description { state: "default" 0.0;
8 color: 0 255 0 255;
9 aspect: 1 1;
10 aspect_preference: VERTICAL;
11 }
12 }
13 }
14 }
15
16 group { name: "main";
17 /* set a min window size */
18 min: 200 300;
19
20 /* tell edje that we are going to use elementary external parts */
21 externals {
22 external: "elm";
23 }
24
25 parts {
26 part { name: "bg";
27 type: RECT;
28 description { state: "default" 0.0;
29 color: 255 255 255 255;
30 }
31 }
32
33 part { name: "title";
34 type: TEXT;
35 effect: SOFT_SHADOW;
36 description { state: "default" 0.0;
37 color: 255 255 255 255;
38 color3: 70 70 70 70;
39 text {
40 text: "Elementary Checks";
41 font: "Sans";
42 size: 16;
43 align: 0.5 0.0;
44 }
45 }
46 }
47
48 /* EXTERNAL elementary check with a label */
49 part { name: "check1";
50 type: EXTERNAL;
51 source: "elm/check";
52 description { state: "default" 0;
53 rel1 {
54 offset: 5 35;
55 }
56 rel2 {
57 relative: 1.0 0.0;
58 offset: -6 60;
59 }
60 params {
61 string: "label" "Label only";
62 }
63 }
64 }
65
66 /* EXTERNAL elementary check with label + standard icon */
67 part { name: "check2";
68 type: EXTERNAL;
69 source: "elm/check";
70 description { state: "default" 0;
71 rel1 {
72 to: "check1";
73 relative: 0.0 1.0;
74 offset: 0 5;
75 }
76 rel2 {
77 to: "check1";
78 relative: 1.0 2.0;
79 offset: -1 5;
80 }
81 params {
82 string: "label" "Label + standard icon";
83 string: "icon" "home";
84 }
85 }
86 }
87
88 /* EXTERNAL elementary check with a label and a custom icon */
89 part { name: "check3";
90 type: EXTERNAL;
91 source: "elm/check";
92 description { state: "default" 0;
93 rel1 {
94 to: "check2";
95 relative: 0.0 1.0;
96 offset: 0 5;
97 }
98 rel2 {
99 to: "check2";
100 relative: 1.0 2.0;
101 offset: -1 5;
102 }
103 params {
104 string: "label" "Label + custom icon";
105 string: "icon" "icon_green";
106 }
107 }
108 }
109
110 /* EXTERNAL elementary check with just a custom icon */
111 part { name: "check4";
112 type: EXTERNAL;
113 source: "elm/check";
114 description { state: "default" 0;
115 rel1 {
116 to: "check3";
117 relative: 0.0 1.0;
118 offset: 0 5;
119 }
120 rel2 {
121 to: "check3";
122 relative: 1.0 2.0;
123 offset: -1 5;
124 }
125 params {
126 string: "icon" "home";
127 }
128 }
129 }
130
131 /* EXTERNAL elementary check with just a custom icon */
132 part { name: "check5";
133 type: EXTERNAL;
134 source: "elm/check";
135 description { state: "default" 0;
136 rel1 {
137 to: "check4";
138 relative: 0.0 1.0;
139 offset: 0 5;
140 }
141 rel2 {
142 to: "check4";
143 relative: 1.0 2.0;
144 offset: -1 5;
145 }
146 params {
147 string: "icon" "icon_green";
148 }
149 }
150 }
151 }
152
153 programs {
154 /* on edje load start the programs loop */
155 program {
156 signal: "load";
157 after: "loop1";
158 }
159
160 /* wait 0.2, toggle the state of check1, trigger next prog */
161 program { name: "loop1";
162 in: 0.2 0.0;
163 script {
164 external_param_set_bool(PART:"check1", "state",
165 !external_param_get_bool(PART:"check1", "state"));
166 }
167 after: "loop2";
168 }
169
170 /* wait 0.2, toggle the state of check2, trigger next prog */
171 program { name: "loop2";
172 in: 0.2 0.0;
173 script {
174 external_param_set_bool(PART:"check2", "state",
175 !external_param_get_bool(PART:"check2", "state"));
176 }
177 after: "loop3";
178 }
179
180 /* wait 0.2, toggle the state of check3, trigger next prog */
181 program { name: "loop3";
182 in: 0.2 0.0;
183 script {
184 external_param_set_bool(PART:"check3", "state",
185 !external_param_get_bool(PART:"check3", "state"));
186 }
187 after: "loop4";
188 }
189
190 /* wait 0.2, toggle the state of check4, trigger next prog */
191 program { name: "loop4";
192 in: 0.2 0.0;
193 script {
194 external_param_set_bool(PART:"check4", "state",
195 !external_param_get_bool(PART:"check4", "state"));
196 }
197 after: "loop5";
198 }
199
200 /* wait 0.2, toggle the state of check5, restart from the first prog */
201 program { name: "loop5";
202 in: 0.2 0.0;
203 script {
204 external_param_set_bool(PART:"check5", "state",
205 !external_param_get_bool(PART:"check5", "state"));
206 }
207 after: "loop1";
208 }
209 }
210 }
211}