/* * * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.1 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://floralicense.org/license/ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Main view tab layout group { name, "main/tab"; images { image, CALENDAR_TAB COMP; image, CALENDAR_TAB_FOCUS_BG COMP; image, CALENDAR_TAB_PRESS COMP; image, CALENDAR_TODAY_ICON COMP; image, CALENDAR_TODAY_ICON_PRESS COMP; image, TAB_FOCUS COMP; image, TAB_BG COMP; image, TAB_DEFAULT COMP; image, TAB_PRESS COMP; } parts { part { name, "base"; type, RECT; description { state, "default" 0.0; color, 0 0 0 0; } } part { name, "tab/bg"; description { state, "default" 0.0; rel1 { relative, 0.0 0.0; to, base; } rel2 { relative, 1.0 1.0; offset, 0 0; to, base; } image.normal, TAB_BG; } } #define PART_TAB(_name, x1, x2) \ part { name, "tab/"_name"/bg"; \ description { \ state, "default" 0.0; \ rel1 { relative, x1 0.0; to, "tab/bg"; } \ rel2 { relative, x2 1.0; to, "tab/bg"; } \ image.normal, "P01_tab_default.png"; \ } \ description { \ state, "default" 1.0; \ inherit, "default" 0.0; \ image.normal, "P01_tab_press.png"; \ } \ description { \ state, "selected" 0.0; \ inherit, "default" 0.0; \ image.normal, TAB_FOCUS; \ } \ } \ part { name, "tab/"_name"/text"; \ type, TEXT; \ scale, 1; \ description { \ state, "default" 0.0; \ rel1.to, "tab/"_name"/bg"; \ rel2.to, "tab/"_name"/bg"; \ color, COLOR_OF_TEXT_FOR_MAIN_TAB; \ text { \ font, "SLP:style=Medium"; \ size, 30; \ align, 0.5 0.5; \ } \ } \ description { \ state, "default" 1.0; \ inherit, "default" 0.0; \ color, COLOR_OF_TEXT_DEFAULT_FOR_MAIN_TAB; \ } \ description { \ state, "selected" 0.0; \ inherit, "default" 0.0; \ color, COLOR_OF_TEXT_SELECTED_FOR_MAIN_TAB; \ } \ } \ part { name, "tab/"_name"/evt"; \ type, RECT; \ description { \ state, "default" 0.0; \ rel1 { to_x, "tab/"_name"/bg"; to_y, "tab/bg"; } \ rel2 { to_x, "tab/"_name"/bg"; to_y, "tab/bg"; } \ color, 0 0 0 0; \ } \ } PART_TAB("year", (0/4), (1/4)) PART_TAB("month", (1/4), (2/4)) PART_TAB("day", (2/4), (3/4)) PART_TAB("list", (3/4), (4/4)) } programs { program { name, "tab/reset"; signal, "reset"; source, "prog"; action, STATE_SET "default" 0.0; target, "tab/year/bg"; target, "tab/year/text"; target, "tab/month/bg"; target, "tab/month/text"; target, "tab/day/bg"; target, "tab/day/text"; target, "tab/list/bg"; target, "tab/list/text"; } #define PROG_TAB(_name) \ program { name, "tab/"_name"/down"; \ signal, "mouse,down,1"; \ source, "tab/"_name"/evt"; \ filter, "tab/"_name"/bg" "default"; \ action, STATE_SET "default" 1.0; \ target, "tab/"_name"/bg"; \ target, "tab/"_name"/text"; \ } \ program { name, "tab/"_name"/up"; \ signal, "mouse,up,1"; \ source, "tab/"_name"/evt"; \ filter, "tab/"_name"/bg" "default"; \ action, STATE_SET "default" 0.0; \ target, "tab/"_name"/bg"; \ target, "tab/"_name"/text"; \ } \ program { name, "tab/"_name"/clicked"; \ signal, "mouse,clicked,1"; \ filter, "tab/"_name"/bg" "default"; \ source, "tab/"_name"/evt"; \ action, SIGNAL_EMIT _name "tab"; \ } \ program { name, "tab/"_name"/select"; \ signal, "select,"_name; \ source, "prog"; \ action, STATE_SET "selected" 0.0; \ target, "tab/"_name"/bg"; \ target, "tab/"_name"/text"; \ } PROG_TAB("year") PROG_TAB("month") PROG_TAB("day") PROG_TAB("list") } }