Go to file
Gustavo Sverzut Barbieri abc87fd449 Adding a transition layout animation for edje box.
Perform an animation when changing the layout from an edje box.

By: Otavio Pontes <otavio@profusion.mobi>

-------

Sample EDC:

{{{

collections {
   group {
      name: "main";
      min: 500 500;
      max: 500 500;
      parts {
         part {
            name: "bg";
            type: RECT;
            description {
               color: 255 255 255 255;
               rel1 { relative: 0.0 0.0; }
               rel2 { relative: 1.0 1.0; }
            }
         }
         part {
            name: "box1";
            type: BOX;
            description {
               state: "default" 0.0;
               box {
                  layout: vertical;
                  padding: 0 0;
               }
               rel1 {
                  relative: 0.0 0.0;
               }
               rel2 {
                  relative: 1.0 1.0;
               }
            }
            description {
               state: "default" 0.1;
               inherit: "default" 0.0;
               box {
                  padding: 10 10;
                  layout: horizontal;
               }
            }
            description {
               state: "default" 0.2;
               inherit: "default" 0.0;
               box {
                  layout: vertical;
               }
               rel1 {
                  relative: 0.0 0.0;
                  offset: 100 100;
               }
               rel2 {
                  relative: 1.0 1.0;
               }
            }
            box {
               items {
                  item {
                     name: "rect1";
                     type: GROUP;
                     source: "grp_rect1";
                     weight: 1.0 1.0;
                     align: -1 -1;
                  }
                  item {
                     name: "rect2";
                     type: GROUP;
                     source: "grp_rect2";
                     weight: 1.0 1.0;
                     align: -1 -1;
                  }
               }
            }
         }
      }
      programs {
         program {
            name: "change_layout";
            signal: "mouse,clicked,1";
            source: "box1";
            action: STATE_SET "default" 0.1;
            target: "box1";
            transition: LINEAR 5.0;
            after: "change_back";
         }
         program {
            name: "change_back";
            action: STATE_SET "default" 0.2;
            target: "box1";
            transition: LINEAR 5.0;
         }
     }
   }
   group {
      name: "grp_rect1";
      parts {
         part {
            name: "r1";
            type: RECT;
            description {
               state: "default" 0.0;
               color: 255 0 0 255;
               rel1 { relative: 0.0 0.0; }
               rel2 { relative: 1.0 1.0; }
            }
            description {
               state: "default" 0.1;
               inherit: "default" 0.0;
               color: 255 0 0 255;
            }
         }
      }
   }
   group {
      name: "grp_rect2";
      parts {
         part {
            name: "r2";
            type: RECT;
            description {
               state: "default" 0.0;
               color: 0 255 0 255;
               rel1 { relative: 0.0 0.0; }
               rel2 { relative: 1.0 1.0; }
            }
            description {
               state: "default" 0.1;
               color: 0 0 255 255;
            }
         }
      }
   }
}

}}}



SVN revision: 52871
2010-09-29 00:28:54 +00:00
legacy Adding a transition layout animation for edje box. 2010-09-29 00:28:54 +00:00