\hypertarget{external_elm_check_8edc-example}{\section{external\-\_\-elm\-\_\-check.\-edc}
}
This example shows E\-X\-T\-E\-R\-N\-A\-L checkbox in action.


\begin{DoxyCodeInclude}
collections \{
   \textcolor{comment}{/* this groups is used as custom icon */}
   group \{ name: \textcolor{stringliteral}{"icon\_green"};
      parts \{
         part \{ name: \textcolor{stringliteral}{"icon\_green"};
            type: RECT;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               color: 0 255 0 255;
               aspect: 1 1;
               aspect\_preference: VERTICAL;
            \}
         \}
      \}
   \}

   group \{ name: \textcolor{stringliteral}{"main"};
      \textcolor{comment}{/* set a min window size */}
      min: 200 300;
      
      \textcolor{comment}{/* tell edje that we are going to use elementary external parts */}
      externals \{
         external: \textcolor{stringliteral}{"elm"};
      \}

      parts \{
         part \{ name: \textcolor{stringliteral}{"bg"};
            type: RECT;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               color: 255 255 255 255;
            \}
         \}

         part \{ name: \textcolor{stringliteral}{"title"};
            type: TEXT;
            effect: SOFT\_SHADOW;
            description \{ state: \textcolor{stringliteral}{"default"} 0.0;
               color: 255 255 255 255;
               color3: 70 70 70 70;
               text \{
                  text: \textcolor{stringliteral}{"Elementary Checks"};
                  font: \textcolor{stringliteral}{"Sans"};
                  size: 16;
                  align: 0.5 0.0;
               \}
            \}
         \}

         \textcolor{comment}{/* EXTERNAL elementary check with a label */}
         part \{ name: \textcolor{stringliteral}{"check1"};
            type: EXTERNAL;
            source: \textcolor{stringliteral}{"elm/check"};
            description \{ state: \textcolor{stringliteral}{"default"} 0;
               rel1 \{
                  offset: 5 35;
               \}
               rel2 \{
                  relative: 1.0 0.0;
                  offset: -6 60;
               \}
               params \{
                  \textcolor{keywordtype}{string}: \textcolor{stringliteral}{"label"} \textcolor{stringliteral}{"Label only"};
               \}
            \}
         \}

         \textcolor{comment}{/* EXTERNAL elementary check with label + standard icon */}
         part \{ name: \textcolor{stringliteral}{"check2"};
            type: EXTERNAL;
            source: \textcolor{stringliteral}{"elm/check"};
            description \{ state: \textcolor{stringliteral}{"default"} 0;
               rel1 \{
                  to: \textcolor{stringliteral}{"check1"};
                  relative: 0.0 1.0;
                  offset: 0 5;
               \}
               rel2 \{
                  to: \textcolor{stringliteral}{"check1"};
                  relative: 1.0 2.0;
                  offset: -1 5;
               \}
               params \{
                  \textcolor{keywordtype}{string}: \textcolor{stringliteral}{"label"} \textcolor{stringliteral}{"Label + standard icon"};
                  \textcolor{keywordtype}{string}: \textcolor{stringliteral}{"icon"} \textcolor{stringliteral}{"home"};
               \}
            \}
         \}

         \textcolor{comment}{/* EXTERNAL elementary check with a label and a custom icon */}
         part \{ name: \textcolor{stringliteral}{"check3"};
            type: EXTERNAL;
            source: \textcolor{stringliteral}{"elm/check"};
            description \{ state: \textcolor{stringliteral}{"default"} 0;
               rel1 \{
                  to: \textcolor{stringliteral}{"check2"};
                  relative: 0.0 1.0;
                  offset: 0 5;
               \}
               rel2 \{
                  to: \textcolor{stringliteral}{"check2"};
                  relative: 1.0 2.0;
                  offset: -1 5;
               \}
               params \{
                  \textcolor{keywordtype}{string}: \textcolor{stringliteral}{"label"} \textcolor{stringliteral}{"Label + custom icon"};
                  \textcolor{keywordtype}{string}: \textcolor{stringliteral}{"icon"} \textcolor{stringliteral}{"icon\_green"};
               \}
            \}
         \}
         
         \textcolor{comment}{/* EXTERNAL elementary check with just a custom icon */}
         part \{ name: \textcolor{stringliteral}{"check4"};
            type: EXTERNAL;
            source: \textcolor{stringliteral}{"elm/check"};
            description \{ state: \textcolor{stringliteral}{"default"} 0;
               rel1 \{
                  to: \textcolor{stringliteral}{"check3"};
                  relative: 0.0 1.0;
                  offset: 0 5;
               \}
               rel2 \{
                  to: \textcolor{stringliteral}{"check3"};
                  relative: 1.0 2.0;
                  offset: -1 5;
               \}
               params \{
                  \textcolor{keywordtype}{string}: \textcolor{stringliteral}{"icon"} \textcolor{stringliteral}{"home"};
               \}
            \}
         \}
         
         \textcolor{comment}{/* EXTERNAL elementary check with just a custom icon */}
         part \{ name: \textcolor{stringliteral}{"check5"};
            type: EXTERNAL;
            source: \textcolor{stringliteral}{"elm/check"};
            description \{ state: \textcolor{stringliteral}{"default"} 0;
               rel1 \{
                  to: \textcolor{stringliteral}{"check4"};
                  relative: 0.0 1.0;
                  offset: 0 5;
               \}
               rel2 \{
                  to: \textcolor{stringliteral}{"check4"};
                  relative: 1.0 2.0;
                  offset: -1 5;
               \}
               params \{
                  \textcolor{keywordtype}{string}: \textcolor{stringliteral}{"icon"} \textcolor{stringliteral}{"icon\_green"};
               \}
            \}
         \}
      \}

      programs \{
         \textcolor{comment}{/* on edje load start the programs loop */}
         program \{
            signal: \textcolor{stringliteral}{"load"};
            after: \textcolor{stringliteral}{"loop1"};
         \}

         \textcolor{comment}{/* wait 0.2, toggle the state of check1, trigger next prog */}
         program \{ name: \textcolor{stringliteral}{"loop1"};
            in: 0.2 0.0;
            script \{
               external\_param\_set\_bool(PART:\textcolor{stringliteral}{"check1"}, \textcolor{stringliteral}{"state"},
                        !external\_param\_get\_bool(PART:\textcolor{stringliteral}{"check1"}, \textcolor{stringliteral}{"state"}));
            \}
            after: \textcolor{stringliteral}{"loop2"};
         \}

         \textcolor{comment}{/* wait 0.2, toggle the state of check2, trigger next prog */}
         program \{ name: \textcolor{stringliteral}{"loop2"};
            in: 0.2 0.0;
            script \{
               external\_param\_set\_bool(PART:\textcolor{stringliteral}{"check2"}, \textcolor{stringliteral}{"state"},
                        !external\_param\_get\_bool(PART:\textcolor{stringliteral}{"check2"}, \textcolor{stringliteral}{"state"}));
            \}
            after: \textcolor{stringliteral}{"loop3"};
         \}

         \textcolor{comment}{/* wait 0.2, toggle the state of check3, trigger next prog */}
         program \{ name: \textcolor{stringliteral}{"loop3"};
            in: 0.2 0.0;
            script \{
               external\_param\_set\_bool(PART:\textcolor{stringliteral}{"check3"}, \textcolor{stringliteral}{"state"},
                        !external\_param\_get\_bool(PART:\textcolor{stringliteral}{"check3"}, \textcolor{stringliteral}{"state"}));
            \}
            after: \textcolor{stringliteral}{"loop4"};
         \}

         \textcolor{comment}{/* wait 0.2, toggle the state of check4, trigger next prog */}
         program \{ name: \textcolor{stringliteral}{"loop4"};
            in: 0.2 0.0;
            script \{
               external\_param\_set\_bool(PART:\textcolor{stringliteral}{"check4"}, \textcolor{stringliteral}{"state"},
                        !external\_param\_get\_bool(PART:\textcolor{stringliteral}{"check4"}, \textcolor{stringliteral}{"state"}));
            \}
            after: \textcolor{stringliteral}{"loop5"};
         \}
         
         \textcolor{comment}{/* wait 0.2, toggle the state of check5, restart from the first prog */}
         program \{ name: \textcolor{stringliteral}{"loop5"};
            in: 0.2 0.0;
            script \{
               external\_param\_set\_bool(PART:\textcolor{stringliteral}{"check5"}, \textcolor{stringliteral}{"state"},
                        !external\_param\_get\_bool(PART:\textcolor{stringliteral}{"check5"}, \textcolor{stringliteral}{"state"}));
            \}
            after: \textcolor{stringliteral}{"loop1"};
         \}
      \}
   \}
\}
\end{DoxyCodeInclude}
 