group { name: "elm/button/base/default";
   alias: "elm/button/base/naviframe/back_btn/default";
   alias: "elm/button/base/naviframe/back_btn/pager";
   images.image: "button_normal.png" COMP;
   images.image: "button_clicked.png" COMP;
#define ICON     1
#define LABEL    2
#define MASK     3
#define DISABLE  4
   script {
      public btmode;
      public eval_mode(m) {
         new m1 = m & MASK;
         new d = m & DISABLE;
         if (m1 == (ICON | LABEL)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "visible", 0.0);
               set_state(PART:"sizer.content", "visible", 0.0);
               set_state(PART:"elm.text", "visible", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "visible", 0.0);
               set_state(PART:"sizer.content", "visible", 0.0);
               set_state(PART:"elm.text", "disabled_visible", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else if (m1 == (ICON)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "icononly", 0.0);
               set_state(PART:"sizer.content", "icononly", 0.0);
               set_state(PART:"elm.text", "default", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "icononly", 0.0);
               set_state(PART:"sizer.content", "icononly", 0.0);
               set_state(PART:"elm.text", "default", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else if (m1 == (LABEL)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "textonly", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "disabled_textonly", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else {
            if (!d) {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "icononly", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "icononly", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         }
      }
   }
   parts {
      image { "base"; nomouse;
         desc { "default";
            image.normal: "button_normal.png";
            image.border: 4 4 3 5;
            image.middle: SOLID;
            rel1.offset: -1 0;
            rel2.offset: 0 1;
            fill.smooth: 0;
         }
         desc { "clicked";
            inherit: "default";
            image.normal: "button_clicked.png";
            image.border: 5 5 4 6;
         }
      }
      rect { "icon_clip";
         desc { "default";
         }
         desc { "disabled";
            inherit: "default";
            color: 255 255 255 64;
         }
      }
      swallow { "elm.swallow.content"; nomouse;
         clip_to: "icon_clip";
         desc { "default";
            fixed: 1 0;
            align: 0.0 0.5;
            rel1.offset: 6 5;
            rel1.to: "base";
            rel2.relative: 0.0 1.0;
            rel2.offset: 6 -8;
            rel2.to: "base";
            visible: 0;
         }
         desc { "visible";
            inherit: "default";
            fixed: 1 0;
            aspect: 1.0 1.0;
            visible: 1;
         }
         desc { "icononly";
            inherit: "default";
            fixed: 0 0;
            align: 0.5 0.5;
            rel2.relative: 1.0 1.0;
            rel2.offset: -7 -8;
            visible: 1;
         }
      }
      text { "sizer.content"; nomouse;
         scale: 1;
         desc { "default";
//            fixed: 1 1;
            visible: 0;
            text { font: FN; size: 10;
               min: 0 0;
               text_class: "button_text";
            }
         }
         desc { "visible";
            inherit: "default";
            rel1.to: "elm.swallow.content";
            rel2.to: "elm.swallow.content";
            text {
               min: 1 1;
               ellipsis: -1;
               text: "M";
            }
         }
         desc { "icononly";
            inherit: "default";
            rel1.to: "elm.swallow.content";
            rel2.to: "elm.swallow.content";
            text {
               min: 1 1;
               ellipsis: -1;
               text: "M";
            }
         }
      }
      text { "elm.text"; nomouse;
         effect: SHADOW BOTTOM;
         scale: 1;
         desc { "default";
            rel1.offset: 0 5;
            rel1.relative: 1.0 0.0;
            rel1.to_x: "elm.swallow.content";
            rel1.to_y: "base";
            rel2.offset: -8 -8;
            rel2.to: "base";
            color_class: "button_text";
            color3: 255 255 255 255;
            text { font: FN; size: 10;
               align: 0.5 0.5;
               min: 0 0;
               text_class: "button";
            }
            visible: 0;
            fixed: 1 1;
         }
         desc { "visible";
            inherit: "default";
            rel1.offset: 2 5;
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
         desc { "textonly";
            inherit: "default";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
         desc { "disabled_visible";
            inherit: "default";
            rel1.offset: 2 5;
            color_class: "button_text_disabled";
            color3: 255 255 255 255;
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
         desc { "disabled_textonly";
            inherit: "default";
            color_class: "button_text_disabled";
            color3: 255 255 255 255;
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
      }
      rect { "event";
         desc { "default";
            color: 0 0 0 0;
         }
         desc { "disabled";
            inherit: "default";
            visible: 0;
         }
      }
   }
   programs {
      program {
         signal: "mouse,down,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,press" "elm";
         after: "button_click_anim";
      }
      program { name: "button_click_anim";
         action: STATE_SET "clicked" 0.0;
         target: "base";
      }
      program { name: "button_unclick";
         signal: "mouse,up,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,unpress" "elm";
         after: "button_unclick_anim";
      }
      program { name: "button_unclick_anim";
         action: STATE_SET "default" 0.0;
         target: "base";
      }
      program { name: "buttonactivate";
         signal: "elm,anim,activate"; source: "elm";
         action: STATE_SET "clicked" 0.0;
         target: "base";
         after: "button_unpressed_anim";
      }
      program { name: "button_unpressed_anim";
         action: STATE_SET "default" 0.0;
         in: 0.5 0.0;
         target: "base";
      }
      program {
         signal: "mouse,clicked,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,click" "elm";
      }
      program { name: "button_text_visible";
         signal: "elm,state,text,visible"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= LABEL; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_text_hidden";
         signal: "elm,state,text,hidden"; source: "elm";
         script {
            new m = get_int(btmode);
            m &= ~LABEL; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_icon_visible";
         signal: "elm,state,icon,visible"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= ICON; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_icon_hidden";
         signal: "elm,state,icon,hidden"; source: "elm";
         action:  STATE_SET "default" 0.0;
         script {
            new m = get_int(btmode);
            m &= ~ICON; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_state_disabled";
         signal: "elm,state,disabled"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= DISABLE; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_state_enabled";
         signal: "elm,state,enabled"; source: "elm";
         script {
            new m = get_int(btmode);
            m &= ~DISABLE; set_int(btmode, m);
            eval_mode(m);
         }
      }
   }
#undef ICON
#undef LABEL
#undef MASK
#undef DISABLE
}

group { name: "elm/button/base/anchor";
   images.image: "horizontal_separated_bar_small_glow.png" COMP;
#define ICON     1
#define LABEL    2
#define MASK     3
#define DISABLE  4
   script {
      public btmode;
      public eval_mode(m) {
         new m1 = m & MASK;
         new d = m & DISABLE;
         if (m1 == (ICON | LABEL)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "visible", 0.0);
               set_state(PART:"sizer.content", "visible", 0.0);
               set_state(PART:"elm.text", "visible", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"bar", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "visible", 0.0);
               set_state(PART:"sizer.content", "visible", 0.0);
               set_state(PART:"elm.text", "disabled_visible", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"bar", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else if (m1 == (ICON)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "icononly", 0.0);
               set_state(PART:"sizer.content", "icononly", 0.0);
               set_state(PART:"elm.text", "default", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"bar", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "icononly", 0.0);
               set_state(PART:"sizer.content", "icononly", 0.0);
               set_state(PART:"elm.text", "default", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"bar", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else if (m1 == (LABEL)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "textonly", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"bar", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "disabled_textonly", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"bar", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else {
            if (!d) {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "icononly", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"bar", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "icononly", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"bar", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         }
      }
   }
   parts {
      spacer { "base";
         desc { "default";
            rel1.offset: 0 0;
            rel2.offset: 0 0;
         }
      }
      rect { "icon_clip";
         desc { "default";
         }
         desc { "disabled";
            inherit: "default";
            color: 255 255 255 64;
         }
      }
      swallow { "elm.swallow.content"; nomouse;
         clip_to: "icon_clip";
         desc { "default";
            fixed: 1 0;
            align: 0.0 0.5;
            rel1.offset: 0 4;
            rel1.to: "base";
            rel2.relative: 0.0 1.0;
            rel2.offset: 0 -5;
            rel2.to: "base";
            visible: 0;
         }
         desc { "visible";
            inherit: "default";
            fixed: 1 0;
            aspect: 1.0 1.0;
            visible: 1;
         }
         desc { "icononly";
            inherit: "default";
            fixed: 0 0;
            align: 0.5 0.5;
            rel2.relative: 1.0 1.0;
            rel2.offset: -1 -5;
            visible: 1;
         }
      }
      text { "sizer.content"; nomouse;
         scale: 1;
         desc { "default";
            visible: 0;
            text { font: FN; size: 10;
               min: 0 0;
               text_class: "button_text";
            }
         }
         desc { "visible";
            inherit: "default";
            rel1.to: "elm.swallow.content";
            rel2.to: "elm.swallow.content";
            text {
               min: 1 1;
               ellipsis: -1;
               text: "M";
            }
         }
         desc { "icononly";
            inherit: "default";
            rel1.to: "elm.swallow.content";
            rel2.to: "elm.swallow.content";
            text {
               min: 1 1;
               ellipsis: -1;
               text: "M";
            }
         }
      }
      text { "elm.text"; nomouse;
         effect: GLOW;
         scale: 1;
         desc { "default";
            rel1.offset: -2 0;
            rel1.relative: 1.0 0.0;
            rel1.to_x: "elm.swallow.content";
            rel1.to_y: "base";
            rel2.offset: -1 -1;
            rel2.to: "base";
            color_class: "button_text_anchor";
            color2: 255 255 255 255;
            color3: 255 255 255 255;
            text { font: FN; size: 10;
               align: 0.5 0.5;
               min: 0 0;
               text_class: "button_anchor";
            }
            visible: 0;
         }
         desc { "visible";
            inherit: "default";
            rel1.offset: 0 0;
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
         desc { "textonly";
            inherit: "default";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
         desc { "disabled_visible";
            inherit: "default";
            rel1.offset: 0 0;
            color_class: "button_text_anchor_disabled";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
         desc { "disabled_textonly";
            inherit: "default";
            color_class: "button_text_anchor_disabled";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
      }
      text { "text2"; nomouse;
         effect: GLOW;
         scale: 1;
         desc { "default";
            fixed: 1 1;
            rel1.to: "elm.text";
            rel2.to: "elm.text";
            color_class: "button_text_anchor";
            color2: 255 255 255 255;
            color3: 255 255 255 255;
            text { font: FN; size: 10;
               text_source: "elm.text";
               min: 1 1;
               ellipsis: -1;
               text_class: "button_anchor";
            }
            visible: 0;
         }
         desc { "clicked";
            inherit: "default";
            visible: 1;
         }
      }
      image { "bar"; nomouse;
         desc { "default";
            image.normal: "horizontal_separated_bar_small_glow.png";
            image.border: 4 4 4 4;
            fill.smooth: 0;
            rel1.relative: 0.0 1.0;
            rel1.offset: -3 -6;
            rel2.offset: 2 3;
         }
         desc { "disabled";
            inherit: "default";
            color: 255 255 255 64;
         }
      }
      image { "bar2"; nomouse;
         desc { "default";
            image.normal: "horizontal_separated_bar_small_glow.png";
            image.border: 4 4 4 4;
            fill.smooth: 0;
            rel1.to: "bar";
            rel2.to: "bar";
            color: 255 255 255 0;
            visible: 0;
         }
         desc { "clicked";
            inherit: "default";
            color: 255 255 255 255;
            visible: 1;
         }
      }
      rect { "event";
         desc { "default";
            color: 0 0 0 0;
         }
         desc { "disabled";
            inherit: "default";
            visible: 0;
         }
      }
   }
   programs {
      program {
         signal: "mouse,down,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,press" "elm";
         after: "button_click_anim";
      }
      program { name: "button_click_anim";
         action: STATE_SET "clicked" 0.0;
         target: "base";
         target: "bar2";
         target: "text2";
      }
      program {
         signal: "mouse,up,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,unpress" "elm";
         after: "button_unclick_anim";
      }
      program { name: "button_unclick_anim";
         action: STATE_SET "default" 0.0;
         target: "base";
         target: "bar2";
         target: "text2";
      }
      program {
         signal: "elm,anim,activate"; source: "elm";
         action: STATE_SET "clicked" 0.0;
         target: "base";
         target: "bar2";
         target: "text2";
         after: "button_unpressed_anim";
      }
      program { name: "button_unpressed_anim";
         action: STATE_SET "default" 0.0;
         in: 0.5 0.0;
         target: "base";
         target: "bar2";
         target: "text2";
      }
      program {
         signal: "mouse,clicked,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,click" "elm";
      }
      program { name: "button_text_visible";
         signal: "elm,state,text,visible"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= LABEL; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_text_hidden";
         signal: "elm,state,text,hidden"; source: "elm";
         script {
            new m = get_int(btmode);
            m &= ~LABEL; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_icon_visible";
         signal: "elm,state,icon,visible"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= ICON; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_icon_hidden";
         signal: "elm,state,icon,hidden"; source: "elm";
         action:  STATE_SET "default" 0.0;
         script {
            new m = get_int(btmode);
            m &= ~ICON; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_state_disabled";
         signal: "elm,state,disabled"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= DISABLE; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name: "button_state_enabled";
         signal: "elm,state,enabled"; source: "elm";
         script {
            new m = get_int(btmode);
            m &= ~DISABLE; set_int(btmode, m);
            eval_mode(m);
         }
      }
   }
#undef ICON
#undef LABEL
#undef MASK
#undef DISABLE
}

group { name: "elm/button/base/colorselector/left/default";
   inherit: "elm/button/base/default";
   images.image: "sym_left_light_normal.png" COMP;
   parts {
      image { "ic"; nomouse;
         desc { "default";
            min: 15 15;
            max: 15 15;
            fixed: 1 1;
            image.normal: "sym_left_light_normal.png";
         }
      }
   }
}

group { name: "elm/button/base/colorselector/right/default";
   inherit: "elm/button/base/default";
   images.image: "sym_right_light_normal.png" COMP;
   parts {
      image { "ic"; nomouse;
         desc { "default";
            min: 15 15;
            max: 15 15;
            fixed: 1 1;
            image.normal: "sym_right_light_normal.png";
         }
      }
   }
}

group { name: "elm/button/base/media_player/prev/default";
   alias: "elm/button/base/media_player/rewind/default";
   alias: "elm/button/base/media_player/play/default";
   alias: "elm/button/base/media_player/pause/default";
   alias: "elm/button/base/media_player/stop/default";
   alias: "elm/button/base/media_player/forward/default";
   alias: "elm/button/base/media_player/next/default";
   alias: "elm/button/base/media_player/info/default";
   alias: "elm/button/base/media_player/eject/default";
   alias: "elm/button/base/media_player/volume/default";
   alias: "elm/button/base/media_player/mute/default";

   alias: "elm/button/base/media_player/prev/flush";
   alias: "elm/button/base/media_player/rewind/flush";
   alias: "elm/button/base/media_player/play/flush";
   alias: "elm/button/base/media_player/pause/flush";
   alias: "elm/button/base/media_player/stop/flush";
   alias: "elm/button/base/media_player/forward/flush";
   alias: "elm/button/base/media_player/next/flush";
   alias: "elm/button/base/media_player/info/flush";
   alias: "elm/button/base/media_player/eject/flush";
   alias: "elm/button/base/media_player/volume/flush";
   alias: "elm/button/base/media_player/mute/flush";
   
   images.image: "shadow_inset_bevels.png" COMP;
   images.image: "shadow_angled_in_sides.png" COMP;
   parts {
      rect { "clip";
         desc { "default";
         }
      }
      image { "shadow1"; nomouse;
         clip_to: "clip";
         desc { "default";
            rel2.offset: -1 0;
            image.normal: "shadow_inset_bevels.png";
            image.border: 2 2 0 1;
            visible: 0;
         }
         desc { "selected";
            inherit: "default";
            visible: 1;
         }
      }
      image { "shadow2"; nomouse;
         clip_to: "clip";
         desc { "default";
            rel1.offset: 1 0;
            rel2.offset: -2 -1;
            image.normal: "shadow_angled_in_sides.png";
            image.border: 8 8 0 1;
            image.middle: 0;
            visible: 0;
         }
         desc { "selected";
            inherit: "default";
            visible: 1;
         }
      }
      swallow { "elm.swallow.content"; nomouse;
         desc { "default";
            rel1.offset: 3 1;
            rel2.offset: -4 -2;
         }
      }
      rect { "event";
         ignore_flags: ON_HOLD;
         desc { "default";
            color: 0 0 0 0;
         }
      }
   }
   programs {
      program {
         signal: "mouse,down,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,press" "elm";
         after: "button_click_anim";
      }
      program { name:   "button_click_anim";
         action: STATE_SET "selected" 0.0;
         target: "shadow1";
         target: "shadow2";
      }
      program {
         signal: "mouse,up,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,unpress" "elm";
         after: "button_unclick_anim";
      }
      program { name:   "button_unclick_anim";
         action: STATE_SET "default" 0.0;
         target: "shadow1";
         target: "shadow2";
      }
      program {
         signal: "elm,anim,activate"; source: "elm";
         action: STATE_SET "clicked" 0.0;
         target: "shadow1";
         target: "shadow2";
         after: "button_unpressed_anim";
      }
      program { name:   "button_unpressed_anim";
         action: STATE_SET "default" 0.0;
         in: 0.5 0.0;
         target: "shadow1";
         target: "shadow2";
      }
      program {
         signal: "mouse,clicked,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,click" "elm";
      }
   }
}

group { name: "elm/button/base/hoversel_vertical/default";
   inherit: "elm/button/base/default";
   alias: "elm/button/base/hoversel_vertical/entry";
   alias: "elm/button/base/hoversel_horizontal/default";
   alias: "elm/button/base/hoversel_horizontal/entry";

   images.image: "vertical_separated_bar_glow.png" COMP;
   
   parts {
      text { "elm.text";
         desc { "default";
            rel1.offset: 0 5;
            rel1.relative: 1.0 0.0;
            rel1.to_x: "elm.swallow.content";
            rel1.to_y: "base";
            rel2.to_y: "base";
            rel2.to_x: "select_line";
            rel2.offset: -3 -8;
            rel2.relative: 0.0 1.0;
            text.text_class: "hoversel";
            text.ellipsis: -1;
            color3: 255 255 255 255;
            fixed: 1 1;
         }
         desc { "visible";
            inherit: "default";
            rel1.offset: 5 5;
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
         desc { "textonly";
            inherit: "default";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
         desc { "disabled_visible";
            inherit: "default";
            rel1.offset: 5 5;
            color_class: "hoversel_text_disabled";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
         desc { "disabled_textonly";
            inherit: "default";
            color_class: "hoversel_text_disabled";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
            fixed: 0 0;
         }
      }
      image { "select_line"; nomouse;
         desc { "default";
            fixed: 1 1;
            align: 1.0 0.5;
            min: 15 10;
            rel1.to: "base";
            rel1.relative: 1.0 0.0;
            rel1.offset: 1 -3;
            rel2.to: "base";
            rel2.offset: 1 0;
            image.normal: "vertical_separated_bar_glow.png";
            image.border: 7 7 7 7;
            fill.smooth : 0;
         }
         desc { "clicked";
            inherit: "default";
            rel1.offset: 0 -2;
            rel2.offset: 0 -1;
         }
      }
   }
   programs {
      program { name: "button_click_anim";
         target: "select_line";
      }
      program { name: "button_unclick_anim";
         target: "select_line";
      }
      program { name: "buttonactivate";
         target: "select_line";
      }
      program { name: "button_unpressed_anim";
         target: "select_line";
      }
   }
}

group { name: "elm/button/base/hoversel_vertical_entry/default";
   alias: "elm/button/base/hoversel_vertical_entry/entry";
   images.image: "vgrad_med_dark.png" COMP;
   images.image: "bevel_horiz_out.png" COMP;
   images.image: "shadow_rounded_horiz.png" COMP;
   images.image: "shine.png" COMP;
#define ICON     1
#define LABEL    2
#define MASK     3
#define DISABLE  4
   script {
      public btmode;
      public eval_mode(m) {
         new m1 = m & MASK;
         new d = m & DISABLE;
         if (m1 == (ICON | LABEL)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "visible", 0.0);
               set_state(PART:"sizer.content", "visible", 0.0);
               set_state(PART:"elm.text", "visible", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "visible", 0.0);
               set_state(PART:"sizer.content", "visible", 0.0);
               set_state(PART:"elm.text", "disabled_visible", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else if (m1 == (ICON)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "icononly", 0.0);
               set_state(PART:"sizer.content", "icononly", 0.0);
               set_state(PART:"elm.text", "default", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "icononly", 0.0);
               set_state(PART:"sizer.content", "icononly", 0.0);
               set_state(PART:"elm.text", "default", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else if (m1 == (LABEL)) {
            if (!d) {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "textonly", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "disabled_textonly", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         } else {
            if (!d) {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "icononly", 0.0);
               set_state(PART:"icon_clip", "default", 0.0);
               set_state(PART:"event", "default", 0.0);
            } else {
               set_state(PART:"elm.swallow.content", "default", 0.0);
               set_state(PART:"sizer.content", "default", 0.0);
               set_state(PART:"elm.text", "icononly", 0.0);
               set_state(PART:"icon_clip", "disabled", 0.0);
               set_state(PART:"event", "disabled", 0.0);
            }
         }
      }
   }
   parts {
      image { "shadow"; nomouse;
         desc { "default";
            fixed: 1 1;
            image.normal: "shadow_rounded_horiz.png";
            image.border: 0 0 9 9;
            rel1.to: "base";
            rel1.offset: 0 -4;
            rel2.to: "base";
            rel2.offset: -1 5;
            fill.smooth: 0;
            visible: 0;
         }
         desc { "clicked";
            inherit: "default";
            visible: 1;
         }
      }
      image { "base"; nomouse;
         desc { "default";
            fixed: 1 1;
            rel1.offset: -6 0;
            image.normal: "vgrad_med_dark.png";
            fill.smooth: 0;
            TILED_HORIZ(120)
            visible: 0;
         }
         desc { "clicked";
            inherit: "default";
            visible: 1;
         }
      }
      rect { "icon_clip";
         desc { "default";
         }
         desc { "disabled";
            inherit: "default";
            color: 255 255 255 64;
         }
      }
      swallow { "elm.swallow.content"; nomouse;
         clip_to: "icon_clip";
         desc { "default";
            fixed: 1 0;
            align: 0.0 0.5;
            rel1.offset: 6 5;
            rel1.to: "base";
            rel2.relative: 0.0 1.0;
            rel2.offset: 6 -8;
            rel2.to: "base";
            visible: 0;
         }
         desc { "visible";
            inherit: "default";
            fixed: 1 0;
            aspect: 1.0 1.0;
            visible: 1;
         }
         desc { "icononly";
            inherit: "default";
            fixed: 0 0;
            align: 0.5 0.5;
            rel2.relative: 1.0 1.0;
            rel2.offset: -7 -8;
            visible: 1;
         }
      }
      text { "sizer.content"; nomouse;
         scale: 1;
         desc { "default";
            fixed: 1 1;
            visible: 0;
            text { font: FN; size: 10;
               min: 0 0;
               text_class: "button_text";
            }
         }
         desc { "visible";
            inherit: "default";
            rel1.to: "elm.swallow.content";
            rel2.to: "elm.swallow.content";
            text {
               min: 1 1;
               ellipsis: -1;
               text: "M";
            }
         }
         desc { "icononly";
            inherit: "default";
            rel1.to: "elm.swallow.content";
            rel2.to: "elm.swallow.content";
            text {
               min: 1 1;
               ellipsis: -1;
               text: "M";
            }
         }
      }
      rect { "click_clip";
         desc { "default";
         }
         desc { "clicked";
            inherit: "default";
            visible: 0;
         }
      }
      spacer { "text_container";
         desc { "default";
            rel1.relative: 1.0 0.0;
            rel1.to_x: "elm.swallow.content";
            rel1.to_y: "base";
            rel2.to: "base";
         }
      }
      text { "elm.text"; nomouse;
         effect: SHADOW BOTTOM;
         scale: 1;
         clip_to: "click_clip";
         desc { "default";
            rel1.offset: 0 5;
            rel2.offset: -8 -8;
            rel1.to: "text_container";
            rel2.to: "text_container";
            color_class: "hoversel_text";
            color3: 255 255 255 255;
            text { font: FN; size: 10;
               align: -1 0.5;
               min: 0 0;
               text_class: "button";
            }
            visible: 0;
         }
         desc { "visible";
            inherit: "default";
            rel1.offset: 2 5;
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
         desc { "textonly";
            inherit: "default";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
         desc { "disabled_visible";
            inherit: "default";
            rel1.offset: 2 5;
            color_class: "hoversel_text_disabled";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
         desc { "disabled_textonly";
            inherit: "default";
            color_class: "hoversel_text_disabled";
            text.min: 1 1;
            text.ellipsis: -1;
            visible: 1;
         }
      }
      text { "label3"; nomouse;
         effect: GLOW;
         scale: 1;
         desc { "default";
            fixed: 1 1;
            rel1.offset: -2 -3;
            rel1.to: "elm.text";
            rel2.offset: 2 1;
            rel2.to: "elm.text";
            color_class: "hoversel_item_active";
            color2: 255 255 255 255;
            color3: 255 255 255 255;
            text { font: FN; size: 10;
               text_source: "elm.text";
               align: -1 0.5;
               text_class: "hoversel_item";
            }
            visible: 0;
         }
         desc { "clicked";
            inherit: "default";
            visible: 1;
         }
      }
      image { "bevel"; nomouse;
         insert_after: "elm.text";
         desc { "default";
            fixed: 1 1;
            image.normal: "bevel_horiz_out.png";
            image.border: 0 0 2 2;
            image.middle: 0;
            fill.smooth: 0;
            visible: 0;
         }
         desc { "clicked";
            inherit: "default";
            visible: 1;
         }
      }
      image { "shine"; nomouse;
         insert_before: "event";
         desc { "default";
            fixed: 1 1;
            rel1.to: "base";
            rel1.offset: 0 -2;
            rel2.to: "base";
            rel2.relative: 1.0 0.0;
            rel2.offset: -1 2;
            image.normal: "shine.png";
            visible: 0;
            FIXED_SIZE(69, 5)
         }
         desc { "clicked";
            inherit:  "default";
            visible: 1;
         }
      }
      rect { name: "event";
         desc { "default";
            color: 0 0 0 0;
         }
         desc { "disabled";
            inherit: "default";
            visible: 0;
         }
      }
   }
   programs {
      program {
         signal: "mouse,down,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,press" "elm";
         after: "button_click_anim";
      }
      program { name: "button_click_anim";
         action: STATE_SET "clicked" 0.0;
         target: "shadow";
         target: "base";
         target: "shine";
         target: "click_clip";
         target: "label3";
      }
      program { name: "button_unclick";
         signal: "mouse,up,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,unpress" "elm";
         after: "button_unclick_anim";
      }
      program { name: "button_unclick_anim";
         action: STATE_SET "default" 0.0;
         target: "shadow";
         target: "base";
         target: "shine";
         target: "click_clip";
         target: "label3";
      }
      program { name: "buttonactivate";
         signal: "elm,anim,activate"; source: "elm";
         action: STATE_SET "clicked" 0.0;
         target: "shadow";
         target: "base";
         target: "shine";
         target: "click_clip";
         target: "label3";
         after: "button_unpressed_anim";
      }
      program { name: "button_unpressed_anim";
         action: STATE_SET "default" 0.0;
         in: 0.5 0.0;
         target: "shadow";
         target: "base";
         target: "shine";
         target: "click_clip";
         target: "label3";
      }
      program {
         signal: "mouse,clicked,1"; source: "event";
         action: SIGNAL_EMIT "elm,action,click" "elm";
      }
      program { name:   "button_text_visible";
         signal: "elm,state,text,visible"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= LABEL; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name:   "button_text_hidden";
         signal: "elm,state,text,hidden"; source: "elm";
         script {
            new m = get_int(btmode);
            m &= ~LABEL; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name:   "button_icon_visible";
         signal: "elm,state,icon,visible"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= ICON; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name:   "button_icon_hidden";
         signal: "elm,state,icon,hidden"; source: "elm";
         action:  STATE_SET "default" 0.0;
         script {
            new m = get_int(btmode);
            m &= ~ICON; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name:   "button_state_disabled";
         signal: "elm,state,disabled"; source: "elm";
         script {
            new m = get_int(btmode);
            m |= DISABLE; set_int(btmode, m);
            eval_mode(m);
         }
      }
      program { name:   "button_state_enabled";
         signal: "elm,state,enabled"; source: "elm";
         script {
            new m = get_int(btmode);
            m &= ~DISABLE; set_int(btmode, m);
            eval_mode(m);
         }
      }
   }
#undef ICON
#undef LABEL
#undef MASK
#undef DISABLE
}

group { name: "elm/button/base/hoversel_horizontal_entry/default";
   inherit: "elm/button/base/hoversel_vertical_entry/default";
   alias: "elm/button/base/hoversel_horizontal_entry/entry";
   parts {
      image { "base";
         desc { "default";
            rel1.offset: 0 0;
         }
         desc { "clicked";
            inherit: "default";
            visible: 1;
         }
      }
   }
}

/******************* SPINNER BUTTONS STYLES **********************/
   group { name: "elm/button/base/spinner/increase/default";
      images.image: "sym_right_light_normal.png" COMP;
      images.image: "sym_right_glow_normal.png" COMP;
      images.image: "sym_right_dark_normal.png" COMP;
      script {
         public mouse_down = 0;
         public multi_down = 0;
      }
      parts {
         part { name: "arrow.image";
            scale: 1;
            description { state: "default" 0.0;
               min: 15 15;
               max: 15 15;
               color_class: "F032L1";
               image.normal: "sym_right_light_normal.png";
            }
            description { state: "pressed" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_right_glow_normal.png";
            }
            description { state: "disabled" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_right_dark_normal.png";
            }
         }
         part { name: "over";
            type: RECT;
            repeat_events: 1;
            description { state: "default" 0.0;
               color: 0 0 0 0;
            }
         }
         part { name: "disabler";
            type: RECT;
            description { state: "default" 0.0;
               color: 0 0 0 0;
               visible: 0;
            }
            description { state: "disabled" 0.0;
               inherit: "default" 0.0;
               visible: 1;
            }
         }
      }
      programs {
         program { name: "button_press";
            signal: "mouse,down,1";
            source: "over";
            script {
               if ((get_int(multi_down) == 0) &&
                   (get_int(mouse_down) == 0)) {
                     set_int(mouse_down, 1);
                     run_program(PROGRAM:"button_press2");
               }
            }
         }
         program { name: "button_press2";
            action: SIGNAL_EMIT "elm,action,press" "";
            after: "button_press_anim";
         }
         program { name: "button_press_anim";
            action: STATE_SET "pressed" 0.0;
            target: "arrow.image";
         }
         program { name: "button_unpress";
            signal: "mouse,up,1";
            source: "over";
            script {
               if (get_int(mouse_down) == 1) {
                     set_int(mouse_down, 0);
                     run_program(PROGRAM:"button_unpress2");
                     run_program(PROGRAM:"button_unpress_anim");
               }
            }
         }
         program { name: "button_unpress2";
            action: SIGNAL_EMIT "elm,action,unpress" "";
         }
         program { name: "button_unpress_anim";
            action: STATE_SET "default" 0.0;
            target: "arrow.image";
         }
         program { name: "button_click";
            signal: "mouse,clicked,1";
            source: "over";
            script {
               if (get_int(multi_down) == 0) {
                 run_program(PROGRAM:"button_click2");
               }
            }
         }
         program { name: "action_unpressed";
            signal: "elm,action,unpressed";
            source: "elm";
            after: "button_unpress_anim";
         }
         program { name: "action_pressed";
            signal: "elm,action,pressed";
            source: "elm";
            after: "button_press_anim";
         }
         program { name: "button_click2";
            action: SIGNAL_EMIT "elm,action,click" "";
         }
         program { name: "access_pressed";
            signal: "elm,action,anim,activate";
            source: "elm";
            action: STATE_SET "pressed" 0.0;
            target: "arrow.image";
            after: "access_pressed_anim";
         }
         program { name: "access_pressed_anim";
            action: STATE_SET "default" 0.0;
            transition: DECELERATE 0.1;
            target: "arrow.image";
         }
         program { name: "disable";
            signal: "elm,state,disabled";
            source: "elm";
            action: STATE_SET "disabled" 0.0;
            target: "arrow.image";
            target: "disabler";
         }
         program { name: "enable";
            signal: "elm,state,enabled";
            source: "elm";
            action: STATE_SET "default" 0.0;
            target: "arrow.image";
            target: "disabler";
         }
         program {
            name: "multi_down";
            signal: "elm,action,multi,down";
            source: "elm";
            script {
               set_int(multi_down, 1);
            }
         }
         program {
            name: "multi_up";
            signal: "elm,action,multi,up";
            source: "elm";
            script {
               set_int(multi_down, 0);
            }
         }
      }
   }

   group { name: "elm/button/base/spinner/decrease/default";
      inherit: "elm/button/base/spinner/increase/default";
      images.image: "sym_left_light_normal.png" COMP;
      images.image: "sym_left_glow_normal.png" COMP;
      images.image: "sym_left_dark_normal.png" COMP;
      parts {
         part { name: "arrow.image";
            scale: 1;
            description { state: "default" 0.0;
               min: 15 15;
               max: 15 15;
               image.normal: "sym_left_light_normal.png";
            }
            description { state: "pressed" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_left_glow_normal.png";
            }
            description { state: "disabled" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_left_dark_normal.png";
            }
         }
      }
   }

   group { name: "elm/button/base/spinner/default";
      alias: "elm/button/base/spinner/vertical";
      parts {
         part { name: "bg";
            type: SPACER;
            scale: 1;
            description { state: "default" 0.0;
            }
         }
         part { name: "elm.text";
            type: TEXT;
            scale: 1;
            effect: SHADOW BOTTOM;
            description { state: "default" 0.0;
               color: FN_COL_DEFAULT;
               color_class: "spinner";
               rel1.to: "bg";
               rel2.to: "bg";
               text { font: FN; size: 10;
                  min: 1 1;
                  text_class: "spinner";
                  ellipsis: -1;
               }
            }
            description { state: "disabled" 0.0;
               inherit: "default" 0.0 ;
               color: FN_COL_DISABLE;
               color_class: "spinner_disabled";
            }
         }
         part { name: "over";
            type: RECT;
            repeat_events: 1;
            description { state: "default" 0.0;
               color: 0 0 0 0;
            }
         }
         part { name: "disabler";
            type: RECT;
            description { state: "default" 0.0;
               color: 0 0 0 0;
               visible: 0;
            }
            description { state: "disabled" 0.0;
               inherit: "default" 0.0;
               visible: 1;
            }
         }
      }
      programs {
         program { name: "button_click";
            signal: "mouse,clicked,1";
            source: "over";
            script {
                 run_program(PROGRAM:"button_click2");
            }
         }
         program { name: "button_click2";
            action: SIGNAL_EMIT "elm,action,click" "";
         }
         program { name: "disable";
            signal: "elm,state,disabled";
            source: "elm";
            action: STATE_SET "disabled" 0.0;
            target: "disabler";
            target: "elm.text";
         }
         program { name: "enable";
            signal: "elm,state,enabled";
            source: "elm";
            action: STATE_SET "default" 0.0;
            target: "disabler";
            target: "elm.text";
         }
      }
   }
   group { name: "elm/button/base/spinner/increase/vertical";
      inherit: "elm/button/base/spinner/increase/default";
      images.image: "sym_up_light_normal.png" COMP;
      images.image: "sym_up_glow_normal.png" COMP;
      images.image: "sym_up_dark_normal.png" COMP;
      parts {
         part { name: "arrow.image";
            scale: 1;
            description { state: "default" 0.0;
               min: 15 15;
               max: 15 15;
               image.normal: "sym_up_light_normal.png";
            }
            description { state: "pressed" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_up_glow_normal.png";
            }
            description { state: "disabled" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_up_dark_normal.png";
            }
         }
      }
   }

   group { name: "elm/button/base/spinner/decrease/vertical";
      inherit: "elm/button/base/spinner/decrease/default";
      images.image: "sym_down_light_normal.png" COMP;
      images.image: "sym_down_glow_normal.png" COMP;
      images.image: "sym_down_dark_normal.png" COMP;
      parts {
         part { name: "arrow.image";
            scale: 1;
            description { state: "default" 0.0;
               min: 15 15;
               max: 15 15;
               image.normal: "sym_down_light_normal.png";
            }
            description { state: "pressed" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_down_glow_normal.png";
            }
            description { state: "disabled" 0.0;
               inherit: "default" 0.0;
               image.normal: "sym_down_dark_normal.png";
            }
         }
      }
   }
/******************* SPINNER BUTTONS STYLES END **********************/
