e5c9a481607d42759dda0cd1858a5b813b90e40d
[platform/core/uifw/efl-theme-tizen.git] / themes / widgets / diskselector.edc
1 /*
2  * efl-theme-tizen
3  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an AS IS BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18
19
20 ///////////////////////////////////////////////////////////////////////////////////////
21 //
22 // diskselector
23 //
24 ///////////////////////////////////////////////////////////////////////////////////////
25 group { name: "elm/diskselector/base/default";
26    alias: "elm/diskselector/base/datetime/default";
27    alias: "elm/diskselector/base/timepicker";
28
29    parts {
30       part { name: "bg";
31          type: RECT;
32          mouse_events: 0;
33          description { state: "default" 0.0;
34             color: 0 0 0 0;
35          }
36       }
37       part { name: "elm.swallow.content";
38          type: SWALLOW;
39          description { state: "default" 0.0;
40             rel1.to: "bg";
41             rel2.to: "bg";
42          }
43       }
44    }
45 }
46
47 group { name: "elm/diskselector/item/default";
48    alias: "elm/diskselector/item/datetime/default";
49    alias: "elm/diskselector/item/timepicker";
50
51    data {
52       item: "len_threshold" "14";
53       item: "min_height"  DISKSELECTOR_DF_DATA_MIN_HEIGHT_INC;
54    }
55
56    parts {
57      part {
58         name: "elm.text";
59         type: TEXT;
60         mouse_events: 0;
61         scale: 1;
62         description {
63            state: "default" 0.0;
64            min: DISKSELECTOR_DF_ITEM_MIN_SIZE_INC;
65            fixed: 1 1;
66            align: 0 0;
67            color: DISKSELECTOR_DF_FONT_COLOR_INC;
68            visible: 1;
69            text {
70               font: "Tizen:style=Medium";
71               size: DISKSELECTOR_DF_FONT_SIZE_INC;
72               min: 1 1;
73               text_class: "tizen";
74            }
75         }
76         description {
77            state: "selected" 0.0;
78            min: DISKSELECTOR_DF_ITEM_MIN_SIZE_INC;
79            fixed: 1 1;
80            align: 0 0;
81            color: 255 255 255 255;
82            visible: 1;
83            text {
84               font: "Tizen:style=Medium";
85               size: DISKSELECTOR_DF_FONT_SIZE_INC;
86               min: 1 1;
87            }
88         }
89         description { state: "show" 0.0;
90            inherit: "default" 0.0;
91            visible: 1;
92         }
93         description { state: "default_small" 0.0;
94            inherit: "default" 0.0;
95            visible: 1;
96            text.size: 10;
97         }
98         description { state: "left_side" 0.0;
99            inherit: "default" 0.0;
100            visible: 1;
101         }
102         description { state: "right_side" 0.0;
103            inherit: "default" 0.0;
104            visible: 1;
105         }
106         description { state: "mouse_down" 0.0;
107            inherit: "default" 0.0;
108            color: DISKSELECTOR_DF_FONT_MOUSE_DOWN_COLOR_INC;
109            visible: 1;
110         }
111         description { state: "selected_mouse_down" 0.0;
112            inherit: "default" 0.0;
113            color: DISKSELECTOR_DF_FONT_MOUSE_DOWN_COLOR_INC;
114            visible: 1;
115         }
116      }
117
118      part {
119         name: "over1";
120         type: RECT;
121         mouse_events: 1;
122         repeat_events: 1;
123         description {
124            state: "default" 0.0;
125            color: 0 0 0 0;
126         }
127      }
128    }
129
130    programs {
131       program {
132          name: "elm,state,selected";
133          signal: "elm,state,selected";
134          source: "elm";
135          action: STATE_SET "selected" 0.0;
136          target: "elm.text";
137       }
138       program {
139          name: "elm,state,default";
140          signal: "elm,state,default";
141          source: "elm";
142          action: STATE_SET "default" 0.0;
143          target: "elm.text";
144       }
145       program {
146          name: "item_click";
147          signal: "mouse,clicked,1";
148          source: "over1";
149          action: SIGNAL_EMIT "elm,action,click" "";
150       }
151       program {
152          name: "item_mouse_down";
153          signal: "mouse,down,1";
154          source: "over1";
155          script {
156             new st[30];
157             new Float:vl;
158             get_state(PART:"elm.text", st, 30, vl)
159             if (!strncmp(st, "selected", 8)) {
160                set_state(PART:"elm.text", "selected_mouse_down", 0.0);
161             } else {
162                set_state(PART:"elm.text", "mouse_down", 0.0);
163             }
164          }
165       }
166       program {
167          name: "item_mouse_up";
168          signal: "mouse,up,1";
169          source: "over1";
170          script {
171             new st[30];
172             new Float:vl;
173             get_state(PART:"elm.text", st, 30, vl)
174             if (!strncmp(st, "mouse_down", 10)) {
175                set_state(PART:"elm.text", "default", 0.0);
176             } else if (!strncmp(st, "selected_mouse_down", 19)) {
177                set_state(PART:"elm.text", "selected", 0.0);
178             }
179          }
180       }
181    }
182 }