APPLY_RSA
[apps/home/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://www.tizenopensource.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-95-50)
20 #define PANNEL_FULL_W_LAN               1280
21 #define PANNEL_FULL_H_LAN               380
22
23 #define PANNEL_X_LOFF_LAN               46
24 #define PANNEL_Y_LOFF_LAN               12
25 #define MIDDLE_MARGIN   48
26
27 #define PANNEL_KEY_W_PAD_LAN    4
28 #define PANNEL_KEY_H_PAD_LAN    2
29 #define PANNEL_KEY_W_LAN                160
30 #define PANNEL_KEY_H_LAN                72
31 #define PANNEL_KEY_FULL_W_LAN   (PANNEL_KEY_W_LAN+PANNEL_KEY_W_PAD_LAN)
32 #define PANNEL_KEY_FULL_H_LAN   (PANNEL_KEY_H_LAN+PANNEL_KEY_H_PAD_LAN)
33
34 #define PANNEL_COR_LAN_REF1_X(X,Y)   ((PANNEL_X_LOFF_LAN+PANNEL_KEY_FULL_W_LAN*(Y))/PANNEL_FULL_W_LAN)
35 #define PANNEL_COR_LAN_REF1_Y(X,Y)   ((PANNEL_Y_LOFF_LAN+PANNEL_KEY_FULL_H_LAN*(X))/PANNEL_FULL_H_LAN)
36 #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)
37 #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)
38
39 #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)
40 #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)
41
42
43
44 #define KEYPAD_KEY_IMG_LAN(key_name, relx1, rely1, relx2, rely2, bg_img, bg_img_press, text_img, text_img_press, to_part) \
45     EDC_PART_RECT_RELATIVE(key_name, to_part, relx1, rely1, relx2, rely2)\
46     EDC_PART_BUTTON_IMG(key_name"_bg", key_name, EDC_IMAGE(bg_img), EDC_IMAGE(bg_img))\
47     EDC_PART_BUTTON_IMG(key_name"_txt", key_name, EDC_IMAGE(text_img), EDC_IMAGE(text_img_press))
48
49 #define KEYPAD_KEY_TXT_LAN(key_name, relx1, rely1, relx2, rely2, bg_img, bg_img_press, text_txt, text_txt_press, to_part) \
50     EDC_PART_RECT_RELATIVE(key_name, to_part, relx1, rely1, relx2, rely2)\
51     EDC_PART_BUTTON_IMG(key_name"_bg", key_name, EDC_IMAGE(bg_img),EDC_IMAGE(bg_img))\
52     EDC_PART_TEXT(key_name"_txt", key_name, SHADOW, \
53     EDC_TEXT_SHADOW(text_txt, 56, "SLP:style=Roman", "slp_roman", EDC_COLOR(255,255,255,255), EDC_COLOR(0,0,0,255)))\
54
55
56
57 #define CALCULATOR_PROGRAMS(part_name) \
58                         program { \
59                                 name: "mouse_down_"part_name; \
60                                 signal: "mouse,down,1"; \
61                                 source:  part_name; \
62                                 action:   STATE_SET "pressed" 0.0; \
63                                 target: part_name"_bg"; \
64                                 target: part_name"_txt"; \
65                         } \
66                         program { \
67                                 name: "mouse_up_"part_name; \
68                                 signal: "mouse,up,1"; \
69                                 source:  part_name; \
70                                 action: STATE_SET "default" 0.0; \
71                                 target: part_name"_bg"; \
72                                 target: part_name"_txt"; \
73                         }
74
75 ///////////////////// landscape pannel  ////////////////////////////////////////
76         group {
77                 name: "lan_pannel";
78                 script {
79                         public pannel_state;
80                 }
81                 parts {
82                         /* rect for pannel keys */
83                         part {
84                                 name: "lan_pannel/in";//1280*464
85                                 type: RECT;
86                                 mouse_events: 1;
87                                 description {
88                                         state: "default" 0.0;
89                                         visible: 0;
90                                         rel1 { relative: 0.0 187/BG_H_LAN;}
91                                         rel2 { relative: 1.0 (BG_H_LAN-8)/BG_H_LAN;}
92                                 }
93                                 description {
94                                         state: "down" 0.0;
95                                         inherit: "default" 0.0;
96                                         rel1 { relative: 0.0 1.0; offset: 0 0;}
97                                         rel2 { relative: 1.0 1.0; offset: 0 388;}
98                                 }
99                         }
100
101                         part {
102                                 name: "lan_pannel/BG";
103                                 type: RECT;
104                                 mouse_events: 1;
105                                 description {
106                                         state: "default" 0.0;
107                                         visible: 1;
108                                         rel1 { relative: 0.0 187/BG_H_LAN;}
109                                         rel2 { relative: 1.0 1.0; }
110                                         color: 59 70 85 140;
111                                 }
112                                 description {
113                                         state: "down" 0.0;
114                                         inherit: "default" 0.0;
115                                         rel1 { relative: 0.0 1.0; offset: 0 0;}
116                                         rel2 { relative: 1.0 1.0; offset: 0 388;}
117                                 }
118                         }
119
120                         /* close&open icon */
121                         part {
122                                 name: "pannel/icon";
123                                 type: IMAGE;
124                                 mouse_events: 1;
125                                 description {
126                                         state: "default" 0.0;
127                                         rel1 { relative: 0.0 127/BG_H_LAN;}
128                                         rel2 { relative: 188/1280 (127+60)/BG_H_LAN;}
129                                         image { normal: "images/landscape/P04_calculator_down_handle_land.png"; }
130                                 }
131                                 description {
132                                         state: "open" 0.0;
133                                         inherit: "default" 0.0;
134                                         rel1 { relative: 0.0 (BG_H_LAN-60)/BG_H_LAN;}
135                                         rel2 { relative: 188/1280 (BG_H_LAN)/BG_H_LAN;}
136                                         image { normal: "images/landscape/P04_calculator_up_handle_land.png"; }
137                                 }
138                                 description {
139                                         state: "default_press" 0.0;
140                                         rel1 { relative: 0.0 127/BG_H_LAN;}
141                                         rel2 { relative: 188/1280 (127+60)/BG_H_LAN;}
142                                         image { normal: "images/landscape/P04_calculator_down_handle_land_press.png"; }
143                                 }
144                                 description {
145                                         state: "open_press" 0.0;
146                                         inherit: "default" 0.0;
147                                         rel1 { relative: 0.0 (BG_H_LAN-60)/BG_H_LAN;}
148                                         rel2 { relative: 188/1280 (BG_H_LAN)/BG_H_LAN;}
149                                         image { normal: "images/landscape/P04_calculator_up_handle_land_press.png"; }
150                                 }
151                         }
152
153
154
155                         /* create pannel keys */
156                         // %, sqrt, x!, c, /, *, <-
157                         KEYPAD_KEY_IMG_LAN("item_fac",
158                                 PANNEL_COR_LAN_REF1_X(0,0), PANNEL_COR_LAN_REF1_Y(0,0),
159                                 PANNEL_COR_LAN_REF2_X(0,0), PANNEL_COR_LAN_REF2_Y(0,0),
160                                 "images/landscape/P04_calculator_btn_03.png", "images/landscape/P04_calculator_btn_03_press.png",
161                                 "images/landscape/P04_calculator_btn_03.png", "images/landscape/P04_calculator_btn_03_press.png",
162                                 "lan_pannel/in");
163                         KEYPAD_KEY_IMG_LAN("item_sqr",
164                                 PANNEL_COR_LAN_REF1_X(0,1), PANNEL_COR_LAN_REF1_Y(0,1),
165                                 PANNEL_COR_LAN_REF2_X(0,1), PANNEL_COR_LAN_REF2_Y(0,1),
166                                 "images/landscape/P04_calculator_btn_02.png", "images/landscape/P04_calculator_btn_02_press.png",
167                                 "images/landscape/P04_calculator_btn_02.png", "images/landscape/P04_calculator_btn_02_press.png",
168                                 "lan_pannel/in");
169                         KEYPAD_KEY_IMG_LAN("item_per",
170                                 PANNEL_COR_LAN_REF1_X(0,2), PANNEL_COR_LAN_REF1_Y(0,2),
171                                 PANNEL_COR_LAN_REF2_X(0,2), PANNEL_COR_LAN_REF2_Y(0,2),
172                                 "images/landscape/P04_calculator_btn_01.png", "images/landscape/P04_calculator_btn_01_press.png",
173                                 "images/landscape/P04_calculator_btn_01.png", "images/landscape/P04_calculator_btn_01_press.png",
174                                 "lan_pannel/in");
175                         KEYPAD_KEY_IMG_LAN("item_c",
176                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,3), PANNEL_COR_LAN_REF1_Y(0,3),
177                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,3), PANNEL_COR_LAN_REF2_Y(0,3),
178                                 "images/landscape/P04_calculator_btn_16.png", "images/landscape/P04_calculator_btn_16_press.png",
179                                 "images/landscape/P04_calculator_btn_16.png", "images/landscape/P04_calculator_btn_16_press.png",
180                                 "lan_pannel/in");
181                         KEYPAD_KEY_IMG_LAN("item_div",
182                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,4), PANNEL_COR_LAN_REF1_Y(0,4),
183                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,4), PANNEL_COR_LAN_REF2_Y(0,4),
184                                 "images/landscape/P04_calculator_btn_17.png", "images/landscape/P04_calculator_btn_17_press.png",
185                                 "images/landscape/P04_calculator_btn_17.png", "images/landscape/P04_calculator_btn_17_press.png",
186                                 "lan_pannel/in");
187                         KEYPAD_KEY_IMG_LAN("item_mul",
188                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,5), PANNEL_COR_LAN_REF1_Y(0,5),
189                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,5), PANNEL_COR_LAN_REF2_Y(0,5),
190                                 "images/landscape/P04_calculator_btn_18.png", "images/landscape/P04_calculator_btn_18_press.png",
191                                 "images/landscape/P04_calculator_btn_18.png", "images/landscape/P04_calculator_btn_18_press.png",
192                                 "lan_pannel/in");
193                         KEYPAD_KEY_IMG_LAN("item_del",
194                                 PANNEL_COR_LAN_REF1_RIGHT_X(0,6), PANNEL_COR_LAN_REF1_Y(0,6),
195                                 PANNEL_COR_LAN_REF2_RIGHT_X(0,6), PANNEL_COR_LAN_REF2_Y(0,6),
196                                 "images/landscape/P04_calculator_btn_19.png", "images/landscape/P04_calculator_btn_19_press.png",
197                                 "images/landscape/P04_calculator_btn_19.png", "images/landscape/P04_calculator_btn_19_press.png",
198                                 "lan_pannel/in");
199
200
201                         // sin, cos, tan, 7, 8, 9, -
202                         KEYPAD_KEY_IMG_LAN("item_sin",
203                                 PANNEL_COR_LAN_REF1_X(1,0), PANNEL_COR_LAN_REF1_Y(1,0),
204                                 PANNEL_COR_LAN_REF2_X(1,0), PANNEL_COR_LAN_REF2_Y(1,0),
205                                 "images/landscape/P04_calculator_btn_04.png", "images/landscape/P04_calculator_btn_04_press.png",
206                                 "images/landscape/P04_calculator_btn_04.png", "images/landscape/P04_calculator_btn_04_press.png",
207                                 "lan_pannel/in");
208                         KEYPAD_KEY_IMG_LAN("item_cos",
209                                 PANNEL_COR_LAN_REF1_X(1,1), PANNEL_COR_LAN_REF1_Y(1,1),
210                                 PANNEL_COR_LAN_REF2_X(1,1), PANNEL_COR_LAN_REF2_Y(1,1),
211                                 "images/landscape/P04_calculator_btn_05.png", "images/landscape/P04_calculator_btn_05_press.png",
212                                 "images/landscape/P04_calculator_btn_05.png", "images/landscape/P04_calculator_btn_05_press.png",
213                                 "lan_pannel/in");
214                         KEYPAD_KEY_IMG_LAN("item_tan",
215                                 PANNEL_COR_LAN_REF1_X(1,2), PANNEL_COR_LAN_REF1_Y(1,2),
216                                 PANNEL_COR_LAN_REF2_X(1,2), PANNEL_COR_LAN_REF2_Y(1,2),
217                                 "images/landscape/P04_calculator_btn_06.png", "images/landscape/P04_calculator_btn_06_press.png",
218                                 "images/landscape/P04_calculator_btn_06.png", "images/landscape/P04_calculator_btn_06_press.png",
219                                 "lan_pannel/in");
220                         KEYPAD_KEY_IMG_LAN("item_num7",
221                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,3), PANNEL_COR_LAN_REF1_Y(1,3),
222                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,3), PANNEL_COR_LAN_REF2_Y(1,3),
223                                 "images/landscape/P04_calculator_btn_n07.png", "images/landscape/P04_calculator_btn_n07_press.png",
224                                 "images/landscape/P04_calculator_btn_n07.png", "images/landscape/P04_calculator_btn_n07_press.png",
225                                 "lan_pannel/in");
226                         KEYPAD_KEY_IMG_LAN("item_num8",
227                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,4), PANNEL_COR_LAN_REF1_Y(1,4),
228                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,4), PANNEL_COR_LAN_REF2_Y(1,4),
229                                 "images/landscape/P04_calculator_btn_n08.png", "images/landscape/P04_calculator_btn_n08_press.png",
230                                 "images/landscape/P04_calculator_btn_n08.png", "images/landscape/P04_calculator_btn_n08_press.png",
231                                 "lan_pannel/in");
232                         KEYPAD_KEY_IMG_LAN("item_num9",
233                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,5), PANNEL_COR_LAN_REF1_Y(1,5),
234                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,5), PANNEL_COR_LAN_REF2_Y(1,5),
235                                 "images/landscape/P04_calculator_btn_n09.png", "images/landscape/P04_calculator_btn_n09_press.png",
236                                 "images/landscape/P04_calculator_btn_n09.png", "images/landscape/P04_calculator_btn_n09_press.png",
237                                 "lan_pannel/in");
238                         KEYPAD_KEY_IMG_LAN("item_sub",
239                                 PANNEL_COR_LAN_REF1_RIGHT_X(1,6), PANNEL_COR_LAN_REF1_Y(1,6),
240                                 PANNEL_COR_LAN_REF2_RIGHT_X(1,6), PANNEL_COR_LAN_REF2_Y(1,6),
241                                 "images/landscape/P04_calculator_btn_20.png", "images/landscape/P04_calculator_btn_20_press.png",
242                                 "images/landscape/P04_calculator_btn_20.png", "images/landscape/P04_calculator_btn_20_press.png",
243                                 "lan_pannel/in");
244
245                         // ln, log, 1/x, 4, 5, 6, +
246                         KEYPAD_KEY_IMG_LAN("item_ln",
247                                 PANNEL_COR_LAN_REF1_X(2,0), PANNEL_COR_LAN_REF1_Y(2,0),
248                                 PANNEL_COR_LAN_REF2_X(2,0), PANNEL_COR_LAN_REF2_Y(2,0),
249                                 "images/landscape/P04_calculator_btn_07.png", "images/landscape/P04_calculator_btn_07_press.png",
250                                 "images/landscape/P04_calculator_btn_07.png", "images/landscape/P04_calculator_btn_07_press.png",
251                                 "lan_pannel/in");
252                         KEYPAD_KEY_IMG_LAN("item_log",
253                                 PANNEL_COR_LAN_REF1_X(2,1), PANNEL_COR_LAN_REF1_Y(2,1),
254                                 PANNEL_COR_LAN_REF2_X(2,1), PANNEL_COR_LAN_REF2_Y(2,1),
255                                 "images/landscape/P04_calculator_btn_08.png", "images/landscape/P04_calculator_btn_08_press.png",
256                                 "images/landscape/P04_calculator_btn_08.png", "images/landscape/P04_calculator_btn_08_press.png",
257                                 "lan_pannel/in");
258                         KEYPAD_KEY_IMG_LAN("item_1x",
259                                 PANNEL_COR_LAN_REF1_X(2,2), PANNEL_COR_LAN_REF1_Y(2,2),
260                                 PANNEL_COR_LAN_REF2_X(2,2), PANNEL_COR_LAN_REF2_Y(2,2),
261                                 "images/landscape/P04_calculator_btn_09.png", "images/landscape/P04_calculator_btn_09_press.png",
262                                 "images/landscape/P04_calculator_btn_09.png", "images/landscape/P04_calculator_btn_09_press.png",
263                                 "lan_pannel/in");
264                         KEYPAD_KEY_IMG_LAN("item_num4",
265                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,3), PANNEL_COR_LAN_REF1_Y(2,3),
266                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,3), PANNEL_COR_LAN_REF2_Y(2,3),
267                                 "images/landscape/P04_calculator_btn_n04.png", "images/landscape/P04_calculator_btn_n04_press.png",
268                                 "images/landscape/P04_calculator_btn_n04.png", "images/landscape/P04_calculator_btn_n04_press.png",
269                                 "lan_pannel/in");
270                         KEYPAD_KEY_IMG_LAN("item_num5",
271                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,4), PANNEL_COR_LAN_REF1_Y(2,4),
272                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,4), PANNEL_COR_LAN_REF2_Y(2,4),
273                                 "images/landscape/P04_calculator_btn_n05.png", "images/landscape/P04_calculator_btn_n05_press.png",
274                                 "images/landscape/P04_calculator_btn_n05.png", "images/landscape/P04_calculator_btn_n05_press.png",
275                                 "lan_pannel/in");
276                         KEYPAD_KEY_IMG_LAN("item_num6",
277                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,5), PANNEL_COR_LAN_REF1_Y(2,5),
278                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,5), PANNEL_COR_LAN_REF2_Y(2,5),
279                                 "images/landscape/P04_calculator_btn_n06.png", "images/landscape/P04_calculator_btn_n06_press.png",
280                                 "images/landscape/P04_calculator_btn_n06.png", "images/landscape/P04_calculator_btn_n06_press.png",
281                                 "lan_pannel/in");
282                         KEYPAD_KEY_IMG_LAN("item_plus",
283                                 PANNEL_COR_LAN_REF1_RIGHT_X(2,6), PANNEL_COR_LAN_REF1_Y(2,6),
284                                 PANNEL_COR_LAN_REF2_RIGHT_X(2,6), PANNEL_COR_LAN_REF2_Y(2,6),
285                                 "images/landscape/P04_calculator_btn_21.png", "images/landscape/P04_calculator_btn_21_press.png",
286                                 "images/landscape/P04_calculator_btn_21.png", "images/landscape/P04_calculator_btn_21_press.png",
287                                 "lan_pannel/in");
288
289
290                         // x^2, 10^2, x^y, 1, 2, 3, ()
291                         KEYPAD_KEY_IMG_LAN("item_x2",
292                                 PANNEL_COR_LAN_REF1_X(3,0), PANNEL_COR_LAN_REF1_Y(3,0),
293                                 PANNEL_COR_LAN_REF2_X(3,0), PANNEL_COR_LAN_REF2_Y(3,0),
294                                 "images/landscape/P04_calculator_btn_10.png", "images/landscape/P04_calculator_btn_10_press.png",
295                                 "images/landscape/P04_calculator_btn_10.png", "images/landscape/P04_calculator_btn_10_press.png",
296                                 "lan_pannel/in");
297                         KEYPAD_KEY_IMG_LAN("item_10x",
298                                 PANNEL_COR_LAN_REF1_X(3,1), PANNEL_COR_LAN_REF1_Y(3,1),
299                                 PANNEL_COR_LAN_REF2_X(3,1), PANNEL_COR_LAN_REF2_Y(3,1),
300                                 "images/landscape/P04_calculator_btn_11.png", "images/landscape/P04_calculator_btn_11_press.png",
301                                 "images/landscape/P04_calculator_btn_11.png", "images/landscape/P04_calculator_btn_11_press.png",
302                                 "lan_pannel/in");
303                         KEYPAD_KEY_IMG_LAN("item_xy",
304                                 PANNEL_COR_LAN_REF1_X(3,2), PANNEL_COR_LAN_REF1_Y(3,2),
305                                 PANNEL_COR_LAN_REF2_X(3,2), PANNEL_COR_LAN_REF2_Y(3,2),
306                                 "images/landscape/P04_calculator_btn_12.png", "images/landscape/P04_calculator_btn_12_press.png",
307                                 "images/landscape/P04_calculator_btn_12.png", "images/landscape/P04_calculator_btn_12_press.png",
308                                 "lan_pannel/in");
309                         KEYPAD_KEY_IMG_LAN("item_num1",
310                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,3), PANNEL_COR_LAN_REF1_Y(3,3),
311                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,3), PANNEL_COR_LAN_REF2_Y(3,3),
312                                 "images/landscape/P04_calculator_btn_n01.png", "images/landscape/P04_calculator_btn_n01_press.png",
313                                 "images/landscape/P04_calculator_btn_n01.png", "images/landscape/P04_calculator_btn_n01_press.png",
314                                 "lan_pannel/in");
315                         KEYPAD_KEY_IMG_LAN("item_num2",
316                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,4), PANNEL_COR_LAN_REF1_Y(3,4),
317                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,4), PANNEL_COR_LAN_REF2_Y(3,4),
318                                 "images/landscape/P04_calculator_btn_n02.png", "images/landscape/P04_calculator_btn_n02_press.png",
319                                 "images/landscape/P04_calculator_btn_n02.png", "images/landscape/P04_calculator_btn_n02_press.png",
320                                 "lan_pannel/in");
321                         KEYPAD_KEY_IMG_LAN("item_num3",
322                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,5), PANNEL_COR_LAN_REF1_Y(3,5),
323                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,5), PANNEL_COR_LAN_REF2_Y(3,5),
324                                 "images/landscape/P04_calculator_btn_n03.png", "images/landscape/P04_calculator_btn_n03_press.png",
325                                 "images/landscape/P04_calculator_btn_n03.png", "images/landscape/P04_calculator_btn_n03_press.png",
326                                 "lan_pannel/in");
327                         KEYPAD_KEY_IMG_LAN("item_brack",
328                                 PANNEL_COR_LAN_REF1_RIGHT_X(3,6), PANNEL_COR_LAN_REF1_Y(3,6),
329                                 PANNEL_COR_LAN_REF2_RIGHT_X(3,6), PANNEL_COR_LAN_REF2_Y(3,6),
330                                 "images/landscape/P04_calculator_btn_22.png", "images/landscape/P04_calculator_btn_22_press.png",
331                                 "images/landscape/P04_calculator_btn_22.png", "images/landscape/P04_calculator_btn_22_press.png",
332                                 "lan_pannel/in");
333
334
335                         // abs, pi, e, +/-, 0, ., =
336                         KEYPAD_KEY_IMG_LAN("item_abs",
337                                 PANNEL_COR_LAN_REF1_X(4,0), PANNEL_COR_LAN_REF1_Y(4,0),
338                                 PANNEL_COR_LAN_REF2_X(4,0), PANNEL_COR_LAN_REF2_Y(4,0),
339                                 "images/landscape/P04_calculator_btn_13.png", "images/landscape/P04_calculator_btn_13_press.png",
340                                 "images/landscape/P04_calculator_btn_13.png", "images/landscape/P04_calculator_btn_13_press.png",
341                                 "lan_pannel/in");
342                         KEYPAD_KEY_IMG_LAN("item_pi",
343                                 PANNEL_COR_LAN_REF1_X(4,1), PANNEL_COR_LAN_REF1_Y(4,1),
344                                 PANNEL_COR_LAN_REF2_X(4,1), PANNEL_COR_LAN_REF2_Y(4,1),
345                                 "images/landscape/P04_calculator_btn_14.png", "images/landscape/P04_calculator_btn_14_press.png",
346                                 "images/landscape/P04_calculator_btn_14.png", "images/landscape/P04_calculator_btn_14_press.png",
347                                 "lan_pannel/in");
348                         KEYPAD_KEY_IMG_LAN("item_e",
349                                 PANNEL_COR_LAN_REF1_X(4,2), PANNEL_COR_LAN_REF1_Y(4,2),
350                                 PANNEL_COR_LAN_REF2_X(4,2), PANNEL_COR_LAN_REF2_Y(4,2),
351                                 "images/landscape/P04_calculator_btn_15.png", "images/landscape/P04_calculator_btn_15_press.png",
352                                 "images/landscape/P04_calculator_btn_15.png", "images/landscape/P04_calculator_btn_15_press.png",
353                                 "lan_pannel/in");
354                         KEYPAD_KEY_IMG_LAN("item_num0",
355                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,3), PANNEL_COR_LAN_REF1_Y(4,3),
356                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,3), PANNEL_COR_LAN_REF2_Y(4,3),
357                                 "images/landscape/P04_calculator_btn_n00.png", "images/landscape/P04_calculator_btn_n00_press.png",
358                                 "images/landscape/P04_calculator_btn_n00.png", "images/landscape/P04_calculator_btn_n00_press.png",
359                                 "lan_pannel/in");
360                         KEYPAD_KEY_IMG_LAN("item_dot",
361                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,4), PANNEL_COR_LAN_REF1_Y(4,4),
362                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,4), PANNEL_COR_LAN_REF2_Y(4,4),
363                                 "images/landscape/P04_calculator_btn_25.png", "images/landscape/P04_calculator_btn_25_press.png",
364                                 "images/landscape/P04_calculator_btn_25.png", "images/landscape/P04_calculator_btn_25_press.png",
365                                 "lan_pannel/in");
366                         KEYPAD_KEY_IMG_LAN("item_neg",
367                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,5), PANNEL_COR_LAN_REF1_Y(4,5),
368                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,5), PANNEL_COR_LAN_REF2_Y(4,5),
369                                 "images/landscape/P04_calculator_btn_24.png", "images/landscape/P04_calculator_btn_24_press.png",
370                                 "images/landscape/P04_calculator_btn_24.png", "images/landscape/P04_calculator_btn_24_press.png",
371                                 "lan_pannel/in");
372                         KEYPAD_KEY_IMG_LAN("item_eq",
373                                 PANNEL_COR_LAN_REF1_RIGHT_X(4,6), PANNEL_COR_LAN_REF1_Y(4,6),
374                                 PANNEL_COR_LAN_REF2_RIGHT_X(4,6), PANNEL_COR_LAN_REF2_Y(4,6),
375                                 "images/landscape/P04_calculator_btn_23.png", "images/landscape/P04_calculator_btn_23_press.png",
376                                 "images/landscape/P04_calculator_btn_23.png", "images/landscape/P04_calculator_btn_23_press.png",
377                                 "lan_pannel/in");
378                 }
379
380
381                 programs {
382                         program {
383                                 name: "group_load";
384                                 signal: "load";
385                                 script {
386                                         set_int(pannel_state, 1);
387                                 }
388                         }
389
390                         program {
391                                 name:"icon_tween_down";
392                                 action: STATE_SET  "open"  0.0;
393                                 transition: ACCELERATE 0.4;
394                                 target: "pannel/icon";
395                         }
396
397                         program {
398                                 name:"icon_tween_up";
399                                 action: STATE_SET  "default"  0.0;
400                                 transition: ACCELERATE 0.3;
401                                 target: "pannel/icon";
402                         }
403
404                         /* pannel open/close program */
405                         //press up/down
406                         program {
407                                 name: "icon_click_down";
408                                 signal: "mouse,down,1";
409                                 source: "pannel/icon";
410                                 script {
411                                         if (get_int(pannel_state) == 1) {
412                                                 set_state(PART:"pannel/icon", "default_press", 0.0);
413                                         } else {
414                                                 set_state(PART:"pannel/icon", "open_press", 0.0);
415                                         }
416                                 }
417                         }
418
419                         program {
420                                 name: "icon_click_up";
421                                 signal: "mouse,up,1";
422                                 source: "pannel/icon";
423                                 script {
424                                         if (get_int(pannel_state) == 1) {
425                                                 run_program(PROGRAM:"icon_tween_down");
426                                                 emit("pannel,down", "lan");
427                                                 set_int(pannel_state, 0);
428                                         } else {
429                                                 run_program(PROGRAM:"icon_tween_up");
430                                                 emit("pannel,up", "lan");
431                                                 set_int(pannel_state, 1);
432                                         }
433                                 }
434                         }
435
436                         //flick up/down
437                         program {
438                                 name: "icon_click";
439                                 signal: "pannel,flick";
440                                 source: "";
441                                 script {
442                                         if (get_int(pannel_state) == 1) {
443                                                 emit("pannel,down", "lan");
444                                                 set_state(PART:"pannel/icon", "open", 0.0);
445                                                 set_int(pannel_state, 0);
446                                         } else {
447                                                 emit("pannel,up", "lan");
448                                                 set_state(PART:"pannel/icon", "default", 0.0);
449                                                 set_int(pannel_state, 1);
450                                         }
451                                 }
452                         }
453
454                         program {
455                                 name: "pannel/down";
456                                 signal: "pannel,down";
457                                 source: "*";
458                                 action: STATE_SET "down" 0.0;
459                                 target: "lan_pannel/in";
460                                 target: "lan_pannel/BG";
461                                 transition: ACCELERATE 0.4;
462                                 after: "check_icon_open";
463                         }
464                         program {
465                                 name: "pannel/down_i";
466                                 signal: "pannel,down_i";
467                                 source: "*";
468                                 action: STATE_SET "down" 0.0;
469                                 target: "lan_pannel/in";
470                                 target: "lan_pannel/BG";
471                                 after: "check_icon_open";
472                         }
473                         program {
474                                 name: "pannel/up";
475                                 signal: "pannel,up";
476                                 source: "*";
477                                 action: STATE_SET "default" 0.0;
478                                 target: "lan_pannel/in";
479                                 target: "lan_pannel/BG";
480                                 transition: ACCELERATE 0.3;
481                                 after: "check_icon_default";
482                         }
483
484                         program {
485                                 name: "check_icon_open";
486                                 script {
487                                         if (get_int(pannel_state) == 1) {
488                                                 set_state(PART:"pannel/icon", "open", 0.0);
489                                                 set_int(pannel_state, 0);
490                                         }
491                                 }
492                         }
493
494                         program {
495                                 name: "check_icon_default";
496                                 script {
497                                         if (get_int(pannel_state) == 0) {
498                                                 set_state(PART:"pannel/icon", "default", 0.0);
499                                                 set_int(pannel_state, 1);
500                                         }
501                                 }
502                         }
503
504                         /* programs for pennel items */
505                         CALCULATOR_PROGRAMS("item_per");
506                         CALCULATOR_PROGRAMS("item_sqr");
507                         CALCULATOR_PROGRAMS("item_fac");
508                         CALCULATOR_PROGRAMS("item_c");
509                         CALCULATOR_PROGRAMS("item_div");
510                         CALCULATOR_PROGRAMS("item_mul");
511                         CALCULATOR_PROGRAMS("item_del");
512
513                         CALCULATOR_PROGRAMS("item_sin");
514                         CALCULATOR_PROGRAMS("item_cos");
515                         CALCULATOR_PROGRAMS("item_tan");
516                         CALCULATOR_PROGRAMS("item_num7");
517                         CALCULATOR_PROGRAMS("item_num8");
518                         CALCULATOR_PROGRAMS("item_num9");
519                         CALCULATOR_PROGRAMS("item_sub");
520
521                         CALCULATOR_PROGRAMS("item_ln");
522                         CALCULATOR_PROGRAMS("item_log");
523                         CALCULATOR_PROGRAMS("item_1x");
524                         CALCULATOR_PROGRAMS("item_num4");
525                         CALCULATOR_PROGRAMS("item_num5");
526                         CALCULATOR_PROGRAMS("item_num6");
527                         CALCULATOR_PROGRAMS("item_plus");
528
529                         CALCULATOR_PROGRAMS("item_10x");
530                         CALCULATOR_PROGRAMS("item_x2");
531                         CALCULATOR_PROGRAMS("item_xy");
532                         CALCULATOR_PROGRAMS("item_num1");
533                         CALCULATOR_PROGRAMS("item_num2");
534                         CALCULATOR_PROGRAMS("item_num3");
535                         CALCULATOR_PROGRAMS("item_brack");
536
537                         CALCULATOR_PROGRAMS("item_abs");
538                         CALCULATOR_PROGRAMS("item_pi");
539                         CALCULATOR_PROGRAMS("item_e");
540                         CALCULATOR_PROGRAMS("item_dot");
541                         CALCULATOR_PROGRAMS("item_num0");
542                         CALCULATOR_PROGRAMS("item_neg");
543                         CALCULATOR_PROGRAMS("item_eq");
544                 }
545         }
546 ///////////////////// ladscape pannel  finish ////////////////////////////////////////
547