3 * Copyright 2012 Samsung Electronics Co., Ltd
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
9 * http://www.tizenopensource.org/license
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.
18 /**********************************************************************
19 ******************button*************************************
20 ***********************************************************************/
22 #define _btn_edc_part_rect()\
30 state: "default" 0.0; \
32 color: 255 255 255 0; \
33 rel1 { relative: 0.0 0.0;} \
34 rel2 { relative: 1.0 1.0;} \
38 inherit: "default" 0.0; \
44 #define _btn_edc_part_image(img_def, img_down, img_dim ) \
52 state: "default" 0.0; \
53 rel1 { relative: 0.0 0.0; to: "rect";} \
54 rel2 { relative: 1.0 1.0; to: "rect";} \
55 image { normal: img_def; border: 5 5 5 5; border_scale: 1;} \
59 inherit: "default" 0.0; \
60 image { normal: img_down; border: 5 5 5 5; border_scale: 1;} \
64 inherit: "default" 0.0; \
65 image { normal: img_dim; border: 5 5 5 5; border_scale: 1;} \
70 #define _btn_edc_part_txt( str_color_class, int_color2, \
71 txt_font, txt_size, txt_align_x,txt_align_y, str_txt )\
79 state: "default" 0.0; \
80 rel1 { relative: 0.0 0.0; to: "rect";} \
81 rel2 { relative: 1.0 1.0; to: "rect";} \
82 text { font: txt_font; size: txt_size; align: txt_align_x txt_align_y; text: str_txt;} \
83 color_class: str_color_class; \
88 inherit: "default" 0.0; \
92 inherit: "default" 0.0; \
97 #define _btn_edc_prog_mouse_down( )\
99 name: "internal_mouse_down"; \
100 signal: "mouse,down,1"; \
102 action: STATE_SET "down" 0.0; \
105 transition: DECELERATE 0.1; \
108 name: "emit_mouse_down"; \
109 signal: "mouse,down,1"; \
111 action: SIGNAL_EMIT "mouse,down" "rect"; \
115 #define _btn_edc_prog_mouse_click() \
117 name: "emit_mouse_click"; \
118 signal: "mouse,clicked,1"; \
120 action: SIGNAL_EMIT "mouse,clicked" "rect"; \
124 #define _btn_edc_prog_mouse_up( )\
126 name: "emit_mouse_up"; \
127 signal: "mouse,up,1"; \
129 action: SIGNAL_EMIT "mouse,up" "rect"; \
132 name: "internal_mouse_up"; \
133 signal: "mouse,up,1"; \
135 action: STATE_SET "default" 0.0; \
138 transition: DECELERATE 0.1; \
142 #define _btn_edc_prog_rect_hide() \
144 name: "internel_rect_hide"; \
147 action: STATE_SET "hide" 0.0; \
151 name: "internel_rect_show"; \
154 action: STATE_SET "default" 0.0; \
159 #define _btn_edc_prog_image_dim() \
161 name: "internel_dim"; \
164 action: STATE_SET "dim" 0.0; \
169 name: "internel_default"; \
172 action: STATE_SET "default" 0.0; \
178 #define edc_widget_btn(str_name, \
179 img_def, img_down, img_dim, \
180 str_color_class, int_color2,\
181 txt_font, txt_size, txt_align_x,txt_align_y, str_txt)\
185 _btn_edc_part_image(img_def, img_down, img_dim) \
186 _btn_edc_part_txt(str_color_class, int_color2, \
187 txt_font, txt_size, txt_align_x,txt_align_y, str_txt)\
188 _btn_edc_part_rect()\
191 _btn_edc_prog_mouse_down() \
192 _btn_edc_prog_mouse_click() \
193 _btn_edc_prog_mouse_up() \
194 _btn_edc_prog_image_dim() \
195 _btn_edc_prog_rect_hide() \