///////////////////////////////////////////////////////////////////////////////
group { name: "elm/ctxpopup/bg/noblock";
   parts {
      part { name: "base"; type: RECT; mouse_events: 0;
         description { state: "default" 0.0;
            color: 0 0 0 0;
         }
      }
   }
}

group { name: "elm/ctxpopup/bg/default";
   parts {
      part { name: "base"; type: RECT;
         description { state: "default" 0.0;
            color: 0 0 0 0;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            color: 0 0 0 192;
         }
      }
   }
   programs {
      program {
         signal: "mouse,clicked,*"; source: "base";
         action: SIGNAL_EMIT "elm,action,click" "elm";
      }
      program {
         signal: "elm,state,show"; source: "elm";
         action: STATE_SET "visible" 0.0;
         transition: LINEAR 0.2;
         target: "base";
      }
      program {
         signal: "elm,state,hide"; source: "elm";
         action: STATE_SET "default" 0.0;
         transition: LINEAR 0.3;
         target: "base";
      }
   }
}

group { name: "elm/ctxpopup/base/default";
   images.image: "tooltip-base.png" COMP;
   parts {
      part { name: "base";
         clip_to: "clip";
         description { state: "default" 0.0;
            image.normal: "tooltip-base.png";
            image.border: 7 7 6 8;
            image.middle: SOLID;
         }
      }
      part { name: "elm.swallow.content"; type: SWALLOW;
         clip_to: "clip";
         description { state: "default" 0.0;
            rel1 { to:"base"; offset: 8 6; }
            rel2 { to:"base"; offset: -7 -8; }
         }
      }
      part { name: "event"; type: RECT;
         description { state: "default" 0.0;
            color: 0 0 0 0;
            visible: 1;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "clip"; type: RECT;
         description { state: "default" 0.0;
            color: 255 255 255 0;
            visible: 0;
            rel1.offset: -20 -20;
            rel2.offset: 19 19;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            color: 255 255 255 255;
            visible: 1;
         }
      }
      
      // 9x13
      part { name: "arrow_area_left"; type: SPACER;
         description { state: "default" 0.0;
            min: 9 13;
            fixed: 1 0;
            align: 1.0 0.5;
            rel1.to: "base";
            rel1.offset: 2 5;
            rel2.to: "base";
            rel2.offset: 2 -6;
            rel2.relative: 0.0 1.0;
         }
      }
      part { name: "elm.swallow.arrow_left"; type: SWALLOW; mouse_events: 0;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_left";
         description { state: "default" 0.0;
            min: 9 13;
            fixed: 1 1;
         }
      }

      part { name: "arrow_area_right"; type: SPACER;
         description { state: "default" 0.0;
            min: 9 13;
            fixed: 1 0;
            align: 0.0 0.5;
            rel1.to: "base";
            rel1.offset: -3 5;
            rel1.relative: 1.0 0.0;
            rel2.to: "base";
            rel2.offset: -3 -6;
         }
      }
      part { name: "elm.swallow.arrow_right"; type: SWALLOW; mouse_events: 0;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_right";
         description { state: "default" 0.0;
            min: 9 13;
            fixed: 1 1;
         }
      }
      
      // 11x9
      part { name: "arrow_area_up"; type: SPACER;
         description { state: "default" 0.0;
            min: 11 9;
            fixed: 1 1;
            align: 0.5 1;
            rel1.to: "base";
            rel1.offset: 5 3;
            rel2.to: "base";
            rel2.offset: -6 3;
            rel2.relative: 1.0 0.0;
         }
      }
      part { name: "elm.swallow.arrow_up"; type: SWALLOW; mouse_events: 0;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_up";
         description { state: "default" 0.0;
            min: 11 9;
            fixed: 1 1;
         }
      }
      
      part { name: "arrow_area_down"; type: SPACER;
         description { state: "default" 0.0;
            min: 11 9;
            fixed: 1 1;
            align: 0.5 0.0;
            rel1.to: "base";
            rel1.offset: 5 -4;
            rel1.relative: 0.0 1.0;
            rel2.to: "base";
            rel2.offset: -6 -4;
         }
      }
      part { name: "elm.swallow.arrow_down"; type: SWALLOW; mouse_events: 0;
         clip_to: "clip";
         dragable.x: 1 1 0;
         dragable.y: 1 1 0;
         dragable.confine: "arrow_area_down";
         description { state: "default" 0.0;
            min: 11 9;
            fixed: 1 1;
         }
      }
   }
   programs {
      program {
         signal: "elm,state,show"; source: "elm";
         action: STATE_SET "visible" 0.0;
         transition: LINEAR 0.2;
         target: "clip";
         target: "event";
      }
      program {
         signal: "elm,state,hide"; source: "elm";
         action: STATE_SET "default" 0.0;
         transition: LINEAR 0.3;
         target: "clip";
         target: "event";
         after: "hide2";
      }
      program { name: "hide2";
         action: SIGNAL_EMIT "elm,action,hide,finished" "elm";
      }

   }
}

group { name: "elm/ctxpopup/arrow/default";
   images.image: "tooltip-edge-left-tip.png" COMP;
   images.image: "tooltip-edge-right-tip.png" COMP;
   images.image: "tooltip-edge-bottom-tip.png" COMP;
   images.image: "tooltip-edge-top-tip.png" COMP;
   parts {
      part { name: "base";
         description { state: "default" 0.0;
            min: 9 9;
            fixed: 1 1;
            image.normal: "tooltip-edge-left-tip.png";
         }
         description { state: "left" 0.0;
            inherit: "default" 0.0;
            min: 9 13;
            align: 0.0 0.5;
            image.normal: "tooltip-edge-left-tip.png";
         }
         description { state: "right" 0.0;
            inherit: "default" 0.0;
            min: 9 13;
            align: 1.0 0.5;
            image.normal: "tooltip-edge-right-tip.png";
         }
         description { state: "top" 0.0;
            inherit: "default" 0.0;
            min: 11 9;
            align: 0.5 0.0;
            image.normal: "tooltip-edge-top-tip.png";
         }
         description { state: "bottom" 0.0;
            inherit: "default" 0.0;
            min: 11 9;
            align: 0.5 1.0;
            image.normal: "tooltip-edge-bottom-tip.png";
         }
      }
   }
   programs {
      program {
         signal: "elm,state,left"; source: "elm";
         action: STATE_SET "left" 0.0;
         target: "base";
      }
      program {
         signal: "elm,state,right"; source: "elm";
         action: STATE_SET "right" 0.0;
         target: "base";
      }
      program {
         signal: "elm,state,top"; source: "elm";
         action: STATE_SET "top" 0.0;
         target: "base";
      }
      program {
         signal: "elm,state,bottom"; source: "elm";
         action: STATE_SET "bottom" 0.0;
         target: "base";
      }
   }
}
