\section{theme\+\_\+example.\+edc}

\begin{DoxyCodeInclude}
1 collections \{
2    group \{ name: "elm/button/base/chucknorris";
3       alias: "elm/button/base/default";
4       parts \{
5          part \{ name: "border";
6             type: RECT;
7             description \{ state: "default" 0.0;
8                color: 0 0 0 255;
9             \}
10             description \{ state: "in" 0.0;
11                color: 50 180 180 255;
12             \}
13          \}
14          part \{ name: "base";
15             type: RECT;
16             mouse\_events: 1;
17             description \{ state: "default" 0.0;
18                rel1.to: "border";
19                rel1.offset: 1 1;
20                rel2.to: "border";
21                rel2.offset: -2 -2;
22             \}
23             description \{ state: "disabled" 0.0;
24                inherit: "default" 0.0;
25                color: 230 230 230 255;
26             \}
27          \}
28          part \{ name: "elm.swallow.content";
29             type: SWALLOW;
30             mouse\_events: 0;
31             description \{ state: "default" 0.0;
32                fixed: 1 0;
33                visible: 0;
34                align: 0.0 0.5;
35                rel1.offset: 4 4;
36                rel2.offset: 3 -5;
37                rel2.relative: 0.0 1.0;
38             \}
39             description \{ state: "visible" 0.0;
40                inherit: "default" 0.0;
41                visible: 1;
42                aspect: 1.0 1.0;
43                aspect\_preference: VERTICAL;
44                rel2.offset: 4 -5;
45             \}
46             description \{ state: "icononly" 0.0;
47                inherit: "default" 0.0;
48                fixed: 0 0;
49                visible: 1;
50                align: 0.5 0.5;
51                aspect: 1.0 1.0;
52                aspect\_preference: VERTICAL;
53                rel2.offset: -5 -5;
54                rel2.relative: 1.0 1.0;
55             \}
56          \}
57          part \{ name: "elm.text";
58             type: TEXT;
59             mouse\_events: 0;
60             scale: 1;
61             description \{ state: "default" 0.0;
62                visible: 0;
63                rel1.to\_x: "elm.swallow.content";
64                rel1.relative: 1.0 0.0;
65                rel1.offset: 0 4;
66                rel2.offset: -5 -5;
67                color: 0 0 0 255;
68                text \{
69                   font: "Sans";
70                   size: 10;
71                   min: 0 0;
72                   text\_class: "button";
73                \}
74             \}
75             description \{ state: "visible" 0.0;
76                inherit: "default" 0.0;
77                visible: 1;
78                text.min: 1 1;
79                text.ellipsis: -1;
80             \}
81             description \{ state: "disabled" 0.0;
82                inherit: "default" 0.0;
83             \}
84             description \{ state: "disabled\_visible" 0.0;
85                inherit: "default" 0.0;
86                visible: 1;
87                text.min: 1 1;
88                text.ellipsis: -1;
89          \}
90       \}
91       programs \{
92          program \{ name: "button\_mouse\_in";
93             signal: "mouse,in";
94             source: "base";
95             action: STATE\_SET "in" 0.0;
96             target: "border";
97          \}
98          program \{ name: "button\_mouse\_out";
99             signal: "mouse,out";
100             source: "base";
101             action: STATE\_SET "default" 0.0;
102             target: "border";
103          \}
104          program \{ name: "button\_unclick";
105             signal: "mouse,up,1";
106             source: "base";
107             action: SIGNAL\_EMIT "elm,action,click" "";
108          \}
109          program \{ name: "button\_click";
110             signal: "mouse,down,1";
111             source: "base";
112          \}
113          program \{ name: "text\_show";
114             signal: "elm,state,text,visible";
115             source: "elm";
116             script \{
117                new st[31];
118                new Float:vl;
119                get\_state(PART:"elm.swallow.content", st, 30, vl);
120                if (!strcmp(st, "icononly"))
121                  set\_state(PART:"elm.swallow.content", "visible", 0.0);
122                set\_state(PART:"elm.text", "visible", 0.0);
123             \}
124          \}
125          program \{ name: "text\_hide";
126             signal: "elm,state,text,hidden";
127             source: "elm";
128             script \{
129                new st[31];
130                new Float:vl;
131                get\_state(PART:"elm.swallow.content", st, 30, vl);
132                if (!strcmp(st, "visible"))
133                  set\_state(PART:"elm.swallow.content", "icononly", 0.0);
134                set\_state(PART:"elm.text", "default", 0.0);
135             \}
136          \}
137          program \{ name: "icon\_show";
138             signal: "elm,state,icon,visible";
139             source: "elm";
140             script \{
141                new st[31];
142                new Float:vl;
143                get\_state(PART:"elm.text", st, 30, vl);
144                if (!strcmp(st, "visible"))
145                  set\_state(PART:"elm.swallow.content", "visible", 0.0);
146                else
147                  set\_state(PART:"elm.swallow.content", "icononly", 0.0);
148             \}
149          \}
150          program \{ name: "icon\_hide";
151             signal: "elm,state,icon,hidden";
152             source: "elm";
153             action: STATE\_SET "default" 0.0;
154             target: "elm.swallow.content";
155          \}
156          program \{ name: "disable";
157             signal: "elm,state,disabled";
158             source: "elm";
159             action: STATE\_SET "disabled" 0.0;
160             target: "base";
161             after: "disable\_text";
162          \}
163          program \{ name: "disable\_text";
164             script \{
165                new st[31];
166                new Float:vl;
167                get\_state(PART:"elm.text", st, 30, vl);
168                if (!strcmp(st, "visible"))
169                  set\_state(PART:"elm.text", "disabled\_visible", 0.0);
170                else
171                  set\_state(PART:"elm.text", "disabled", 0.0);
172             \}
173          \}
174          program \{ name: "enable";
175             signal: "elm,state,enabled";
176             source: "elm";
177             action: STATE\_SET "default" 0.0;
178             target: "base";
179             after: "enable\_text";
180          \}
181          program \{ name: "enable\_text";
182             script \{
183                new st[31];
184                new Float:vl;
185                get\_state(PART:"elm.text", st, 30, vl);
186                if (!strcmp(st, "disabled\_visible"))
187                  set\_state(PART:"elm.text", "visible", 0.0);
188                else
189                  set\_state(PART:"elm.text", "default", 0.0);
190             \}
191          \}
192       \}
193    \}
194 \}
\end{DoxyCodeInclude}
 