0a4edc0fc26e07494e763c92a435dad0f5decb20
[apps/core/preloaded/calculator.git] / edc / Inc.calculator.pannel.lan.edc
1 /*
2 *
3 * Copyright 2012  Samsung Electronics Co., Ltd
4 *
5 * Licensed under the Flora License, Version 1.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://floralicense.org/license
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 #define BG_H_LAN                (720-60-88)
20 #define PANNEL_FULL_W_LAN               1280
21 #define PANNEL_FULL_H_LAN               402
22
23 #define PANNEL_X_LOFF_LAN               27
24 #define PANNEL_Y_LOFF_LAN               9
25 #define MIDDLE_MARGIN   22
26
27 #define PANNEL_KEY_H_PAD_LAN    3
28 #define PANNEL_KEY_W_LAN                172
29 #define PANNEL_KEY_H_LAN                81
30 #define PANNEL_KEY_FULL_W_LAN   (PANNEL_KEY_W_LAN)
31 #define PANNEL_KEY_FULL_H_LAN   (PANNEL_KEY_H_LAN-PANNEL_KEY_H_PAD_LAN)
32
33 #define PANNEL_COR_LAN_REF1_X(X,Y)   ((PANNEL_X_LOFF_LAN+PANNEL_KEY_FULL_W_LAN*(Y))/PANNEL_FULL_W_LAN)
34 #define PANNEL_COR_LAN_REF1_Y(X,Y)   ((PANNEL_Y_LOFF_LAN+PANNEL_KEY_FULL_H_LAN*(X))/PANNEL_FULL_H_LAN)
35 #define PANNEL_COR_LAN_REF2_X(X,Y)   ((PANNEL_X_LOFF_LAN+PANNEL_KEY_FULL_W_LAN*(Y)+PANNEL_KEY_W_LAN)/PANNEL_FULL_W_LAN)
36 #define PANNEL_COR_LAN_REF2_Y(X,Y)   ((PANNEL_Y_LOFF_LAN+PANNEL_KEY_FULL_H_LAN*(X)+PANNEL_KEY_H_LAN)/PANNEL_FULL_H_LAN)
37
38 #define PANNEL_COR_LAN_REF1_RIGHT_X(X,Y)   ((PANNEL_X_LOFF_LAN+MIDDLE_MARGIN+PANNEL_KEY_FULL_W_LAN*(Y))/PANNEL_FULL_W_LAN)
39 #define PANNEL_COR_LAN_REF2_RIGHT_X(X,Y)   ((PANNEL_X_LOFF_LAN+MIDDLE_MARGIN+PANNEL_KEY_FULL_W_LAN*(Y)+PANNEL_KEY_W_LAN)/PANNEL_FULL_W_LAN)
40
41
42
43 #define KEYPAD_KEY_IMG_LAN(key_name, relx1, rely1, relx2, rely2, bg_img, bg_img_press, to_part) \
44     EDC_PART_RECT_RELATIVE(key_name, to_part, relx1, rely1, relx2, rely2)\
45     EDC_PART_BUTTON_IMG(key_name"_bg", key_name, EDC_IMAGE(bg_img), EDC_IMAGE(bg_img_press))
46
47
48
49 #define CALCULATOR_PROGRAMS(part_name) \
50                         program { \
51                                 name: "mouse_down_"part_name; \
52                                 signal: "mouse,down,1"; \
53                                 source:  part_name; \
54                                 action:   STATE_SET "pressed" 0.0; \
55                                 target: part_name"_bg"; \
56                         } \
57                         program { \
58                                 name: "mouse_up_"part_name; \
59                                 signal: "mouse,up,1"; \
60                                 source:  part_name; \
61                                 action: STATE_SET "default" 0.0; \
62                                 target: part_name"_bg"; \
63                         }
64
65 ///////////////////// landscape pannel  ////////////////////////////////////////
66         group {
67                 name: "lan_pannel";
68                 script {
69                         public pannel_state;
70                 }
71                 parts {
72                         /* rect for pannel keys */
73                         part {
74                                 name: "lan_pannel/in";//1280*464
75                                 type: RECT;
76                                 mouse_events: 1;
77                                 description {
78                                         state: "default" 0.0;
79                                         visible: 0;
80                                         rel1 { relative: 0.0 (130+40)/BG_H_LAN;}
81                                         rel2 { relative: 1.0 (BG_H_LAN)/BG_H_LAN;}
82                                 }
83                                 description {
84                                         state: "down" 0.0;
85                                         inherit: "default" 0.0;
86                                         rel1 { relative: 0.0 1.0; offset: 0 0;}
87                                         rel2 { relative: 1.0 1.0; offset: 0 402;}
88                                 }
89                         }
90
91                         part {
92                                 name: "lan_pannel/BG";
93                                 type: RECT;
94                                 mouse_events: 1;
95                                 description {
96                                         state: "default" 0.0;
97                                         visible: 1;
98                                         rel1 { relative: 0.0 (130+40)/BG_H_LAN; offset: 0  -2;}
99                                         rel2 { relative: 1.0 1.0; }
100                                         color: 201 198 190 255;
101                                 }
102                                 description {
103                                         state: "down" 0.0;
104                                         inherit: "default" 0.0;
105                                         rel1 { relative: 0.0 1.0; offset: 0 0;}
106                                         rel2 { relative: 1.0 1.0; offset: 0 402;}
107                                 }
108                         }
109
110                         /* close&open icon */
111                         part {
112                                 name: "pannel/icon";
113                                 type: IMAGE;
114                                 mouse_events: 1;
115                                 description {
116                                         state: "default" 0.0;
117                                         rel1 { relative: 0.0 130/BG_H_LAN;}
118                                         rel2 { relative: 1.0 (130+40)/BG_H_LAN;}
119                                         image { normal: "images/landscape/land_down_handle_nor.png"; }
120                                 }
121                                 description {
122                                         state: "open" 0.0;
123                                         inherit: "default" 0.0;
124                                         rel1 { relative: 0.0 (BG_H_LAN-40)/BG_H_LAN;}
125                                         rel2 { relative: 1.0 (BG_H_LAN)/BG_H_LAN;}
126                                         image { normal: "images/landscape/land_up_handle_nor.png"; }
127                                 }
128                                 description {
129                                         state: "default_press" 0.0;
130                                         rel1 { relative: 0.0 130/BG_H_LAN;}
131                                         rel2 { relative: 1.0 (130+40)/BG_H_LAN;}
132                                         image { normal: "images/landscape/land_down_handle_press.png"; }
133                                 }
134                                 description {
135                                         state: "open_press" 0.0;
136                                         inherit: "default" 0.0;
137                                         rel1 { relative: 0.0 (BG_H_LAN-40)/BG_H_LAN;}
138                                         rel2 { relative: 1.0 (BG_H_LAN)/BG_H_LAN;}
139                                         image { normal: "images/landscape/land_up_handle_press.png"; }
140                                 }
141                         }
142
143
144
145                         /* create pannel keys */
146                         // %, sqrt, x!, c, /, *, <-
147                         KEYPAD_KEY_IMG_LAN("item_fac",
148                                 PANNEL_COR_LAN_REF1_X(0,0), PANNEL_COR_LAN_REF1_Y(0,0),
149                                 PANNEL_COR_LAN_REF2_X(0,0), PANNEL_COR_LAN_REF2_Y(0,0),
150                                 "images/landscape/btn_type_c_01_nor.png", "images/landscape/btn_type_c_01_press.png",
151                                 "lan_pannel/in");
152                         KEYPAD_KEY_IMG_LAN("item_sqr",
153                                 PANNEL_COR_LAN_REF1_X(0,1), PANNEL_COR_LAN_REF1_Y(0,1),
154                                 PANNEL_COR_LAN_REF2_X(0,1), PANNEL_COR_LAN_REF2_Y(0,1),
155                                 "images/landscape/btn_type_c_02_nor.png", "images/landscape/btn_type_c_02_press.png",
156                                 "lan_pannel/in");
157                         KEYPAD_KEY_IMG_LAN("item_per",
158                                 PANNEL_COR_LAN_REF1_X(0,2), PANNEL_COR_LAN_REF1_Y(0,2),
159                                 PANNEL_COR_LAN_REF2_X(0,2), PANNEL_COR_LAN_REF2_Y(0,2),
160                                 "images/landscape/btn_type_c_03_nor.png", "images/landscape/btn_type_c_03_press.png",
161                                 "lan_pannel/in");
162                         KEYPAD_KEY_IMG_LAN("item_c",
163                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,3), PANNEL_COR_LAN_REF1_Y(0,3),
164                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,3), PANNEL_COR_LAN_REF2_Y(0,3),
165                                 "images/landscape/btn_type_c_16_nor.png", "images/landscape/btn_type_c_16_press.png",
166                                 "lan_pannel/in");
167                         KEYPAD_KEY_IMG_LAN("item_div",
168                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,4), PANNEL_COR_LAN_REF1_Y(0,4),
169                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,4), PANNEL_COR_LAN_REF2_Y(0,4),
170                                 "images/landscape/btn_type_c_17_nor.png", "images/landscape/btn_type_c_17_press.png",
171                                 "lan_pannel/in");
172                         KEYPAD_KEY_IMG_LAN("item_mul",
173                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,5), PANNEL_COR_LAN_REF1_Y(0,5),
174                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,5), PANNEL_COR_LAN_REF2_Y(0,5),
175                                 "images/landscape/btn_type_c_18_nor.png", "images/landscape/btn_type_c_18_press.png",
176                                 "lan_pannel/in");
177                         KEYPAD_KEY_IMG_LAN("item_del",
178                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,6), PANNEL_COR_LAN_REF1_Y(0,6),
179                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,6), PANNEL_COR_LAN_REF2_Y(0,6),
180                                 "images/landscape/btn_type_c_19_nor.png", "images/landscape/btn_type_c_19_press.png",
181                                 "lan_pannel/in");
182
183
184                         // sin, cos, tan, 7, 8, 9, -
185                         KEYPAD_KEY_IMG_LAN("item_sin",
186                                 PANNEL_COR_LAN_REF1_X(1,0), PANNEL_COR_LAN_REF1_Y(1,0),
187                                 PANNEL_COR_LAN_REF2_X(1,0), PANNEL_COR_LAN_REF2_Y(1,0),
188                                 "images/landscape/btn_type_c_04_nor.png", "images/landscape/btn_type_c_04_press.png",
189                                 "lan_pannel/in");
190                         KEYPAD_KEY_IMG_LAN("item_cos",
191                                 PANNEL_COR_LAN_REF1_X(1,1), PANNEL_COR_LAN_REF1_Y(1,1),
192                                 PANNEL_COR_LAN_REF2_X(1,1), PANNEL_COR_LAN_REF2_Y(1,1),
193                                 "images/landscape/btn_type_c_05_nor.png", "images/landscape/btn_type_c_05_press.png",
194                                 "lan_pannel/in");
195                         KEYPAD_KEY_IMG_LAN("item_tan",
196                                 PANNEL_COR_LAN_REF1_X(1,2), PANNEL_COR_LAN_REF1_Y(1,2),
197                                 PANNEL_COR_LAN_REF2_X(1,2), PANNEL_COR_LAN_REF2_Y(1,2),
198                                 "images/landscape/btn_type_c_06_nor.png", "images/landscape/btn_type_c_06_press.png",
199                                 "lan_pannel/in");
200                         KEYPAD_KEY_IMG_LAN("item_num7",
201                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,3), PANNEL_COR_LAN_REF1_Y(1,3),
202                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,3), PANNEL_COR_LAN_REF2_Y(1,3),
203                                 "images/landscape/btn_type_c_num7_nor.png", "images/landscape/btn_type_c_num7_press.png",
204                                 "lan_pannel/in");
205                         KEYPAD_KEY_IMG_LAN("item_num8",
206                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,4), PANNEL_COR_LAN_REF1_Y(1,4),
207                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,4), PANNEL_COR_LAN_REF2_Y(1,4),
208                                 "images/landscape/btn_type_c_num8_nor.png", "images/landscape/btn_type_c_num8_press.png",
209                                 "lan_pannel/in");
210                         KEYPAD_KEY_IMG_LAN("item_num9",
211                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,5), PANNEL_COR_LAN_REF1_Y(1,5),
212                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,5), PANNEL_COR_LAN_REF2_Y(1,5),
213                                 "images/landscape/btn_type_c_num9_nor.png", "images/landscape/btn_type_c_num9_press.png",
214                                 "lan_pannel/in");
215                         KEYPAD_KEY_IMG_LAN("item_sub",
216                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,6), PANNEL_COR_LAN_REF1_Y(1,6),
217                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,6), PANNEL_COR_LAN_REF2_Y(1,6),
218                                 "images/landscape/btn_type_c_20_nor.png", "images/landscape/btn_type_c_20_press.png",
219                         "lan_pannel/in");
220
221                         // ln, log, 1/x, 4, 5, 6, +
222                         KEYPAD_KEY_IMG_LAN("item_ln",
223                                 PANNEL_COR_LAN_REF1_X(2,0), PANNEL_COR_LAN_REF1_Y(2,0),
224                                 PANNEL_COR_LAN_REF2_X(2,0), PANNEL_COR_LAN_REF2_Y(2,0),
225                                 "images/landscape/btn_type_c_07_nor.png", "images/landscape/btn_type_c_07_press.png",
226                                 "lan_pannel/in");
227                         KEYPAD_KEY_IMG_LAN("item_log",
228                                 PANNEL_COR_LAN_REF1_X(2,1), PANNEL_COR_LAN_REF1_Y(2,1),
229                                 PANNEL_COR_LAN_REF2_X(2,1), PANNEL_COR_LAN_REF2_Y(2,1),
230                                 "images/landscape/btn_type_c_08_nor.png", "images/landscape/btn_type_c_08_press.png",
231                         "lan_pannel/in");
232                         KEYPAD_KEY_IMG_LAN("item_1x",
233                                 PANNEL_COR_LAN_REF1_X(2,2), PANNEL_COR_LAN_REF1_Y(2,2),
234                                 PANNEL_COR_LAN_REF2_X(2,2), PANNEL_COR_LAN_REF2_Y(2,2),
235                                 "images/landscape/btn_type_c_09_nor.png", "images/landscape/btn_type_c_09_press.png",
236                         "lan_pannel/in");
237                         KEYPAD_KEY_IMG_LAN("item_num4",
238                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,3), PANNEL_COR_LAN_REF1_Y(2,3),
239                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,3), PANNEL_COR_LAN_REF2_Y(2,3),
240                                 "images/landscape/btn_type_c_num4_nor.png", "images/landscape/btn_type_c_num4_press.png",
241                                 "lan_pannel/in");
242                         KEYPAD_KEY_IMG_LAN("item_num5",
243                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,4), PANNEL_COR_LAN_REF1_Y(2,4),
244                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,4), PANNEL_COR_LAN_REF2_Y(2,4),
245                                 "images/landscape/btn_type_c_num5_nor.png", "images/landscape/btn_type_c_num5_press.png",
246                                 "lan_pannel/in");
247                         KEYPAD_KEY_IMG_LAN("item_num6",
248                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,5), PANNEL_COR_LAN_REF1_Y(2,5),
249                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,5), PANNEL_COR_LAN_REF2_Y(2,5),
250                                 "images/landscape/btn_type_c_num6_nor.png", "images/landscape/btn_type_c_num6_press.png",
251                                 "lan_pannel/in");
252                         KEYPAD_KEY_IMG_LAN("item_plus",
253                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,6), PANNEL_COR_LAN_REF1_Y(2,6),
254                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,6), PANNEL_COR_LAN_REF2_Y(2,6),
255                                 "images/landscape/btn_type_c_21_nor.png", "images/landscape/btn_type_c_21_press.png",
256                         "lan_pannel/in");
257
258
259                         // x^2, 10^2, x^y, 1, 2, 3, ()
260                         KEYPAD_KEY_IMG_LAN("item_x2",
261                                 PANNEL_COR_LAN_REF1_X(3,0), PANNEL_COR_LAN_REF1_Y(3,0),
262                                 PANNEL_COR_LAN_REF2_X(3,0), PANNEL_COR_LAN_REF2_Y(3,0),
263                                 "images/landscape/btn_type_c_10_nor.png", "images/landscape/btn_type_c_10_press.png",
264                                 "lan_pannel/in");
265                         KEYPAD_KEY_IMG_LAN("item_10x",
266                                 PANNEL_COR_LAN_REF1_X(3,1), PANNEL_COR_LAN_REF1_Y(3,1),
267                                 PANNEL_COR_LAN_REF2_X(3,1), PANNEL_COR_LAN_REF2_Y(3,1),
268                                 "images/landscape/btn_type_c_11_nor.png", "images/landscape/btn_type_c_11_press.png",
269                                 "lan_pannel/in");
270                         KEYPAD_KEY_IMG_LAN("item_xy",
271                                 PANNEL_COR_LAN_REF1_X(3,2), PANNEL_COR_LAN_REF1_Y(3,2),
272                                 PANNEL_COR_LAN_REF2_X(3,2), PANNEL_COR_LAN_REF2_Y(3,2),
273                                 "images/landscape/btn_type_c_12_nor.png", "images/landscape/btn_type_c_12_press.png",
274                                 "lan_pannel/in");
275                         KEYPAD_KEY_IMG_LAN("item_num1",
276                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,3), PANNEL_COR_LAN_REF1_Y(3,3),
277                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,3), PANNEL_COR_LAN_REF2_Y(3,3),
278                                 "images/landscape/btn_type_c_num1_nor.png", "images/landscape/btn_type_c_num1_press.png",
279                         "lan_pannel/in");
280                         KEYPAD_KEY_IMG_LAN("item_num2",
281                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,4), PANNEL_COR_LAN_REF1_Y(3,4),
282                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,4), PANNEL_COR_LAN_REF2_Y(3,4),
283                                 "images/landscape/btn_type_c_num2_nor.png", "images/landscape/btn_type_c_num2_press.png",
284                         "lan_pannel/in");
285                         KEYPAD_KEY_IMG_LAN("item_num3",
286                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,5), PANNEL_COR_LAN_REF1_Y(3,5),
287                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,5), PANNEL_COR_LAN_REF2_Y(3,5),
288                                 "images/landscape/btn_type_c_num3_nor.png", "images/landscape/btn_type_c_num3_press.png",
289                                 "lan_pannel/in");
290                         KEYPAD_KEY_IMG_LAN("item_brack",
291                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,6), PANNEL_COR_LAN_REF1_Y(3,6),
292                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,6), PANNEL_COR_LAN_REF2_Y(3,6),
293                                 "images/landscape/btn_type_c_22_nor.png", "images/landscape/btn_type_c_22_press.png",
294                                 "lan_pannel/in");
295
296
297                         // abs, pi, e, +/-, 0, ., =
298                         KEYPAD_KEY_IMG_LAN("item_abs",
299                                 PANNEL_COR_LAN_REF1_X(4,0), PANNEL_COR_LAN_REF1_Y(4,0),
300                                 PANNEL_COR_LAN_REF2_X(4,0), PANNEL_COR_LAN_REF2_Y(4,0),
301                                 "images/landscape/btn_type_c_13_nor.png", "images/landscape/btn_type_c_13_press.png",
302                                 "lan_pannel/in");
303                         KEYPAD_KEY_IMG_LAN("item_pi",
304                                 PANNEL_COR_LAN_REF1_X(4,1), PANNEL_COR_LAN_REF1_Y(4,1),
305                                 PANNEL_COR_LAN_REF2_X(4,1), PANNEL_COR_LAN_REF2_Y(4,1),
306                                 "images/landscape/btn_type_c_14_nor.png", "images/landscape/btn_type_c_14_press.png",
307                         "lan_pannel/in");
308                         KEYPAD_KEY_IMG_LAN("item_e",
309                                 PANNEL_COR_LAN_REF1_X(4,2), PANNEL_COR_LAN_REF1_Y(4,2),
310                                 PANNEL_COR_LAN_REF2_X(4,2), PANNEL_COR_LAN_REF2_Y(4,2),
311                                 "images/landscape/btn_type_c_15_nor.png", "images/landscape/btn_type_c_15_press.png",
312                                 "lan_pannel/in");
313                         KEYPAD_KEY_IMG_LAN("item_num0",
314                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,3), PANNEL_COR_LAN_REF1_Y(4,3),
315                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,3), PANNEL_COR_LAN_REF2_Y(4,3),
316                                 "images/landscape/btn_type_c_num0_nor.png", "images/landscape/btn_type_c_num0_press.png",
317                         "lan_pannel/in");
318                         KEYPAD_KEY_IMG_LAN("item_dot",
319                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,4), PANNEL_COR_LAN_REF1_Y(4,4),
320                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,4), PANNEL_COR_LAN_REF2_Y(4,4),
321                                 "images/landscape/btn_type_c_25_nor.png", "images/landscape/btn_type_c_25_press.png",
322                         "lan_pannel/in");
323                         KEYPAD_KEY_IMG_LAN("item_neg",
324                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,5), PANNEL_COR_LAN_REF1_Y(4,5),
325                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,5), PANNEL_COR_LAN_REF2_Y(4,5),
326                                 "images/landscape/btn_type_c_24_nor.png", "images/landscape/btn_type_c_24_press.png",
327                         "lan_pannel/in");
328                         KEYPAD_KEY_IMG_LAN("item_eq",
329                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,6), PANNEL_COR_LAN_REF1_Y(4,6),
330                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,6), PANNEL_COR_LAN_REF2_Y(4,6),
331                                 "images/landscape/btn_type_c_23_nor.png", "images/landscape/btn_type_c_23_press.png",
332                                 "lan_pannel/in");
333                 }
334
335
336                 programs {
337                         program {
338                                 name: "group_load";
339                                 signal: "load";
340                                 script {
341                                         set_int(pannel_state, 1);
342                                 }
343                         }
344
345                         program {
346                                 name:"icon_tween_down";
347                                 action: STATE_SET  "open"  0.0;
348                                 transition: ACCELERATE 0.4;
349                                 target: "pannel/icon";
350                         }
351
352                         program {
353                                 name:"icon_tween_up";
354                                 action: STATE_SET  "default"  0.0;
355                                 transition: ACCELERATE 0.3;
356                                 target: "pannel/icon";
357                         }
358
359                         /* pannel open/close program */
360                         //press up/down
361                         program {
362                                 name: "icon_click_down";
363                                 signal: "mouse,down,1";
364                                 source: "pannel/icon";
365                                 script {
366                                         if (get_int(pannel_state) == 1) {
367                                                 set_state(PART:"pannel/icon", "default_press", 0.0);
368                                         } else {
369                                                 set_state(PART:"pannel/icon", "open_press", 0.0);
370                                         }
371                                 }
372                         }
373
374                         program {
375                                 name: "icon_click_up";
376                                 signal: "mouse,up,1";
377                                 source: "pannel/icon";
378                                 script {
379                                         if (get_int(pannel_state) == 1) {
380                                                 run_program(PROGRAM:"icon_tween_down");
381                                                 emit("pannel,down", "lan");
382                                                 set_int(pannel_state, 0);
383                                         } else {
384                                                 run_program(PROGRAM:"icon_tween_up");
385                                                 emit("pannel,up", "lan");
386                                                 set_int(pannel_state, 1);
387                                         }
388                                 }
389                         }
390
391                         //flick up/down
392                         program {
393                                 name: "icon_click";
394                                 signal: "pannel,flick";
395                                 source: "";
396                                 script {
397                                         if (get_int(pannel_state) == 1) {
398                                                 emit("pannel,down", "lan");
399                                                 set_state(PART:"pannel/icon", "open", 0.0);
400                                                 set_int(pannel_state, 0);
401                                         } else {
402                                                 emit("pannel,up", "lan");
403                                                 set_state(PART:"pannel/icon", "default", 0.0);
404                                                 set_int(pannel_state, 1);
405                                         }
406                                 }
407                         }
408
409                         program {
410                                 name: "pannel/down";
411                                 signal: "pannel,down";
412                                 source: "*";
413                                 action: STATE_SET "down" 0.0;
414                                 target: "lan_pannel/in";
415                                 target: "lan_pannel/BG";
416                                 transition: ACCELERATE 0.4;
417                                 after: "check_icon_open";
418                         }
419                         program {
420                                 name: "pannel/down_i";
421                                 signal: "pannel,down_i";
422                                 source: "*";
423                                 action: STATE_SET "down" 0.0;
424                                 target: "lan_pannel/in";
425                                 target: "lan_pannel/BG";
426                                 after: "check_icon_open";
427                         }
428                         program {
429                                 name: "pannel/up";
430                                 signal: "pannel,up";
431                                 source: "*";
432                                 action: STATE_SET "default" 0.0;
433                                 target: "lan_pannel/in";
434                                 target: "lan_pannel/BG";
435                                 transition: ACCELERATE 0.3;
436                                 after: "check_icon_default";
437                         }
438
439                         program {
440                                 name: "check_icon_open";
441                                 script {
442                                         if (get_int(pannel_state) == 1) {
443                                                 set_state(PART:"pannel/icon", "open", 0.0);
444                                                 set_int(pannel_state, 0);
445                                         }
446                                 }
447                         }
448
449                         program {
450                                 name: "check_icon_default";
451                                 script {
452                                         if (get_int(pannel_state) == 0) {
453                                                 set_state(PART:"pannel/icon", "default", 0.0);
454                                                 set_int(pannel_state, 1);
455                                         }
456                                 }
457                         }
458
459                         /* programs for pennel items */
460                         CALCULATOR_PROGRAMS("item_per");
461                         CALCULATOR_PROGRAMS("item_sqr");
462                         CALCULATOR_PROGRAMS("item_fac");
463                         CALCULATOR_PROGRAMS("item_c");
464                         CALCULATOR_PROGRAMS("item_div");
465                         CALCULATOR_PROGRAMS("item_mul");
466                         CALCULATOR_PROGRAMS("item_del");
467
468                         CALCULATOR_PROGRAMS("item_sin");
469                         CALCULATOR_PROGRAMS("item_cos");
470                         CALCULATOR_PROGRAMS("item_tan");
471                         CALCULATOR_PROGRAMS("item_num7");
472                         CALCULATOR_PROGRAMS("item_num8");
473                         CALCULATOR_PROGRAMS("item_num9");
474                         CALCULATOR_PROGRAMS("item_sub");
475
476                         CALCULATOR_PROGRAMS("item_ln");
477                         CALCULATOR_PROGRAMS("item_log");
478                         CALCULATOR_PROGRAMS("item_1x");
479                         CALCULATOR_PROGRAMS("item_num4");
480                         CALCULATOR_PROGRAMS("item_num5");
481                         CALCULATOR_PROGRAMS("item_num6");
482                         CALCULATOR_PROGRAMS("item_plus");
483
484                         CALCULATOR_PROGRAMS("item_10x");
485                         CALCULATOR_PROGRAMS("item_x2");
486                         CALCULATOR_PROGRAMS("item_xy");
487                         CALCULATOR_PROGRAMS("item_num1");
488                         CALCULATOR_PROGRAMS("item_num2");
489                         CALCULATOR_PROGRAMS("item_num3");
490                         CALCULATOR_PROGRAMS("item_brack");
491
492                         CALCULATOR_PROGRAMS("item_abs");
493                         CALCULATOR_PROGRAMS("item_pi");
494                         CALCULATOR_PROGRAMS("item_e");
495                         CALCULATOR_PROGRAMS("item_dot");
496                         CALCULATOR_PROGRAMS("item_num0");
497                         CALCULATOR_PROGRAMS("item_neg");
498                         CALCULATOR_PROGRAMS("item_eq");
499                 }
500         }
501 ///////////////////// ladscape pannel  finish ////////////////////////////////////////
502