Merge "[Button]Naviframe_control style macro's modified."
[profile/ivi/efl-theme-tizen.git] / themes / widgets / diskselector.edc
1 /*
2  * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved 
3  *
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of SAMSUNG
7  * ELECTRONICS ("Confidential Information"). You agree and acknowledge that this
8  * software is owned by Samsung and you shall not disclose such Confidential
9  * Information and shall use it only in accordance with the terms of the license
10  * agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
11  * representations or warranties about the suitability of the software, either
12  * express or implied, including but not limited to the implied warranties of
13  * merchantability, fitness for a particular purpose, or non-infringement.
14  * SAMSUNG shall not be liable for any damages suffered by licensee arising out
15  * of or releated to this software.
16  *
17  */
18
19 ///////////////////////////////////////////////////////////////////////////////////////
20 //
21 // diskselector
22 //
23 ///////////////////////////////////////////////////////////////////////////////////////
24 group { name: "elm/diskselector/base/default";
25    alias: "elm/diskselector/base/datetime/default";
26    alias: "elm/diskselector/base/timepicker";
27
28    parts {
29       part { name: "bg";
30          type: RECT;
31          mouse_events: 0;
32          description { state: "default" 0.0;
33             color: 0 0 0 0;
34          }
35       }
36       part { name: "elm.swallow.content";
37          type: SWALLOW;
38          description { state: "default" 0.0;
39             rel1.to: "bg";
40             rel2.to: "bg";
41          }
42       }
43    }
44 }
45
46 group { name: "elm/diskselector/item/default";
47    alias: "elm/diskselector/item/datetime/default";
48    alias: "elm/diskselector/item/timepicker";
49
50    data {
51       item: "len_threshold" "14";
52       item: "min_height"  DISKSELECTOR_DF_DATA_MIN_HEIGHT_INC;
53    }
54
55    parts {
56      part {
57         name: "elm.text";
58         type: TEXT;
59         mouse_events: 0;
60         scale: 1;
61         description {
62            state: "default" 0.0;
63            min: DISKSELECTOR_DF_ITEM_MIN_SIZE_INC;
64            fixed: 1 1;
65            align: 0 0;
66            color: DISKSELECTOR_DF_FONT_COLOR_INC;
67            visible: 1;
68            text {
69               font: "SLP:style=Medium";
70               size: DISKSELECTOR_DF_FONT_SIZE_INC;
71               min: 1 1;
72               text_class: "slp_medium";
73            }
74         }
75         description {
76            state: "selected" 0.0;
77            min: DISKSELECTOR_DF_ITEM_MIN_SIZE_INC;
78            fixed: 1 1;
79            align: 0 0;
80            color: 255 255 255 255;
81            visible: 1;
82            text {
83               font: "SLP:style=Medium";
84               size: DISKSELECTOR_DF_FONT_SIZE_INC;
85               min: 1 1;
86            }
87         }
88         description { state: "show" 0.0;
89            inherit: "default" 0.0;
90            visible: 1;
91         }
92         description { state: "default_small" 0.0;
93            inherit: "default" 0.0;
94            visible: 1;
95            text.size: 10;
96         }
97         description { state: "left_side" 0.0;
98            inherit: "default" 0.0;
99            visible: 1;
100         }
101         description { state: "right_side" 0.0;
102            inherit: "default" 0.0;
103            visible: 1;
104         }
105         description { state: "mouse_down" 0.0;
106            inherit: "default" 0.0;
107            color: DISKSELECTOR_DF_FONT_MOUSE_DOWN_COLOR_INC;
108            visible: 1;
109         }
110         description { state: "selected_mouse_down" 0.0;
111            inherit: "default" 0.0;
112            color: DISKSELECTOR_DF_FONT_MOUSE_DOWN_COLOR_INC;
113            visible: 1;
114         }
115      }
116
117      part {
118         name: "over1";
119         mouse_events: 1;
120         repeat_events: 1;
121         description {
122            state: "default" 0.0;
123         }
124      }
125    }
126
127    programs {
128       program {
129          name: "elm,state,selected";
130          signal: "elm,state,selected";
131          source: "elm";
132          action: STATE_SET "selected" 0.0;
133          target: "elm.text";
134       }
135       program {
136          name: "elm,state,default";
137          signal: "elm,state,default";
138          source: "elm";
139          action: STATE_SET "default" 0.0;
140          target: "elm.text";
141       }
142       program {
143          name: "item_click";
144          signal: "mouse,clicked,1";
145          source: "over1";
146          action: SIGNAL_EMIT "elm,action,click" "";
147       }
148       program {
149          name: "item_mouse_down";
150          signal: "mouse,down,1";
151          source: "over1";
152          script {
153             new st[30];
154             new Float:vl;
155             get_state(PART:"elm.text", st, 30, vl)
156             if (!strncmp(st, "selected", 8)) {
157                set_state(PART:"elm.text", "selected_mouse_down", 0.0);
158             } else {
159                set_state(PART:"elm.text", "mouse_down", 0.0);
160             }
161          }
162       }
163       program {
164          name: "item_mouse_up";
165          signal: "mouse,up,1";
166          source: "over1";
167          script {
168             new st[30];
169             new Float:vl;
170             get_state(PART:"elm.text", st, 30, vl)
171             if (!strncmp(st, "mouse_down", 10)) {
172                set_state(PART:"elm.text", "default", 0.0);
173             } else if (!strncmp(st, "selected_mouse_down", 19)) {
174                set_state(PART:"elm.text", "selected", 0.0);
175             }
176          }
177       }
178    }
179 }