summaryrefslogtreecommitdiff
path: root/ElmSharp/theme/tv/widgets/scroller.edc
diff options
context:
space:
mode:
Diffstat (limited to 'ElmSharp/theme/tv/widgets/scroller.edc')
-rw-r--r--ElmSharp/theme/tv/widgets/scroller.edc613
1 files changed, 613 insertions, 0 deletions
diff --git a/ElmSharp/theme/tv/widgets/scroller.edc b/ElmSharp/theme/tv/widgets/scroller.edc
new file mode 100644
index 0000000..178a43d
--- /dev/null
+++ b/ElmSharp/theme/tv/widgets/scroller.edc
@@ -0,0 +1,613 @@
+/*
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/****************************************************************************
+DOC: Tizen TV_General Guide_GUI Guideline_v1.0_140430.ppt page : 61 style: black
+****************************************************************************/
+group { name: "elm/scroller/base/default";
+ alias: "elm/list/base/default";
+ alias: "elm/genlist/base/default";
+ alias: "elm/gengrid/base/default";
+ alias: "elm/scroller/base/map_bubble";
+ alias: "elm/genscroller/base/default";
+
+ data {
+ item: "focus_highlight" "on";
+ }
+
+ script {
+ public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
+ public timer0(val) {
+ new v;
+ v = get_int(sbvis_v);
+ if (v) {
+ v = get_int(sbalways_v);
+ if (!v) {
+ emit("do-hide-vbar", "");
+ set_int(sbvis_v, 0);
+ }
+ }
+ v = get_int(sbvis_h);
+ if (v) {
+ v = get_int(sbalways_h);
+ if (!v) {
+ emit("do-hide-hbar", "");
+ set_int(sbvis_h, 0);
+ }
+ }
+ set_int(sbvis_timer, 0);
+ return 0;
+ }
+ public visible_scroll() {
+ new v;
+ v = get_int(sbvis_v);
+ v |= get_int(sbalways_v);
+ if (!v) {
+ emit("do-show-vbar", "");
+ set_int(sbvis_v, 1);
+ }
+ v = get_int(sbvis_h);
+ v |= get_int(sbalways_h);
+ if (!v) {
+ emit("do-show-hbar", "");
+ set_int(sbvis_h, 1);
+ }
+ v = get_int(sbvis_timer);
+ if (v > 0) cancel_timer(v);
+ v = timer(5.0, "timer0", 0);
+ set_int(sbvis_timer, v);
+ }
+ public mask(val) {
+ new x, y , w, h, x1, y1 , w1, h1;
+ get_geometry(PART:"pad.drag_up", x,y,w, h);
+ get_geometry(PART:"pad.vbar_up", x1,y1,w1, h1);
+
+ if( y >= y1 && y <=(y1+h1) )
+ {
+ set_state(PART:"mask.top", "default", 0.0);
+ }
+ else
+ {
+ set_state(PART:"mask.top", "show", 0.0);
+ }
+ get_geometry(PART:"pad.drag_down", x,y,w, h);
+ get_geometry(PART:"pad.vbar_down", x1,y1,w1, h1);
+
+ if( (y+h) >= y1 && (y+h) <= (y1+h1) )
+ {
+ set_state(PART:"mask.bottom", "hidden", 0.0);
+ }
+ else
+ {
+ set_state(PART:"mask.bottom", "default", 0.0);
+ }
+ if(val < 100)
+ timer(0.01,"mask",val+1);
+ }
+
+ }
+
+ images {
+ image: "scrollbar_vertical.png" COMP;
+ image: "scrollbar_horizontal.png" COMP;
+ image: "scrollbar_mask_top.png" COMP;
+ image: "scrollbar_mask_bottom.png" COMP;
+ }
+ parts {
+ part { name: "bg"; type: RECT;
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
+ }
+ }
+ part { name: "clipper"; type: RECT; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "bg";
+ rel2.to: "bg";
+ }
+ }
+ part { name: "elm.swallow.content"; type: SWALLOW;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ rel1.to: "bg";
+ rel2.to: "bg";
+ }
+ }
+ part { name: "mask.top"; mouse_events: 1;
+ repeat_events: 1;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ rel1.to: "elm.swallow.content";
+ align: 0 0;
+ min: 0 36;
+ max: -1 36;
+ fixed: 1 1;
+ image.normal: "scrollbar_mask_top.png";
+ visible: 0;
+ }
+ description { state: "show" 0.0;
+ inherit: "default";
+ visible: 0;
+ }
+ }
+ part { name: "mask.bottom"; mouse_events: 1;
+ repeat_events: 1;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ rel2.to: "elm.swallow.content";
+ align: 1 1;
+ min: 0 36;
+ max: -1 36;
+ fixed: 1 1;
+ image.normal: "scrollbar_mask_bottom.png";
+ visible: 0;
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default";
+ visible: 0;
+ }
+ }
+ part { name: "pad.vbar_up"; type: SPACER;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ min: 4 18;
+ max: 4 18;
+ fixed: 1 1;
+ align: 0.0 0.0;
+ rel1.to: "sb_vbar";
+ rel2.to: "sb_vbar";
+ }
+ }
+ part { name: "pad.drag_up"; type: SPACER;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ min: 4 4;
+ max: 4 4;
+ fixed: 1 1;
+ align: 0.0 0.0;
+ rel1.to: "elm.dragable.vbar";
+ rel2.to: "elm.dragable.vbar";
+ }
+ }
+ part { name: "pad.vbar_down"; type: SPACER;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ min: 4 18;
+ max: 4 18;
+ fixed: 1 1;
+ align: 0.0 1.0;
+ rel1.to: "sb_vbar";
+ rel2.to: "sb_vbar";
+ }
+ }
+ part { name: "pad.drag_down"; type: SPACER;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ min: 4 4;
+ max: 4 4;
+ fixed: 1 1;
+ align: 0.0 1.0;
+ rel1.to: "elm.dragable.vbar";
+ rel2.to: "elm.dragable.vbar";
+ }
+ }
+
+ part { name: "conf_over"; type: RECT; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "bg";
+ rel2.to: "bg";
+ color: 255 255 0 0;
+ }
+ description { state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ color: 200 155 0 0;
+ }
+ }
+ part { name: "focus_highlight"; type: RECT; mouse_events: 0;
+ description { state: "default" 0.0;
+ color: 200 155 0 0;
+ }
+ description { state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ color: 200 155 0 0;
+ }
+ }
+ part { name: "sb_vbar_clip_master"; type: RECT; mouse_events: 0;
+ description { state: "default" 0.0;
+ }
+ description { state: "hidden" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "sb_vbar_clip"; type: RECT; mouse_events: 0;
+ clip_to: "sb_vbar_clip_master";
+ description { state: "default" 0.0;
+ }
+ description { state: "hidden" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "sb_vbar"; type: RECT; mouse_events: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ min: 10 17;
+ align: 1.0 0.0;
+ rel1 {
+ relative: 1.0 0.0;
+ to_y: "elm.swallow.content";
+ to_x: "elm.swallow.content";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_y: "sb_hbar";
+ to_x: "elm.swallow.content";
+ }
+ }
+ }
+ part { name: "elm.dragable.vbar"; mouse_events: 0;
+ clip_to: "sb_vbar_clip";
+ dragable {
+ x: 0 0 0;
+ y: 1 1 0;
+ confine: "sb_vbar";
+ }
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ min: 8 9;
+ max: 8 -1;
+ rel1 {
+ relative: 0.5 0.5;
+ to: "sb_vbar";
+ }
+ rel2 {
+ relative: 0.5 0.5;
+ to: "sb_vbar";
+ }
+ color: 0 0 0 64;
+ image {
+ normal: "scrollbar_vertical.png";
+ border: 4 4 4 4;
+ middle: SOLID;
+ }
+ }
+ }
+ part { name: "sb_hbar_clip_master"; type: RECT; mouse_events: 0;
+ description { state: "default" 0.0;
+ }
+ description { state: "hidden" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "sb_hbar_clip"; type: RECT; mouse_events: 0;
+ clip_to: "sb_hbar_clip_master";
+ description { state: "default" 0.0;
+ }
+ description { state: "hidden" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "sb_hbar"; type: RECT; mouse_events: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ min: 17 10;
+ align: 0.0 1.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to_x: "elm.swallow.content";
+ to_y: "elm.swallow.content";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to_x: "sb_vbar";
+ to_y: "elm.swallow.content";
+ }
+ }
+ }
+ part { name: "elm.dragable.hbar"; mouse_events: 0;
+ clip_to: "sb_hbar_clip";
+ dragable {
+ x: 1 1 0;
+ y: 0 0 0;
+ confine: "sb_hbar";
+ }
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ min: 9 8 ;
+ max: -1 8 ;
+ rel1 {
+ relative: 0.5 0.5;
+ to: "sb_hbar";
+ }
+ rel2 {
+ relative: 0.5 0.5;
+ to: "sb_hbar";
+ }
+ color: 0 0 0 64;
+ image {
+ normal: "scrollbar_horizontal.png";
+ border: 4 4 4 4;
+ middle: SOLID;
+ }
+ }
+ }
+ part { name: "disabler"; type: RECT;
+ description { state: "default" 0.0;
+ rel1.to: "clipper";
+ rel2.to: "clipper";
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 128 128 128 128;
+ }
+ }
+ }
+ programs {
+ program { name: "load";
+ signal: "load";
+ source: "";
+ script {
+ mask(0);
+ set_state(PART:"sb_hbar_clip", "hidden", 0.0);
+ set_state(PART:"sb_vbar_clip", "hidden", 0.0);
+ set_int(sbvis_h, 0);
+ set_int(sbvis_v, 0);
+ set_int(sbalways_v, 0);
+ set_int(sbalways_h, 0);
+ set_int(sbvis_timer, 0);
+ }
+ }
+ program { name: "vbar_show";
+ signal: "elm,action,show,vbar";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "sb_vbar_clip_master";
+ }
+ program { name: "vbar_hide";
+ signal: "elm,action,hide,vbar";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "sb_vbar_clip_master";
+ }
+ program { name: "vbar_show_always";
+ signal: "elm,action,show_always,vbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbvis_v);
+ v |= get_int(sbalways_v);
+ if (!v) {
+ set_int(sbalways_v, 1);
+ emit("do-show-vbar", "");
+ set_int(sbvis_v, 1);
+ }
+ }
+ }
+ program { name: "vbar_show_notalways";
+ signal: "elm,action,show_notalways,vbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbalways_v);
+ if (v) {
+ set_int(sbalways_v, 0);
+ v = get_int(sbvis_v);
+ if (!v) {
+ emit("do-hide-vbar", "");
+ set_int(sbvis_v, 0);
+ }
+ }
+ }
+ }
+ program { name: "sb_vbar_show";
+ signal: "do-show-vbar";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.5;
+ target: "sb_vbar_clip";
+ }
+ program { name: "sb_vbar_hide";
+ signal: "do-hide-vbar";
+ source: "";
+ action: STATE_SET "hidden" 0.0;
+ transition: LINEAR 0.5;
+ target: "sb_vbar_clip";
+ }
+
+ program { name: "hbar_show";
+ signal: "elm,action,show,hbar";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "sb_hbar_clip_master";
+ }
+ program { name: "hbar_hide";
+ signal: "elm,action,hide,hbar";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "sb_hbar_clip_master";
+ }
+ program { name: "hbar_show_always";
+ signal: "elm,action,show_always,hbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbvis_h);
+ v |= get_int(sbalways_h);
+ if (!v) {
+ set_int(sbalways_h, 1);
+ emit("do-show-hbar", "");
+ set_int(sbvis_h, 1);
+ }
+ }
+ }
+ program { name: "hbar_show_notalways";
+ signal: "elm,action,show_notalways,hbar";
+ source: "elm";
+ script {
+ new v;
+ v = get_int(sbalways_h);
+ if (v) {
+ set_int(sbalways_h, 0);
+ v = get_int(sbvis_h);
+ if (!v) {
+ emit("do-hide-hbar", "");
+ set_int(sbvis_h, 0);
+ }
+ }
+ }
+ }
+ program { name: "sb_hbar_show";
+ signal: "do-show-hbar";
+ source: "";
+ action: STATE_SET "default" 0.0;
+ transition: LINEAR 0.5;
+ target: "sb_hbar_clip";
+ }
+ program { name: "sb_hbar_hide";
+ signal: "do-hide-hbar";
+ source: "";
+ action: STATE_SET "hidden" 0.0;
+ transition: LINEAR 0.5;
+ target: "sb_hbar_clip";
+ }
+ program { name: "scroll";
+ signal: "elm,action,scroll";
+ source: "elm";
+ script {
+ mask(100);
+ visible_scroll();
+ }
+ }
+ program { name: "mouseoverv";
+ signal: "mouse,in";
+ source: "sb_vbar";
+ script {
+ visible_scroll();
+ }
+
+ }
+ program { name: "mouseoverh";
+ signal: "mouse,in";
+ source: "sb_hbar";
+ script {
+ visible_scroll();
+ }
+ }
+ program { name: "focus";
+ signal: "elm,action,focus";
+ source: "elm";
+ script {
+ mask(100);
+ visible_scroll();
+ }
+ }
+ program { name: "highlight_show";
+ signal: "elm,action,focus_highlight,show";
+ source: "elm";
+ action: STATE_SET "enabled" 0.0;
+ transition: ACCELERATE 0.3;
+ target: "focus_highlight";
+ target: "conf_over";
+ }
+ program { name: "highlight_hide";
+ signal: "elm,action,focus_highlight,hide";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ transition: DECELERATE 0.3;
+ target: "focus_highlight";
+ target: "conf_over";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "disabler";
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "disabler";
+ }
+ program {
+ signal: "elm,scroller,arrow_up,hide";
+ source: "elm";
+ action: STATE_SET "invisible" 0.0;
+ target: "mask.top";
+ }
+ }
+}
+/********************************************************************************
+DOC: Tizen TV_General Guide_GUI Guideline_v1.0_140430.ppt page : 61 style: white
+* ******************************************************************************/
+group { name: "elm/scroller/base/white";
+ inherit: "elm/scroller/base/default";
+ alias: "elm/list/base/white";
+ alias: "elm/genlist/base/white";
+ alias: "elm/gengrid/base/white";
+ alias: "elm/scroller/base/map_bubble";
+ alias: "elm/genscroller/base/white";
+
+ parts {
+ part { name: "elm.dragable.vbar";
+ description { state: "default" 0.0;
+ color: 255 255 255 25;
+ }
+ }
+ part { name: "elm.dragable.hbar";
+ description { state: "default" 0.0;
+ color: 255 255 255 25;
+ }
+ }
+ }
+}
+
+/********************************************************************************
+DOC: Tizen TV_General Guide_GUI Guideline_v1.0_140430.ppt page : 70 style: white
+********************************************************************************/
+group { name: "elm/scroller/base/no_bar";
+ inherit: "elm/scroller/base/default";
+ alias: "elm/list/base/no_bar";
+ alias: "elm/genlist/base/no_bar";
+ alias: "elm/gengrid/base/no_bar";
+ alias: "elm/scroller/base/map_bubble";
+ alias: "elm/genscroller/base/no_bar";
+
+ parts {
+ part { name: "elm.dragable.vbar";
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "elm.dragable.hbar";
+ description { state: "default" 0.0;
+ visible: 0;
+ }
+ }
+ }
+}