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

\begin{DoxyCodeInclude}
collections \{
   group \{ name: \textcolor{stringliteral}{"elm/button/base/chucknorris"};
      alias: \textcolor{stringliteral}{"elm/button/base/default"};
      parts \{
         part \{ name: \textcolor{stringliteral}{"border"};
            type: RECT;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               color: 0 0 0 255;
            \}
            description \{ state: \textcolor{stringliteral}{"in"} 0.0;
               color: 50 180 180 255;
            \}
         \}
         part \{ name: \textcolor{stringliteral}{"base"};
            type: RECT;
            mouse\_events: 1;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               rel1.to: \textcolor{stringliteral}{"border"};
               rel1.offset: 1 1;
               rel2.to: \textcolor{stringliteral}{"border"};
               rel2.offset: -2 -2;
            \}
            description \{ state: \textcolor{stringliteral}{"disabled"} 0.0;
               inherit: \textcolor{stringliteral}{"default"} 0.0;
               color: 230 230 230 255;
            \}
         \}
         part \{ name: \textcolor{stringliteral}{"elm.swallow.content"};
            type: SWALLOW;
            mouse\_events: 0;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               fixed: 1 0;
               visible: 0;
               align: 0.0 0.5;
               rel1.offset: 4 4;
               rel2.offset: 3 -5;
               rel2.relative: 0.0 1.0;
            \}
            description \{ state: \textcolor{stringliteral}{"visible"} 0.0;
               inherit: \textcolor{stringliteral}{"default"} 0.0;
               visible: 1;
               aspect: 1.0 1.0;
               aspect\_preference: VERTICAL;
               rel2.offset: 4 -5;
            \}
            description \{ state: \textcolor{stringliteral}{"icononly"} 0.0;
               inherit: \textcolor{stringliteral}{"default"} 0.0;
               fixed: 0 0;
               visible: 1;
               align: 0.5 0.5;
               aspect: 1.0 1.0;
               aspect\_preference: VERTICAL;
               rel2.offset: -5 -5;
               rel2.relative: 1.0 1.0;
            \}
         \}
         part \{ name: \textcolor{stringliteral}{"elm.text"};
            type: TEXT;
            mouse\_events: 0;
            scale: 1;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               visible: 0;
               rel1.to\_x: \textcolor{stringliteral}{"elm.swallow.content"};
               rel1.relative: 1.0 0.0;
               rel1.offset: 0 4;
               rel2.offset: -5 -5;
               color: 0 0 0 255;
               text \{
                  font: \textcolor{stringliteral}{"Sans"};
                  size: 10;
                  min: 0 0;
                  text\_class: \textcolor{stringliteral}{"button"};
               \}
            \}
            description \{ state: \textcolor{stringliteral}{"visible"} 0.0;
               inherit: \textcolor{stringliteral}{"default"} 0.0;
               visible: 1;
               text.min: 1 1;
            \}
            description \{ state: \textcolor{stringliteral}{"disabled"} 0.0;
               inherit: \textcolor{stringliteral}{"default"} 0.0;
            \}
            description \{ state: \textcolor{stringliteral}{"disabled\_visible"} 0.0;
               inherit: \textcolor{stringliteral}{"default"} 0.0;
               visible: 1;
               text.min: 1 1;
         \}
      \}
      programs \{
         program \{ name: \textcolor{stringliteral}{"button\_mouse\_in"};
            signal: \textcolor{stringliteral}{"mouse,in"};
            source: \textcolor{stringliteral}{"base"};
            action: STATE\_SET \textcolor{stringliteral}{"in"} 0.0;
            target: \textcolor{stringliteral}{"border"};
         \}
         program \{ name: \textcolor{stringliteral}{"button\_mouse\_out"};
            signal: \textcolor{stringliteral}{"mouse,out"};
            source: \textcolor{stringliteral}{"base"};
            action: STATE\_SET \textcolor{stringliteral}{"default"} 0.0;
            target: \textcolor{stringliteral}{"border"};
         \}
         program \{ name: \textcolor{stringliteral}{"button\_unclick"};
            signal: \textcolor{stringliteral}{"mouse,up,1"};
            source: \textcolor{stringliteral}{"base"};
            action: SIGNAL\_EMIT \textcolor{stringliteral}{"elm,action,click"} \textcolor{stringliteral}{""};
         \}
         program \{ name: \textcolor{stringliteral}{"button\_click"};
            signal: \textcolor{stringliteral}{"mouse,down,1"};
            source: \textcolor{stringliteral}{"base"};
         \}
         program \{ name: \textcolor{stringliteral}{"text\_show"};
            signal: \textcolor{stringliteral}{"elm,state,text,visible"};
            source: \textcolor{stringliteral}{"elm"};
            script \{
               \textcolor{keyword}{new} st[31];
               \textcolor{keyword}{new} Float:vl;
               get\_state(PART:\textcolor{stringliteral}{"elm.swallow.content"}, st, 30, vl);
               \textcolor{keywordflow}{if} (!strcmp(st, \textcolor{stringliteral}{"icononly"}))
                 set\_state(PART:\textcolor{stringliteral}{"elm.swallow.content"}, \textcolor{stringliteral}{"visible"}, 0.0);
               set\_state(PART:\textcolor{stringliteral}{"elm.text"}, \textcolor{stringliteral}{"visible"}, 0.0);
            \}
         \}
         program \{ name: \textcolor{stringliteral}{"text\_hide"};
            signal: \textcolor{stringliteral}{"elm,state,text,hidden"};
            source: \textcolor{stringliteral}{"elm"};
            script \{
               \textcolor{keyword}{new} st[31];
               \textcolor{keyword}{new} Float:vl;
               get\_state(PART:\textcolor{stringliteral}{"elm.swallow.content"}, st, 30, vl);
               \textcolor{keywordflow}{if} (!strcmp(st, \textcolor{stringliteral}{"visible"}))
                 set\_state(PART:\textcolor{stringliteral}{"elm.swallow.content"}, \textcolor{stringliteral}{"icononly"}, 0.0);
               set\_state(PART:\textcolor{stringliteral}{"elm.text"}, \textcolor{stringliteral}{"default"}, 0.0);
            \}
         \}
         program \{ name: \textcolor{stringliteral}{"icon\_show"};
            signal: \textcolor{stringliteral}{"elm,state,icon,visible"};
            source: \textcolor{stringliteral}{"elm"};
            script \{
               \textcolor{keyword}{new} st[31];
               \textcolor{keyword}{new} Float:vl;
               get\_state(PART:\textcolor{stringliteral}{"elm.text"}, st, 30, vl);
               \textcolor{keywordflow}{if} (!strcmp(st, \textcolor{stringliteral}{"visible"}))
                 set\_state(PART:\textcolor{stringliteral}{"elm.swallow.content"}, \textcolor{stringliteral}{"visible"}, 0.0);
               \textcolor{keywordflow}{else}
                 set\_state(PART:\textcolor{stringliteral}{"elm.swallow.content"}, \textcolor{stringliteral}{"icononly"}, 0.0);
            \}
         \}
         program \{ name: \textcolor{stringliteral}{"icon\_hide"};
            signal: \textcolor{stringliteral}{"elm,state,icon,hidden"};
            source: \textcolor{stringliteral}{"elm"};
            action: STATE\_SET \textcolor{stringliteral}{"default"} 0.0;
            target: \textcolor{stringliteral}{"elm.swallow.content"};
         \}
         program \{ name: \textcolor{stringliteral}{"disable"};
            signal: \textcolor{stringliteral}{"elm,state,disabled"};
            source: \textcolor{stringliteral}{"elm"};
            action: STATE\_SET \textcolor{stringliteral}{"disabled"} 0.0;
            target: \textcolor{stringliteral}{"base"};
            after: \textcolor{stringliteral}{"disable\_text"};
         \}
         program \{ name: \textcolor{stringliteral}{"disable\_text"};
            script \{
               \textcolor{keyword}{new} st[31];
               \textcolor{keyword}{new} Float:vl;
               get\_state(PART:\textcolor{stringliteral}{"elm.text"}, st, 30, vl);
               \textcolor{keywordflow}{if} (!strcmp(st, \textcolor{stringliteral}{"visible"}))
                 set\_state(PART:\textcolor{stringliteral}{"elm.text"}, \textcolor{stringliteral}{"disabled\_visible"}, 0.0);
               \textcolor{keywordflow}{else}
                 set\_state(PART:\textcolor{stringliteral}{"elm.text"}, \textcolor{stringliteral}{"disabled"}, 0.0);
            \}
         \}
         program \{ name: \textcolor{stringliteral}{"enable"};
            signal: \textcolor{stringliteral}{"elm,state,enabled"};
            source: \textcolor{stringliteral}{"elm"};
            action: STATE\_SET \textcolor{stringliteral}{"default"} 0.0;
            target: \textcolor{stringliteral}{"base"};
            after: \textcolor{stringliteral}{"enable\_text"};
         \}
         program \{ name: \textcolor{stringliteral}{"enable\_text"};
            script \{
               \textcolor{keyword}{new} st[31];
               \textcolor{keyword}{new} Float:vl;
               get\_state(PART:\textcolor{stringliteral}{"elm.text"}, st, 30, vl);
               \textcolor{keywordflow}{if} (!strcmp(st, \textcolor{stringliteral}{"disabled\_visible"}))
                 set\_state(PART:\textcolor{stringliteral}{"elm.text"}, \textcolor{stringliteral}{"visible"}, 0.0);
               \textcolor{keywordflow}{else}
                 set\_state(PART:\textcolor{stringliteral}{"elm.text"}, \textcolor{stringliteral}{"default"}, 0.0);
            \}
         \}
      \}
   \}
\}
\end{DoxyCodeInclude}
 