2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "browser-macro.edc"
20 /* define of buttons & icons */
24 name: "elm/icon/browser_control_bar_multi_window/default";
26 images.image: "icon/I01_title_icon_multiview.png" COMP;
27 images.image: "icon/I01_title_icon_multiview_press.png" COMP;
38 aspect_preference: BOTH;
39 image.normal: "icon/I01_title_icon_multiview.png";
47 aspect_preference: BOTH;
48 image.normal: "icon/I01_title_icon_multiview_press.png";
51 part { name: "elm.text";
55 description { state: "default" 0.0;
57 rel1 { relative: 0.0 0.0; to: "base"; }
58 rel2 { relative: 1.0 1.0; to: "base"; }
62 font: "SLP:style=Medium";
69 description { state: "1" 0.0;
70 inherit: "default" 0.0;
73 font: "SLP:style=Medium";
81 description { state: "2" 0.0;
82 inherit: "default" 0.0;
85 font: "SLP:style=Medium";
93 description { state: "3" 0.0;
94 inherit: "default" 0.0;
97 font: "SLP:style=Medium";
105 description { state: "4" 0.0;
106 inherit: "default" 0.0;
109 font: "SLP:style=Medium";
117 description { state: "5" 0.0;
118 inherit: "default" 0.0;
121 font: "SLP:style=Medium";
129 description { state: "6" 0.0;
130 inherit: "default" 0.0;
133 font: "SLP:style=Medium";
141 description { state: "7" 0.0;
142 inherit: "default" 0.0;
145 font: "SLP:style=Medium";
153 description { state: "8" 0.0;
154 inherit: "default" 0.0;
157 font: "SLP:style=Medium";
165 description { state: "9" 0.0;
166 inherit: "default" 0.0;
169 font: "SLP:style=Medium";
179 program { name: "hide,multi_window_text";
180 signal: "hide,multi_window_text,signal";
181 action: STATE_SET "default" 0.0;
184 program { name: "show,multi_window_1";
185 signal: "show,multi_window_1,signal";
186 action: STATE_SET "1" 0.0;
189 program { name: "show,multi_window_2";
190 signal: "show,multi_window_2,signal";
191 action: STATE_SET "2" 0.0;
194 program { name: "show,multi_window_3";
195 signal: "show,multi_window_3,signal";
196 action: STATE_SET "3" 0.0;
199 program { name: "show,multi_window_4";
200 signal: "show,multi_window_4,signal";
201 action: STATE_SET "4" 0.0;
204 program { name: "show,multi_window_5";
205 signal: "show,multi_window_5,signal";
206 action: STATE_SET "5" 0.0;
209 program { name: "show,multi_window_6";
210 signal: "show,multi_window_6,signal";
211 action: STATE_SET "6" 0.0;
214 program { name: "show,multi_window_7";
215 signal: "show,multi_window_7,signal";
216 action: STATE_SET "7" 0.0;
219 program { name: "show,multi_window_8";
220 signal: "show,multi_window_8,signal";
221 action: STATE_SET "8" 0.0;
224 program { name: "show,multi_window_9";
225 signal: "show,multi_window_9,signal";
226 action: STATE_SET "9" 0.0;
229 program { name: "multi_window,pressed";
230 signal: "mouse,down,1";
232 action: STATE_SET "pressed" 0.0;
235 program { name: "multi_window,default";
236 signal: "mouse,up,1";
238 action: STATE_SET "default" 0.0;
245 BUTTON_WITH_BG(title_back, "icon/I01_title_btn.png",
246 "icon/I01_title_btn_press.png", "icon/I01_btn_back.png", "icon/I01_btn_back.png", 6, 6, 6, 6, 124, 74, 56, 56);
248 BUTTON_WITH_BG(bookmark_controlbar_back, "icon/I01_Back_btn_normal.png",
249 "icon/I01_Back_btn_press.png", "icon/I01_btn_back.png", "icon/I01_btn_back.png", 7, 7, 7, 7, 112, 82, 56, 56);
251 BUTTON_WITH_BG(browser_view_controlbar_back, "icon/I01_title_btn.png",
252 "icon/I01_title_btn_press.png", "icon/I01_btn_back.png", "icon/I01_btn_back.png", 6, 6, 6, 6, 112, 82, 56, 56);
254 BUTTON_WITH_BG(most_visited_sites_setting, "icon/I01_picker_btn_normal.png",
255 "icon/I01_picker_btn_press.png", "icon/I01_icon_setting.png", "icon/I01_icon_setting.png", 6, 6, 6, 6, 144, 60, 42, 42);
257 BUTTON(most_visited_sites_done, "icon/I01_picker_btn_normal.png",
258 "icon/I01_picker_btn_press.png", 6, 6, 6, 6);
260 BUTTON_WITH_BG(find_word_prev, "icon/I01_btn_normal.png",
261 "icon/I01_btn_press.png", "icon/I01_picker_arrow_left.png", "icon/I01_picker_arrow_left.png", 0, 0, 0, 0, 64, 64, 64, 64);
263 BUTTON_WITH_BG(find_word_next, "icon/I01_btn_normal.png",
264 "icon/I01_btn_press.png", "icon/I01_picker_arrow_right.png", "icon/I01_picker_arrow_right.png", 0, 0, 0, 0, 64, 64, 64, 64);
266 FIND_BUTTON_WITH_BG(find_word_prev_but, "icon/I01_btn_normal.png",
267 "icon/I01_btn_press.png", "icon/I01_picker_arrow_left.png", "icon/I01_btn_dim.png", 0, 0, 0, 0, 64, 64, 64, 64);
269 FIND_BUTTON_WITH_BG(find_word_next_but, "icon/I01_btn_normal.png",
270 "icon/I01_btn_press.png", "icon/I01_picker_arrow_right.png", "icon/I01_btn_dim.png", 0, 0, 0, 0, 64, 64, 64, 64);
272 BUTTON_WITH_BG(reader_icon, "icon/I01_title_btn.png",
273 "icon/I01_title_btn_press.png", "icon/I01_fit_screen.png", "icon/I01_fit_screen.png", 7, 7, 7, 7, 74, 64, 74, 64);
275 TITLE_BUTTON(title_button, "icon/I01_title_btn_blue.png",
276 "icon/I01_title_btn_blue_press.png", 6, 6, 6, 6);
278 TITLE_BUTTON(cancel_button, "icon/I01_title_btn.png",
279 "icon/I01_title_btn_press.png", 7, 7, 7, 7);
281 BUTTON_WITH_TEXT(multi_window_cancel_button, "icon/I01_title_btn.png",
282 "icon/I01_title_btn_press.png", 6, 6, 6, 6, 112, 82);
284 BUTTON_WITH_BG(backward, "icon/I01_title_btn.png",
285 "icon/I01_title_btn_press.png", "icon/I01_title_btn_icon_previous.png", "icon/I01_title_btn_icon_previous_disable.png", 7, 7, 7, 7, 78, 66, 42, 42);
286 BUTTON_WITH_BG(forward, "icon/I01_title_btn.png",
287 "icon/I01_title_btn_press.png", "icon/I01_title_btn_icon_next.png", "icon/I01_title_btn_icon_next_disable.png", 7, 7, 7, 7, 78, 66, 42, 42);
289 BUTTON(ok_button, "browser-view-images/most-visited-sites/I01_button_popup_normal.png",
290 "browser-view-images/most-visited-sites/I01_button_popup_press.png", 4, 4, 4, 4);
292 /* ifdef ZOOM_BUTTON */
293 ZOOM_BUTTON(zoom_out, "browser-view-images/00_zoom_out.png",
294 "browser-view-images/00_zoom_out_press.png", "browser-view-images/00_zoom_out_disable.png", 0, 0, 0, 0);
295 ZOOM_BUTTON(zoom_in, "browser-view-images/00_zoom_in.png",
296 "browser-view-images/00_zoom_in_press.png", "browser-view-images/00_zoom_in_disable.png", 0, 0, 0, 0);
297 /* endif ZOOM_BUTTON */
299 #define BUTTON_STATE_ENABLED 0
300 #define BUTTON_STATE_DISABLED 1
301 group { name: "elm/button/base/browser/navigationbar_control/button";
303 public button_state = BUTTON_STATE_ENABLED;
305 images.image: "icon/I01_Option_header_bt.png" COMP;
306 images.image: "icon/I01_Option_header_bt_dim.png" COMP;
307 images.image: "icon/I01_Option_header_bt_press.png" COMP;
309 part { name: "button_image";
313 description { state: "default" 0.0;
318 image.normal: "icon/I01_Option_header_bt.png";
319 image.border: 4 4 4 4;
320 color: 255 255 255 255;
322 description { state: "disabled" 0.0;
323 inherit: "default" 0.0;
324 image.normal: "icon/I01_Option_header_bt_dim.png";
326 description { state: "clicked" 0.0;
327 inherit: "default" 0.0;
328 image.normal: "icon/I01_Option_header_bt_press.png";
332 name: "padding_left_top";
336 description { state: "default" 0.0;
338 rel1.relative: 0.0 0.0;
339 rel2.relative: 0.0 0.0;
346 name: "padding_right_bottom";
350 description { state: "default" 0.0;
352 rel1.relative: 1.0 1.0;
353 rel2.relative: 1.0 1.0;
364 description { state: "default" 0.0;
368 rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
369 rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
373 description { state: "visible" 0.0;
377 rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
378 rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
382 description { state: "icononly" 0.0;
383 inherit: "default" 0.0;
387 name: "padding_after_icon";
391 description { state: "default" 0.0; //when only icon or no icon is there
393 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
394 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
399 description { state: "visible" 0.0;
402 rel1 { relative: 1.0 0.0; to: "icon_rect"; }
403 rel2 { relative: 1.0 1.0; to: "icon_rect"; }
408 description { state: "icononly" 0.0;
409 inherit: "default" 0.0;
413 name: "padding_before_text";
417 description { state: "default" 0.0; //when only icon or no icon is there
419 rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
420 rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
426 part { name: "elm.swallow.content";
430 description { state: "default" 0.0;
433 rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
434 rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
437 description { state: "visible" 0.0;
443 rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
444 rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
446 aspect_preference: VERTICAL;
448 description { state: "icononly" 0.0;
452 rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
453 rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
456 aspect_preference: VERTICAL;
459 part { name: "elm.text";
464 description { state: "default" 0.0;
466 rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
467 rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
469 color: 255 255 255 255;
471 font: "SLP:style=Medium";
478 description { state: "visible" 0.0;
479 inherit: "default" 0.0;
482 description { state: "clicked" 0.0;
483 inherit: "default" 0.0;
488 description { state: "focused" 0.0;
489 inherit: "default" 0.0;
492 color: 255 255 255 255;
496 part { name: "over2";
500 ignore_flags: ON_HOLD;
501 description { state: "default" 0.0;
504 description { state: "disabled" 0.0;
505 inherit: "default" 0.0;
509 part { name: "over3";
513 description { state: "default" 0.0;
516 description { state: "clicked" 0.0;
517 inherit: "default" 0.0;
521 part { name: "disabler";
523 description { state: "default" 0.0;
524 color: 255 255 255 255;
526 description { state: "disabled" 0.0;
527 color: 255 255 255 127;
532 program { name: "button_click";
533 signal: "mouse,down,1";
535 action: SIGNAL_EMIT "elm,action,press" "";
536 after: "button_click_anim";
538 program { name: "button_click_anim";
539 action: STATE_SET "clicked" 0.0;
540 target: "button_image";
541 after: "text_clicked";
543 program { name: "text_clicked";
547 get_state(PART:"elm.text", st, 30, vl);
548 if (!strcmp(st, "visible"))
549 set_state(PART:"elm.text", "clicked", 0.0);
552 program { name: "button_unpress";
553 action: SIGNAL_EMIT "elm,action,unpress" "";
555 program { name: "button_mouseout_clicked";
556 signal: "mouse,up,1";
561 get_state(PART:"elm.swallow.content", st, 30, vl);
562 if (strcmp(st, "icononly"))
564 emit("elm,action,default,text,set", "");
565 set_state(PART:"elm.text", "visible", 0.0);
567 if(get_int(button_state) != BUTTON_STATE_DISABLED)
568 set_state(PART:"button_image", "default", 0.0);
570 after: button_unpress;
572 program { name: "button_click2";
573 signal: "mouse,down,1";
575 action: STATE_SET "clicked" 0.0;
578 program { name: "button_unclick2";
579 signal: "mouse,clicked,1";
581 action: STATE_SET "default" 0.0;
584 program { name: "button_unclick3";
585 signal: "mouse,clicked,1";
587 action: SIGNAL_EMIT "elm,action,click" "";
589 program { name: "text_show";
590 signal: "elm,state,text,visible";
595 get_state(PART:"elm.swallow.content", st, 30, vl);
596 if (!strcmp(st, "icononly"))
598 set_state(PART:"elm.swallow.content", "visible", 0.0);
599 set_state(PART:"icon_rect", "visible", 0.0);
600 set_state(PART:"padding_after_icon", "visible", 0.0);
602 set_state(PART:"elm.text", "visible", 0.0);
605 program { name: "text_hide";
606 signal: "elm,state,text,hidden";
611 get_state(PART:"elm.swallow.content", st, 30, vl);
612 if (!strcmp(st, "visible"))
614 set_state(PART:"elm.swallow.content", "icononly", 0.0);
615 set_state(PART:"icon_rect", "icononly", 0.0);
616 set_state(PART:"padding_after_icon", "icononly", 0.0);
618 set_state(PART:"elm.text", "default", 0.0);
621 program { name: "icon_show";
622 signal: "elm,state,icon,visible";
627 get_state(PART:"elm.text", st, 30, vl);
628 if (!strcmp(st, "visible"))
630 set_state(PART:"elm.swallow.content", "visible", 0.0);
631 set_state(PART:"icon_rect", "visible", 0.0);
632 set_state(PART:"padding_after_icon", "visible", 0.0);
636 set_state(PART:"elm.swallow.content", "icononly", 0.0);
637 set_state(PART:"icon_rect", "icononly", 0.0);
638 set_state(PART:"padding_after_icon", "icononly", 0.0);
642 program { name: "icon_hide";
643 signal: "elm,state,icon,hidden";
645 action: STATE_SET "default" 0.0;
646 target: "elm.swallow.content";
648 program { name: "disable";
649 signal: "elm,state,disabled";
651 action: STATE_SET "disabled" 0.0;
652 target: "button_image";
655 after: "disable_text";
657 program { name: "disable_text";
659 set_int(button_state, BUTTON_STATE_DISABLED);
660 set_state(PART:"elm.text", "visible", 0.0);
663 program { name: "enable";
664 signal: "elm,state,enabled";
666 action: STATE_SET "default" 0.0;
667 target: "button_image";
670 after: "enable_text";
672 program { name: "enable_text";
674 set_int(button_state, BUTTON_STATE_ENABLED);
675 set_state(PART:"elm.text", "visible", 0.0);
678 program { name: "focused";
679 action: STATE_SET "focused" 0.0;
680 target: "button_image";
683 program { name: "unfocused";
684 action: STATE_SET "default" 0.0;
685 target: "button_image";
686 after: "unfocus_text";
688 program { name: "unfocus_text";
689 action: STATE_SET "visible" 0.0;
695 #define BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC 100 60
696 #define BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC 33 30
697 #define NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC 84 93 110 255
698 #define NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC 35 45 61 255
700 group { name: "elm/button/base/naviframe/back_btn/browser/default";
701 alias: "elm/button/base/naviframe_end_btn/browser/default";
702 //TODO: Remove this alias later
703 alias: "elm/button/base/navigationbar_prev_btn/browser/default";
704 alias: "elm/button/base/navigationbar_backbutton/browser/default";
705 alias: "elm/button/base/navigationbar_end_btn/browser/default";
707 image: "browser-view-images/I01_btn_prev.png" COMP;
708 image: "browser-view-images/I01_btn_prev_press.png" COMP;
711 part { name: "button_image";
715 description { state: "default" 0.0;
716 min: BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC;
720 state: "clicked" 0.0;
721 inherit: "default" 0.0;
724 state: "disabled" 0.0;
725 inherit: "default" 0.0;
728 part {name: "padding_right";
731 description { state: "default" 0.0;
734 rel1 { relative: 1 0.2; }
735 rel2 { relative: 1 0.8; }
737 color: NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC;
740 part {name: "padding_before_right";
743 description { state: "default" 0.0;
746 rel1 { relative: 0 0; to: "padding_right"; }
747 rel2 { relative: 0 1; to: "padding_right"; }
749 color: NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC;
752 part { name: "button_center_part";
755 description { state: "default" 0.0;
756 min: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
757 max: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
759 rel2 { relative: 0 1; to_x: "padding_before_right"; }
761 normal: "browser-view-images/I01_btn_prev.png";
765 state: "clicked" 0.0;
766 inherit: "default" 0.0;
767 image.normal: "browser-view-images/I01_btn_prev_press.png";
770 part { name: "over1";
774 ignore_flags: ON_HOLD;
775 description { state: "default" 0.0;
779 part { name: "over2";
782 description { state: "default" 0.0;
786 part { name: "disabler";
788 description { state: "default" 0.0;
792 description { state: "disabled" 0.0;
793 inherit: "default" 0.0;
799 program { name: "button_click";
800 signal: "mouse,down,1";
802 action: SIGNAL_EMIT "elm,action,press" "";
803 after: "button_click_anim";
805 program { name: "button_click_anim";
806 action: STATE_SET "clicked" 0.0;
807 target: "button_image";
808 target: "button_center_part";
810 program { name: "button_unclick";
811 signal: "mouse,up,1";
813 action: SIGNAL_EMIT "elm,action,unpress" "";
814 after: "button_unclick_anim";
816 program { name: "button_unclick_anim";
817 action: STATE_SET "default" 0.0;
818 target: "button_image";
819 target: "button_center_part";
821 program { name: "button_unclick2";
822 signal: "mouse,clicked,1";
824 action: SIGNAL_EMIT "elm,action,click" "";
826 program { name: "disable";
827 signal: "elm,state,disabled";
829 action: STATE_SET "disabled" 0.0;
831 target: "button_image";
833 program { name: "enable";
834 signal: "elm,state,enabled";
836 action: STATE_SET "default" 0.0;
838 target: "button_image";