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

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