2 * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved
4 * PROPRIETARY/CONFIDENTIAL
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.
19 #define RADIO_STATE_DEFAULT 0
20 #define RADIO_STATE_VISIBLE 1
21 #define RADIO_STATE_DISABLED_VISIBLE 2
22 #define RADIO_STATE_DISABLED 3
25 style { name: "radio_label_textblock_style";
26 base: "font=SLP:style=Medium font_size="RADIO_STYLE_DEFAULT_FONT_SIZE_INC" color=#ffffff wrap=char text_class=slp_medium";
29 tag: "hilight" "+ font=SLP:style=Bold";
30 tag: "b" "+ font=SLP:style=Bold";
31 tag: "whitecolor" "+ color=#ffffff";
35 ////////////////////////////////////////////////////////////////////////////////////////
37 #define RADIO_STYLE_DEFAULT(style_name, min_width, min_height) \
38 group { name: "elm/radio/base/"style_name; \
40 image: "00_button_radio_normal1.png" COMP; \
41 image: "00_button_radio_normal2.png" COMP; \
44 part { name: "back_bg"; \
47 description { state: "default" 0.0; \
48 rel2.relative: 0.0 1.0; \
50 min: min_width min_height; \
58 description { state: "default" 0.0; \
62 min: RADIO_STYLE_DEFAULT_BG_MIN_MAX_INC; \
63 max: RADIO_STYLE_DEFAULT_BG_MIN_MAX_INC; \
67 part { name: "radio"; \
70 description { state: "default" 0.0; \
79 color: 255 255 255 255; \
80 image.normal: "00_button_radio_normal2.png"; \
82 description { state: "visible" 0.0; \
83 inherit: "default" 0.0; \
84 image.normal: "00_button_radio_normal1.png"; \
85 color: 255 255 255 255; \
87 description { state: "disabled" 0.0; \
88 inherit: "default" 0.0; \
89 color: 255 255 255 128; \
91 description { state: "disabled_visible" 0.0; \
92 inherit: "visible" 0.0; \
93 color: 255 255 255 128; \
96 part { name: "elm.swallow.content"; \
98 description { state: "default" 0.0; \
101 color: 255 255 255 255; \
113 description { state: "visible" 0.0; \
114 inherit: "default" 0.0; \
118 aspect_preference: VERTICAL; \
120 description { state: "disabled" 0.0; \
121 inherit: "default" 0.0; \
122 color: 128 128 128 128; \
124 description { state: "disabled_visible" 0.0; \
125 inherit: "default" 0.0; \
126 color: 128 128 128 128; \
132 part { name: "elm.text"; \
136 description { state: "default" 0.0; \
142 to_x: "elm.swallow.content"; \
148 color: 255 255 255 255; \
151 style: "radio_label_textblock_style"; \
154 color: RADIO_DEFAULT_TEXT_NORMAL_COLOR_INC; \
156 description { state: "visible" 0.0; \
157 inherit: "default" 0.0; \
161 description { state: "disabled" 0.0; \
162 inherit: "default" 0.0; \
164 description { state: "disabled_visible" 0.0; \
165 inherit: "default" 0.0; \
168 color: RADIO_DEFAULT_TEXT_DISABLED_COLOR_INC; \
171 part { name: "over1"; \
173 ignore_flags: ON_HOLD; \
174 description { state: "default" 0.0; \
178 part { name: "over2"; \
181 description { state: "default" 0.0; \
185 part { name: "disabler"; \
187 description { state: "default" 0.0; \
190 description { state: "disabled" 0.0; \
191 inherit: "default" 0.0; \
198 program { name: "click"; \
199 signal: "mouse,clicked,1"; \
201 action: SIGNAL_EMIT "elm,action,radio,toggle" ""; \
203 program { name: "radio_on"; \
204 signal: "elm,state,radio,on"; \
207 set_state(PART:"radio", "visible", 0.0); \
210 program { name: "radio_off"; \
211 signal: "elm,state,radio,off"; \
214 set_state(PART:"radio", "default", 0.0); \
217 program { name: "text_show"; \
218 signal: "elm,state,text,visible"; \
220 action: STATE_SET "visible" 0.0; \
221 target: "elm.text"; \
223 program { name: "text_hide"; \
224 signal: "elm,state,text,hidden"; \
226 action: STATE_SET "default" 0.0; \
227 target: "elm.text"; \
229 program { name: "icon_show"; \
230 signal: "elm,state,icon,visible"; \
232 action: STATE_SET "visible" 0.0; \
233 target: "elm.swallow.content"; \
235 program { name: "icon_hide"; \
236 signal: "elm,state,icon,hidden"; \
238 action: STATE_SET "default" 0.0; \
239 target: "elm.swallow.content"; \
241 program { name: "disable"; \
242 signal: "elm,state,disabled"; \
244 action: STATE_SET "disabled" 0.0; \
245 target: "disabler"; \
246 after: "disable_text"; \
248 program { name: "disable_text"; \
252 get_state(PART:"elm.text", st, 30, vl); \
253 if (!strcmp(st, "visible")) \
254 set_state(PART:"elm.text", "disabled_visible", 0.0); \
256 set_state(PART:"elm.text", "disabled", 0.0); \
257 get_state(PART:"elm.swallow.content", st, 30, vl); \
258 if (!strcmp(st, "visible")) \
259 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
261 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
262 get_state(PART:"radio", st, 30, vl); \
263 if (!strcmp(st, "visible")) \
264 set_state(PART:"radio", "disabled_visible", 0.0); \
266 set_state(PART:"radio", "disabled", 0.0); \
269 program { name: "enable"; \
270 signal: "elm,state,enabled"; \
272 action: STATE_SET "default" 0.0; \
273 target: "disabler"; \
274 after: "enable_text"; \
276 program { name: "enable_text"; \
280 get_state(PART:"elm.text", st, 30, vl); \
281 if (!strcmp(st, "disabled_visible")) \
282 set_state(PART:"elm.text", "visible", 0.0); \
284 set_state(PART:"elm.text", "default", 0.0); \
285 get_state(PART:"elm.swallow.content", st, 30, vl); \
286 if (!strcmp(st, "disabled_visible")) \
287 set_state(PART:"elm.swallow.content", "visible", 0.0); \
289 set_state(PART:"elm.swallow.content", "default", 0.0); \
290 get_state(PART:"radio", st, 30, vl); \
291 if (!strcmp(st, "disabled_visible")) \
292 set_state(PART:"radio", "visible", 0.0); \
294 set_state(PART:"radio", "default", 0.0); \
300 ///////////////////////////////////////////////////////////////////////////////////////
301 RADIO_STYLE_DEFAULT("default", RADIO_STYLE_DEFAULT_BG_IMAGE_MIN_WIDTH_INC, RADIO_STYLE_DEFAULT_BG_IMAGE_MIN_HEIGHT_INC)
303 ///////////////////////////////////////////////////////////////////////////////////////
304 RADIO_STYLE_DEFAULT("default/extended", RADIO_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC, RADIO_STYLE_DEFAULT_EXTENDED_BG_IMAGE_MIN_WIDTH_INC)
306 ///////////////////////////////////////////////////////////////////////////////////////
308 #undef RADIO_STATE_DEFAULT
309 #undef RADIO_STATE_VISIBLE
310 #undef RADIO_STATE_DISABLED_VISIBLE
311 #undef RADIO_STATE_DISABLED