/* * * 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. */ /* There are 9 configurations for each part definition. That is, if you search for a part, 9 results will come up. The order of the definitions are as follows: WDB WDB_S WDB_S (Public) LS_WDB_S LS_WDB_S (Public) WDB_S_S WDB_S_S (Public) LS_WDB_S_S LS_WDB_S_S (Public) "LS_" denotes landscape */ // 462 x 580 // day block in week view #define WEEK_DAY_X_LEFT_COORD_RATIO(_pos) (_pos % 2 / 2) #define WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) (_pos % 2 / 2 + 1 / 2) #define LS_WEEK_DAY_X_LEFT_COORD_RATIO(_pos) (_pos % 3 / 3) #define LS_WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) (_pos % 3 / 3 + 1 / 3) #define WEEK_DAY_WDB_Y_TOP_COORD_RATIO(_pos) (_pos / 2 / 4 - _pos % 2 / 2 / 4) #define WEEK_DAY_WDB_Y_BOTTOM_COORD_RATIO(_pos) (_pos / 2 / 4 - _pos % 2 / 2 / 4 + 1 / 4) #define WEEK_DAY_WDB_Y_EXPAND_DOWN_BOTTOM_COORD_RATIO(_pos) (_pos / 2 / 4 - _pos % 2 / 2 / 4 + 1 / 4 + 1 / 4) #define WEEK_DAY_WDB_Y_EXPAND_UP_TOP_COORD_RATIO(_pos) (_pos / 2 / 4 - _pos % 2 / 2 / 4 - 1 / 4) #define WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos) (_pos / 2 / 3 - _pos % 2 / 2 / 3) #define WEEK_DAY_WDB_S_Y_BOTTOM_COORD_RATIO(_pos) (_pos / 2 / 3 - _pos % 2 / 2 / 3 + 1 / 3) #define LS_WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos) (_pos / 3 / 2 - _pos % 3 / 3 / 2) #define LS_WEEK_DAY_WDB_S_Y_BOTTOM_COORD_RATIO(_pos) (_pos / 3 / 2 - _pos % 3 / 3 / 2 + 1 / 2) #define WEEK_DAY_WDB_S_Y_EXPAND_DOWN_BOTTOM_COORD_RATIO(_pos) (_pos / 2 / 3 - _pos % 2 / 2 / 3 + 1 / 3 + 1 / 3) #define WEEK_DAY_WDB_S_Y_EXPAND_UP_TOP_COORD_RATIO(_pos) (_pos / 2 / 3 - _pos % 2 / 2 / 3 - 1 / 3) #define LS_WEEK_DAY_WDB_S_Y_EXPAND_DOWN_BOTTOM_COORD_RATIO(_pos) (_pos / 3 / 2 - _pos % 3 / 3 / 2 + 1 / 2 + 1 / 2) #define LS_WEEK_DAY_WDB_S_Y_EXPAND_UP_TOP_COORD_RATIO(_pos) (_pos / 3 / 2 - _pos % 3 / 3 / 2 - 1 / 2) #define WEEK_DAY_WDB_S_S_Y_TOP_COORD_RATIO(_pos) (_pos*2 / 2 / 6 - 1/ 6) #define WEEK_DAY_WDB_S_S_Y_BOTTOM_COORD_RATIO(_pos) (_pos*2 / 2 / 6) #define WEEK_DAY_WDB_S_S_Y_EXPAND_HIDE_UP_TOP_COORD_RATIO(_pos) (_pos*2 / 2 / 6 - 1/ 6 - 1 / 3) #define WEEK_DAY_WDB_S_S_Y_EXPAND_UP_1_TOP_COORD_RATIO(_pos) (_pos*2 / 2 / 6 + 1 / 6) #define WEEK_DAY_WDB_S_S_Y_EXPAND_UP_2_TOP_COORD_RATIO(_pos) (_pos*2 / 2 / 6 - 1/ 6 - 1 / 2) #define LS_WEEK_DAY_WDB_S_S_Y_TOP_COORD_RATIO(_pos) (_pos / 4 - 3 /4) #define LS_WEEK_DAY_WDB_S_S_Y_BOTTOM_COORD_RATIO(_pos) (_pos / 4 - 1 / 2) #define LS_WEEK_DAY_WDB_S_S_Y_EXPAND_HIDE_UP_TOP_COORD_RATIO(_pos) (_pos /4 - 3 / 4 - 1 / 2) #define LS_WEEK_DAY_WDB_S_S_Y_EXPAND_UP_1_TOP_COORD_RATIO(_pos) (_pos*2 / 2 / 6 + 1 / 6) #define LS_WEEK_DAY_WDB_S_S_Y_EXPAND_UP_2_TOP_COORD_RATIO(_pos) (_pos*2 / 2 / 6 - 1/ 6 - 1 / 2) #define WEEK_DAY_TITLE_HEIGHT 57 #define LS_WEEK_DAY_TITLE_HEIGHT 57 #define WEEK_ITEM_WIDTH 359 #define LS_WEEK_ITEM_WIDTH 359 #define WEEK_ITEM_HEIGHT 57 #define WEEK_ITEM_RIGHT_OFFSET 8 #define WEEK_ITEM_EXPAND_BUTTON_WIDTH 24 #define WEEK_ITEM_TITLE_DAY_HEIGHT 40 #define WEEK_ITEM_TITLE_DAY_WIDTH 45 #define WEEK_ITEM_TITLE_MORE_WIDTH 40 #define WEEK_ITEM_TITLE_WDAY_HEIGHT 28 #define WEEK_ITEM_TITLE_WDAY_OFFSET 6 #define LS_WEEK_ITEM_HEIGHT 57 #define LS_WEEK_ITEM_RIGHT_OFFSET 8 #define LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH 24 #define LS_WEEK_ITEM_TITLE_DAY_HEIGHT 40 #define LS_WEEK_ITEM_TITLE_DAY_WIDTH 45 #define LS_WEEK_ITEM_TITLE_MORE_WIDTH 40 #define LS_WEEK_ITEM_TITLE_WDAY_HEIGHT 28 #define LS_WEEK_ITEM_TITLE_WDAY_OFFSET 6 #define WDB(_pos) \ part { name, "wdb/"#_pos"/base"; \ type, RECT; \ description { \ state, "default" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_BOTTOM_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ color, 0 0 0 0; \ } \ description { \ state: "expand_hide_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_TOP_COORD_RATIO(_pos); \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state: "expand_hide_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_BOTTOM_COORD_RATIO(_pos); \ offset, 0 -WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_BOTTOM_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ } \ description { \ state, "expand_down" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_EXPAND_DOWN_BOTTOM_COORD_RATIO(_pos); \ offset, 0 -WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ color, 0 0 0 0; \ } \ description { \ state, "expand_up" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_EXPAND_UP_TOP_COORD_RATIO(_pos); \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_Y_BOTTOM_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ color, 0 0 0 0; \ } \ } \ part { name, "wdb/"#_pos"/sel"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ offset, 0 0; \ to, "wdb/"#_pos"/base"; \ } \ image { \ normal, CALENDAR_SELSECTED; \ border, 3 3 3 3; \ border_scale, 1; \ } \ visible, 0; \ } \ description { \ state, "selected" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/bg"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ image.normal, CALENDAR_WEEK_VIEW_PRESS; \ visible, 0; \ } \ description { \ state, "down" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/title"; \ type, RECT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.5 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ } \ } \ part { name, "wdb/"#_pos"/text"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (WEEK_ITEM_RIGHT_OFFSET/WEEK_ITEM_WIDTH) 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((WEEK_ITEM_RIGHT_OFFSET+WEEK_ITEM_TITLE_DAY_WIDTH)/WEEK_ITEM_WIDTH) 1.0; \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 40; \ align, 0.5 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/text_wday"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((WEEK_ITEM_RIGHT_OFFSET+WEEK_ITEM_TITLE_DAY_WIDTH+WEEK_ITEM_TITLE_WDAY_OFFSET)/WEEK_ITEM_WIDTH) (((WEEK_ITEM_HEIGHT - WEEK_ITEM_TITLE_DAY_HEIGHT)/2+WEEK_ITEM_TITLE_DAY_HEIGHT-WEEK_ITEM_TITLE_WDAY_HEIGHT)/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.5 ((WEEK_ITEM_HEIGHT-(WEEK_ITEM_HEIGHT - WEEK_ITEM_TITLE_DAY_HEIGHT)/2)/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 19; \ align, 0.5 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/more"; \ type, TEXT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (WEEK_ITEM_WIDTH-WEEK_ITEM_EXPAND_BUTTON_WIDTH-WEEK_ITEM_RIGHT_OFFSET-WEEK_ITEM_RIGHT_OFFSET-WEEK_ITEM_TITLE_MORE_WIDTH)/WEEK_ITEM_WIDTH 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/expand_button"; \ to_y, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 26; \ align, 0.0 0.5; \ text, "..."; \ } \ color, 7 180 211 255; \ } \ } \ part { name, "wdb/"#_pos"/expand_button"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((WEEK_ITEM_WIDTH - WEEK_ITEM_RIGHT_OFFSET - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/WEEK_ITEM_WIDTH) ((WEEK_ITEM_HEIGHT - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((WEEK_ITEM_WIDTH - WEEK_ITEM_RIGHT_OFFSET)/WEEK_ITEM_WIDTH) ((WEEK_ITEM_HEIGHT-((WEEK_ITEM_HEIGHT - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2))/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ visible, 1; \ } \ description { \ state, "expand_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_hide_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ description { \ state, "expand_hide_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ } \ part { name, "wdb/"#_pos"/check"; \ mouse_events, 0; \ scale, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ rel2 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ min, 44 44; \ fixed, 1 1; \ align, 0.5 0.5; \ visible, 0; \ } \ description { \ state, "checked" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/disable"; \ type, SWALLOW; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ } \ } \ part { name, "wdb/"#_pos"/sw"; \ type, SWALLOW; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/base"; \ to_y, "wdb/"#_pos"/title"; \ } \ rel2.to, "wdb/"#_pos"/base"; \ fixed, 1 1; \ } \ } \ programs { \ program { name, "wdb/"#_pos"/down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, STATE_SET "down" 0.0; \ target, "wdb/"#_pos"/bg"; \ } \ program { name, "wdb/"#_pos"/mouse_down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "down"; \ } \ program { name, "wdb/"#_pos"/up"; \ signal, "mouse,up,1"; \ source, "wdb/"#_pos"/base"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/bg"; \ } \ program { name, "wdb/"#_pos"/click"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "cal"; \ } \ program { name, "wdb/"#_pos"/weekday"; \ signal, "weekday,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/sunday"; \ signal, "sunday,"#_pos; \ source, "prog"; \ action, STATE_SET "sunday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/satday"; \ signal, "satday,"#_pos; \ source, "prog"; \ action, STATE_SET "satday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/select"; \ signal, "select,"#_pos; \ source, "prog"; \ action, STATE_SET "selected" 0.0; \ target, "wdb/"#_pos"/sel"; \ } \ program { name, "wdb/"#_pos"/unselect"; \ signal, "unselect,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/sel"; \ } \ program { name, "wdb/"#_pos"/set_check"; \ signal, "check,"#_pos; \ source, "prog"; \ action, STATE_SET "checked" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/unset_check"; \ signal, "uncheck,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/expand_up"; \ signal, "set_expand_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_down"; \ signal, "set_expand_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_up"; \ signal, "set_expand_hide_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_down"; \ signal, "set_expand_hide_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_default"; \ signal, "set_expand_default,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/more_clicked"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/title"; \ action, SIGNAL_EMIT #_pos "more"; \ } \ } group { name, "main/week"; images { image, "57_calendar_week_view_press.png" COMP; image, "57_calendar_week_view_bg.png" COMP; image, "calendar_selected.png" COMP; image, "P01_week_view_icon_open.png" COMP; image, "P01_week_view_icon_close.png" COMP; } parts { part { name, "base"; type, RECT; description { state, "default" 0.0; color, 248 246 239 255; } } part { name, "wdb/base"; type, RECT; description { state, "default" 0.0; rel1 { offset, 0 1; to, "base"; } rel2.to, "base"; color, 0 0 0 0; } } WDB( 0) WDB( 1) WDB( 2) WDB( 3) WDB( 4) WDB( 5) WDB( 6) WDB( 7) part { name, "wdb/line/top"; type, RECT; description { state, "default" 0.0; rel1.to, "base"; rel2 { relative, 1.0 0.0; offset, -1 0; to, "base"; } color, 195 192 179 255; } } part { name, "wdb/line/vertical"; type, RECT; description { state, "default" 0.0; rel1 { relative, 0.5 0.0; to, "base"; } rel2 { relative, 0.5 1.0; offset, 0 -1; to, "base"; } color, 195 192 179 255; } } } } #define LEFT_WDB_S_TITLE(_pos) \ part { name, "wdb/"#_pos"/top/line"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ min: 0 1; \ fixed: 0 1; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, 143 143 143 255; \ } \ } \ part { name, "wdb/"#_pos"/title"; \ type, RECT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 {\ relative: 0.0 1.0;\ to_x: "wdb/"#_pos"/base";\ to_y: "wdb/"#_pos"/top/line";\ } \ rel2 { \ relative, 1.0 0.0; \ offset, -1 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, COLOR_OF_TODAY_FOR_WEEK_CAL; \ } \ } \ part { name, "wdb/"#_pos"/title_bg"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 {\ relative: 0.0 1.0;\ offset, 1 0; \ to_x: "wdb/"#_pos"/base";\ to_y: "wdb/"#_pos"/top/line";\ } \ rel2 { \ relative, 1.0 0.0; \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ visible, 0; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, 182 221 241 255; \ visible, 1; \ } \ } #define RIGHT_WDB_S_TITLE(_pos) \ part { name, "wdb/"#_pos"/top/line"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ min: 0 1; \ fixed: 0 1; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, 143 143 143 255; \ } \ } \ part { name, "wdb/"#_pos"/title"; \ type, RECT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 {\ relative: 0.0 1.0;\ offset, 1 0; \ to_x: "wdb/"#_pos"/base";\ to_y: "wdb/"#_pos"/top/line";\ } \ rel2 { \ relative, 1.0 0.0; \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, COLOR_OF_TODAY_FOR_WEEK_CAL; \ } \ } \ part { name, "wdb/"#_pos"/title_bg"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 {\ relative: 0.0 1.0;\ offset, 1 0; \ to_x: "wdb/"#_pos"/base";\ to_y: "wdb/"#_pos"/top/line";\ } \ rel2 { \ relative, 1.0 0.0; \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ visible, 0; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, 182 221 241 255; \ visible, 1; \ } \ } #define WDB_S(_pos) \ part { name, "wdb/"#_pos"/text"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (WEEK_ITEM_RIGHT_OFFSET/WEEK_ITEM_WIDTH) 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((WEEK_ITEM_RIGHT_OFFSET+WEEK_ITEM_TITLE_DAY_WIDTH)/WEEK_ITEM_WIDTH) 1.0; \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 40; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/text_wday"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((WEEK_ITEM_RIGHT_OFFSET+WEEK_ITEM_TITLE_DAY_WIDTH+WEEK_ITEM_TITLE_WDAY_OFFSET)/WEEK_ITEM_WIDTH) (((WEEK_ITEM_HEIGHT - WEEK_ITEM_TITLE_DAY_HEIGHT)/2+WEEK_ITEM_TITLE_DAY_HEIGHT-WEEK_ITEM_TITLE_WDAY_HEIGHT)/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.5 ((WEEK_ITEM_HEIGHT-(WEEK_ITEM_HEIGHT - WEEK_ITEM_TITLE_DAY_HEIGHT)/2)/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 19; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/more"; \ type, TEXT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (WEEK_ITEM_WIDTH-WEEK_ITEM_EXPAND_BUTTON_WIDTH-WEEK_ITEM_RIGHT_OFFSET-WEEK_ITEM_RIGHT_OFFSET-WEEK_ITEM_TITLE_MORE_WIDTH)/WEEK_ITEM_WIDTH 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/expand_button"; \ to_y, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 26; \ align, 0.0 0.5; \ text, "..."; \ } \ color, 7 180 211 255; \ } \ } \ part { name, "wdb/"#_pos"/expand_button"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((WEEK_ITEM_WIDTH - WEEK_ITEM_RIGHT_OFFSET - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/WEEK_ITEM_WIDTH) ((WEEK_ITEM_HEIGHT - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((WEEK_ITEM_WIDTH - WEEK_ITEM_RIGHT_OFFSET)/WEEK_ITEM_WIDTH) ((WEEK_ITEM_HEIGHT-((WEEK_ITEM_HEIGHT - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2))/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ visible, 1; \ } \ description { \ state, "expand_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_hide_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ description { \ state, "expand_hide_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ } \ part { name, "wdb/"#_pos"/check"; \ mouse_events, 0; \ scale, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ rel2 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ min, 44 44; \ fixed, 1 1; \ align, 0.5 0.5; \ visible, 0; \ } \ description { \ state, "checked" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/disable"; \ type, SWALLOW; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ } \ } \ part { name, "wdb/"#_pos"/sw"; \ type, SWALLOW; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/base"; \ to_y, "wdb/"#_pos"/title"; \ } \ rel2.to, "wdb/"#_pos"/base"; \ fixed, 1 1; \ } \ } \ #define WBS_S_PROGRAMS(_pos) \ program { name, "wdb/"#_pos"/mouse_down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "down"; \ } \ program { name, "wdb/"#_pos"/click"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "cal"; \ } \ program { name, "wdb/"#_pos"/weekday"; \ signal, "weekday,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/sunday"; \ signal, "sunday,"#_pos; \ source, "prog"; \ action, STATE_SET "sunday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/satday"; \ signal, "satday,"#_pos; \ source, "prog"; \ action, STATE_SET "satday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/set_check"; \ signal, "check,"#_pos; \ source, "prog"; \ action, STATE_SET "checked" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/unset_check"; \ signal, "uncheck,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/expand_up"; \ signal, "set_expand_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_down"; \ signal, "set_expand_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_down"; \ signal, "set_expand_hide_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_up"; \ signal, "set_expand_hide_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_default"; \ signal, "set_expand_default,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/more_clicked"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/title"; \ action, SIGNAL_EMIT #_pos "more"; \ } \ program { name, "wdb/"#_pos"/today_focus"; \ signal, "focus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/today_unfocus"; \ signal, "unfocus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/focus"; \ signal, "focus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/unfocus"; \ signal, "unfocus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/show_more"; \ signal, "show,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/more"; \ } \ program { name, "wdb/"#_pos"/hide_more"; \ signal, "hide,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/more"; \ } \ #define LS_WDB_S(_pos) \ part { name, "wdb/"#_pos"/base"; \ type, RECT; \ description { \ state, "default" 0.0; \ rel1 { \ relative, LS_WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, LS_WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_BOTTOM_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ color, 246 246 246 255;\ } \ description { \ state: "expand_hide_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, LS_WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, LS_WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos); \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state: "expand_hide_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, LS_WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_BOTTOM_COORD_RATIO(_pos); \ offset, 0 -WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, LS_WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_BOTTOM_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ } \ description { \ state: "expand_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, LS_WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, LS_WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_EXPAND_DOWN_BOTTOM_COORD_RATIO(_pos); \ offset, 0 -WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ color, 255 255 255 255;\ } \ description { \ state: "expand_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, LS_WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_EXPAND_UP_TOP_COORD_RATIO(_pos); \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, LS_WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ LS_WEEK_DAY_WDB_S_Y_BOTTOM_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ color, 255 255 255 255;\ } \ } \ part { name, "wdb/"#_pos"/sel"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ offset, 0 0; \ to, "wdb/"#_pos"/base"; \ } \ visible, 0; \ } \ description { \ state, "selected" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/bg"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ visible, 0; \ } \ description { \ state, "down" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/title"; \ type, RECT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ offset, 0 LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.5 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, COLOR_OF_TODAY_FOR_WEEK_CAL; \ } \ } \ part { name, "wdb/"#_pos"/title_bg"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ offset, 0 LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.5 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ visible, 0; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, 182 221 241 255; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/text"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (LS_WEEK_ITEM_RIGHT_OFFSET/LS_WEEK_ITEM_WIDTH) 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((LS_WEEK_ITEM_RIGHT_OFFSET+LS_WEEK_ITEM_TITLE_DAY_WIDTH)/LS_WEEK_ITEM_WIDTH) 1.0; \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 40; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/text_wday"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((LS_WEEK_ITEM_RIGHT_OFFSET+LS_WEEK_ITEM_TITLE_DAY_WIDTH+LS_WEEK_ITEM_TITLE_WDAY_OFFSET)/LS_WEEK_ITEM_WIDTH) (((LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_TITLE_DAY_HEIGHT)/2+LS_WEEK_ITEM_TITLE_DAY_HEIGHT-LS_WEEK_ITEM_TITLE_WDAY_HEIGHT)/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.5 ((LS_WEEK_ITEM_HEIGHT-(LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_TITLE_DAY_HEIGHT)/2)/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 19; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/more"; \ type, TEXT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (LS_WEEK_ITEM_WIDTH-LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH-LS_WEEK_ITEM_RIGHT_OFFSET-LS_WEEK_ITEM_RIGHT_OFFSET-LS_WEEK_ITEM_TITLE_MORE_WIDTH)/LS_WEEK_ITEM_WIDTH 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/expand_button"; \ to_y, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 26; \ align, 0.0 0.5; \ text, "..."; \ } \ color, 7 180 211 255; \ } \ } \ part { name, "wdb/"#_pos"/expand_button"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((LS_WEEK_ITEM_WIDTH - LS_WEEK_ITEM_RIGHT_OFFSET - LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH)/LS_WEEK_ITEM_WIDTH) ((LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((LS_WEEK_ITEM_WIDTH - LS_WEEK_ITEM_RIGHT_OFFSET)/LS_WEEK_ITEM_WIDTH) ((LS_WEEK_ITEM_HEIGHT-((LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2))/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ visible, 1; \ } \ description { \ state, "expand_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_hide_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ description { \ state, "expand_hide_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ } \ part { name, "wdb/"#_pos"/check"; \ mouse_events, 0; \ scale, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ rel2 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ min, 44 44; \ fixed, 1 1; \ align, 0.5 0.5; \ visible, 0; \ } \ description { \ state, "checked" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/disable"; \ type, SWALLOW; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ } \ } \ part { name, "wdb/"#_pos"/sw"; \ type, SWALLOW; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/base"; \ to_y, "wdb/"#_pos"/title"; \ } \ rel2.to, "wdb/"#_pos"/base"; \ fixed, 1 1; \ } \ } \ programs { \ program { name, "wdb/"#_pos"/down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, STATE_SET "down" 0.0; \ target, "wdb/"#_pos"/bg"; \ } \ program { name, "wdb/"#_pos"/mouse_down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "down"; \ } \ program { name, "wdb/"#_pos"/up"; \ signal, "mouse,up,1"; \ source, "wdb/"#_pos"/base"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/bg"; \ } \ program { name, "wdb/"#_pos"/click"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "cal"; \ } \ program { name, "wdb/"#_pos"/weekday"; \ signal, "weekday,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/sunday"; \ signal, "sunday,"#_pos; \ source, "prog"; \ action, STATE_SET "sunday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/satday"; \ signal, "satday,"#_pos; \ source, "prog"; \ action, STATE_SET "satday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/select"; \ signal, "select,"#_pos; \ source, "prog"; \ action, STATE_SET "selected" 0.0; \ target, "wdb/"#_pos"/sel"; \ } \ program { name, "wdb/"#_pos"/unselect"; \ signal, "unselect,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/sel"; \ } \ program { name, "wdb/"#_pos"/set_check"; \ signal, "check,"#_pos; \ source, "prog"; \ action, STATE_SET "checked" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/unset_check"; \ signal, "uncheck,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/expand_up"; \ signal, "set_expand_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_down"; \ signal, "set_expand_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_down"; \ signal, "set_expand_hide_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_up"; \ signal, "set_expand_hide_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_default"; \ signal, "set_expand_default,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/more_clicked"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/title"; \ action, SIGNAL_EMIT #_pos "more"; \ } \ program { name, "wdb/"#_pos"/today_focus"; \ signal, "focus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/today_unfocus"; \ signal, "unfocus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/focus"; \ signal, "focus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/unfocus"; \ signal, "unfocus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/show_more"; \ signal, "show,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/more"; \ } \ program { name, "wdb/"#_pos"/hide_more"; \ signal, "hide,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/more"; \ } \ } #define RIGHT_WDB_S_S_TITLE(_pos) \ part { name, "wdb/"#_pos"/top/line"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ min: 0 1; \ fixed: 0 1;\ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, 143 143 143 255; \ } \ } \ part { name, "wdb/"#_pos"/title"; \ type, RECT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 {\ relative: 0.0 1.0;\ offset, 1 0; \ to_x: "wdb/"#_pos"/base";\ to_y: "wdb/"#_pos"/top/line";\ } \ rel2 { \ relative, 1.0 0.0; \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.5 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, COLOR_OF_TODAY_FOR_WEEK_CAL; \ } \ } \ part { name, "wdb/"#_pos"/title_bg"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 {\ relative: 0.0 1.0;\ offset, 1 0; \ to_x: "wdb/"#_pos"/base";\ to_y: "wdb/"#_pos"/top/line";\ } \ rel2 { \ relative, 1.0 0.0; \ offset, 0 WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.0 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ visible, 0; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, 182 221 241 255; \ visible, 1; \ } \ } #define WDB_S_S(_pos) \ part { name, "wdb/"#_pos"/text"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (WEEK_ITEM_RIGHT_OFFSET/WEEK_ITEM_WIDTH) 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((WEEK_ITEM_RIGHT_OFFSET+WEEK_ITEM_TITLE_DAY_WIDTH)/WEEK_ITEM_WIDTH) 1.0; \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 40; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/text_wday"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((WEEK_ITEM_RIGHT_OFFSET+WEEK_ITEM_TITLE_DAY_WIDTH+WEEK_ITEM_TITLE_WDAY_OFFSET)/WEEK_ITEM_WIDTH) (((WEEK_ITEM_HEIGHT - WEEK_ITEM_TITLE_DAY_HEIGHT)/2+WEEK_ITEM_TITLE_DAY_HEIGHT-WEEK_ITEM_TITLE_WDAY_HEIGHT)/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.5 ((WEEK_ITEM_HEIGHT-(WEEK_ITEM_HEIGHT - WEEK_ITEM_TITLE_DAY_HEIGHT)/2)/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 19; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/more"; \ type, TEXT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (WEEK_ITEM_WIDTH-WEEK_ITEM_EXPAND_BUTTON_WIDTH-WEEK_ITEM_RIGHT_OFFSET-WEEK_ITEM_RIGHT_OFFSET-WEEK_ITEM_TITLE_MORE_WIDTH)/WEEK_ITEM_WIDTH 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/expand_button"; \ to_y, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 26; \ align, 0.0 0.5; \ text, "..."; \ } \ color, 7 180 211 255; \ } \ } \ part { name, "wdb/"#_pos"/expand_button"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((WEEK_ITEM_WIDTH - WEEK_ITEM_RIGHT_OFFSET - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/WEEK_ITEM_WIDTH) ((WEEK_ITEM_HEIGHT - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((WEEK_ITEM_WIDTH - WEEK_ITEM_RIGHT_OFFSET)/WEEK_ITEM_WIDTH) ((WEEK_ITEM_HEIGHT-((WEEK_ITEM_HEIGHT - WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2))/WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ visible, 1; \ } \ description { \ state, "expand_up_1" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_up_2" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_hide_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ description { \ state, "expand_hide_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ } \ part { name, "wdb/"#_pos"/check"; \ mouse_events, 0; \ scale, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ rel2 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ min, 44 44; \ fixed, 1 1; \ align, 0.5 0.5; \ visible, 0; \ } \ description { \ state, "checked" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/disable"; \ type, SWALLOW; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ } \ } \ part { name, "wdb/"#_pos"/sw"; \ type, SWALLOW; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/base"; \ to_y, "wdb/"#_pos"/title"; \ } \ rel2.to, "wdb/"#_pos"/base"; \ fixed, 1 1; \ } \ } \ #define WBS_S_S_PROGRAMS(_pos) \ program { name, "wdb/"#_pos"/mouse_down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "down"; \ } \ program { name, "wdb/"#_pos"/click"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "cal"; \ } \ program { name, "wdb/"#_pos"/weekday"; \ signal, "weekday,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/sunday"; \ signal, "sunday,"#_pos; \ source, "prog"; \ action, STATE_SET "sunday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/satday"; \ signal, "satday,"#_pos; \ source, "prog"; \ action, STATE_SET "satday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/set_check"; \ signal, "check,"#_pos; \ source, "prog"; \ action, STATE_SET "checked" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/unset_check"; \ signal, "uncheck,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/expand_up_1"; \ signal, "set_expand_up_1,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_up_1" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_up_2"; \ signal, "set_expand_up_2,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_up_2" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_up"; \ signal, "set_expand_hide_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_down"; \ signal, "set_expand_hide_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_default"; \ signal, "set_expand_default,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/more_clicked"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/title"; \ action, SIGNAL_EMIT #_pos "more"; \ } \ program { name, "wdb/"#_pos"/today_focus"; \ signal, "focus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/today_unfocus"; \ signal, "unfocus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/focus"; \ signal, "focus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/unfocus"; \ signal, "unfocus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/show_more"; \ signal, "show,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/more"; \ } \ program { name, "wdb/"#_pos"/hide_more"; \ signal, "hide,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/more"; \ } \ #define LS_WDB_S_S(_pos) \ part { name, "wdb/"#_pos"/base"; \ type, RECT; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (2 / 3) \ LS_WEEK_DAY_WDB_S_S_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, (1) \ LS_WEEK_DAY_WDB_S_S_Y_BOTTOM_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ color, 246 246 246 255; \ } \ description { \ state: "expand_hide_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, (2 / 3) 0 ;\ offset, 0 (_pos - 4)*LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, 1 0 ;\ offset, 0 LS_WEEK_DAY_TITLE_HEIGHT*2; \ to, "wdb/base"; \ } \ } \ description { \ state: "expand_hide_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, (2 / 3) 1 ;\ offset, 0 (_pos - 7)*LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, (1) 1;\ offset, 0 (6 -_pos)*LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state, "expand_up_1" 0.0; \ rel1 { \ relative, (2 / 3) 0 ;\ offset, 0 ((_pos - 4)*LS_WEEK_DAY_TITLE_HEIGHT); \ to, "wdb/base"; \ } \ rel2 { \ relative, (1) 1 ;\ offset, 0 (_pos - 6)*LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ color, 255 255 255 255;\ } \ description { \ state, "expand_up_2" 0.0; \ rel1 { \ relative, (2 / 3) 0 ;\ offset, 0 (_pos - 4)*LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, (1) 1 ;\ offset, 0 (_pos - 6)*LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ color, 255 255 255 255;\ } \ } \ part { name, "wdb/"#_pos"/sel"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ offset, 0 0; \ to, "wdb/"#_pos"/base"; \ } \ visible, 0; \ } \ description { \ state, "selected" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/bg"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ visible, 0; \ } \ description { \ state, "down" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/title"; \ type, RECT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ offset, 0 LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.5 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, COLOR_OF_TODAY_FOR_WEEK_CAL; \ } \ } \ part { name, "wdb/"#_pos"/title_bg"; \ type, RECT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2 { \ relative, 1.0 0.0; \ offset, 0 LS_WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/"#_pos"/base"; \ } \ align, 0.5 0.0; \ color, COLOR_OF_WEEK_ITEM_TITLE; \ visible, 0; \ } \ description { \ state, "default" 0.1; \ inherit, "default" 0.0; \ color, 182 221 241 255; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/text"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (LS_WEEK_ITEM_RIGHT_OFFSET/LS_WEEK_ITEM_WIDTH) 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((LS_WEEK_ITEM_RIGHT_OFFSET+LS_WEEK_ITEM_TITLE_DAY_WIDTH)/LS_WEEK_ITEM_WIDTH) 1.0; \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 40; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/text_wday"; \ type, TEXT; \ scale, 1; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((LS_WEEK_ITEM_RIGHT_OFFSET+LS_WEEK_ITEM_TITLE_DAY_WIDTH+LS_WEEK_ITEM_TITLE_WDAY_OFFSET)/LS_WEEK_ITEM_WIDTH) (((LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_TITLE_DAY_HEIGHT)/2+LS_WEEK_ITEM_TITLE_DAY_HEIGHT-LS_WEEK_ITEM_TITLE_WDAY_HEIGHT)/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.5 ((LS_WEEK_ITEM_HEIGHT-(LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_TITLE_DAY_HEIGHT)/2)/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 19; \ align, 0.0 1.0; \ } \ color, 56 57 58 255; \ } \ description { \ state, "sunday" 0.0; \ inherit, "default" 0.0; \ color, 200 0 0 255; \ } \ description { \ state, "satday" 0.0; \ inherit, "default" 0.0; \ color, 0 0 200 255; \ } \ } \ part { name, "wdb/"#_pos"/more"; \ type, TEXT; \ scale, 1; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, (LS_WEEK_ITEM_WIDTH-LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH-LS_WEEK_ITEM_RIGHT_OFFSET-LS_WEEK_ITEM_RIGHT_OFFSET-LS_WEEK_ITEM_TITLE_MORE_WIDTH)/LS_WEEK_ITEM_WIDTH 0.0; \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/expand_button"; \ to_y, "wdb/"#_pos"/title"; \ } \ text { \ font, "SLP:style=Medium"; \ size, 26; \ align, 0.0 0.5; \ text, "..."; \ } \ color, 7 180 211 255; \ } \ } \ part { name, "wdb/"#_pos"/expand_button"; \ mouse_events, 0; \ description { \ state, "default" 0.0; \ rel1 { \ relative, ((LS_WEEK_ITEM_WIDTH - LS_WEEK_ITEM_RIGHT_OFFSET - LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH)/LS_WEEK_ITEM_WIDTH) ((LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ rel2 { \ relative, ((LS_WEEK_ITEM_WIDTH - LS_WEEK_ITEM_RIGHT_OFFSET)/LS_WEEK_ITEM_WIDTH) ((LS_WEEK_ITEM_HEIGHT-((LS_WEEK_ITEM_HEIGHT - LS_WEEK_ITEM_EXPAND_BUTTON_WIDTH)/2))/LS_WEEK_ITEM_HEIGHT); \ to, "wdb/"#_pos"/title"; \ } \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ visible, 1; \ } \ description { \ state, "expand_up_1" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_up_2" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_CLOSE; \ } \ description { \ state, "expand_hide_up" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ description { \ state, "expand_hide_down" 0.0; \ inherit, "default" 0.0; \ image.normal, CALENDAR_WEEK_EXPAND_BUTTON_OPEN; \ } \ } \ part { name, "wdb/"#_pos"/check"; \ mouse_events, 0; \ scale, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ rel2 { \ relative, 0.1 0.5; \ to, "wdb/"#_pos"/text"; \ } \ min, 44 44; \ fixed, 1 1; \ align, 0.5 0.5; \ visible, 0; \ } \ description { \ state, "checked" 0.0; \ inherit, "default" 0.0; \ visible, 1; \ } \ } \ part { name, "wdb/"#_pos"/disable"; \ type, SWALLOW; \ description { \ state, "default" 0.0; \ rel1.to, "wdb/"#_pos"/base"; \ rel2.to, "wdb/"#_pos"/base"; \ } \ } \ part { name, "wdb/"#_pos"/sw"; \ type, SWALLOW; \ mouse_events, 1; \ description { \ state, "default" 0.0; \ rel1 { \ relative, 0.0 1.0; \ to_x, "wdb/"#_pos"/base"; \ to_y, "wdb/"#_pos"/title"; \ } \ rel2.to, "wdb/"#_pos"/base"; \ fixed, 1 1; \ } \ } \ programs { \ program { name, "wdb/"#_pos"/down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, STATE_SET "down" 0.0; \ target, "wdb/"#_pos"/bg"; \ } \ program { name, "wdb/"#_pos"/mouse_down"; \ signal, "mouse,down,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "down"; \ } \ program { name, "wdb/"#_pos"/up"; \ signal, "mouse,up,1"; \ source, "wdb/"#_pos"/base"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/bg"; \ } \ program { name, "wdb/"#_pos"/click"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/base"; \ action, SIGNAL_EMIT #_pos "cal"; \ } \ program { name, "wdb/"#_pos"/weekday"; \ signal, "weekday,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/sunday"; \ signal, "sunday,"#_pos; \ source, "prog"; \ action, STATE_SET "sunday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/satday"; \ signal, "satday,"#_pos; \ source, "prog"; \ action, STATE_SET "satday" 0.0; \ target, "wdb/"#_pos"/text"; \ target, "wdb/"#_pos"/text_wday"; \ } \ program { name, "wdb/"#_pos"/select"; \ signal, "select,"#_pos; \ source, "prog"; \ action, STATE_SET "selected" 0.0; \ target, "wdb/"#_pos"/sel"; \ } \ program { name, "wdb/"#_pos"/unselect"; \ signal, "unselect,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/sel"; \ } \ program { name, "wdb/"#_pos"/set_check"; \ signal, "check,"#_pos; \ source, "prog"; \ action, STATE_SET "checked" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/unset_check"; \ signal, "uncheck,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/check"; \ } \ program { name, "wdb/"#_pos"/expand_up_1"; \ signal, "set_expand_up_1,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_up_1" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_up_2"; \ signal, "set_expand_up_2,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_up_2" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_up"; \ signal, "set_expand_hide_up,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_up" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_hide_down"; \ signal, "set_expand_hide_down,"#_pos; \ source, "prog"; \ action, STATE_SET "expand_hide_down" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/expand_default"; \ signal, "set_expand_default,"#_pos; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/base"; \ target, "wdb/"#_pos"/expand_button"; \ } \ program { name, "wdb/"#_pos"/more_clicked"; \ signal, "mouse,clicked,1"; \ source, "wdb/"#_pos"/title"; \ action, SIGNAL_EMIT #_pos "more"; \ } \ program { name, "wdb/"#_pos"/today_focus"; \ signal, "focus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/today_unfocus"; \ signal, "unfocus,"#_pos",today"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title"; \ } \ program { name, "wdb/"#_pos"/focus"; \ signal, "focus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/unfocus"; \ signal, "unfocus,"#_pos",wday"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/title_bg"; \ } \ program { name, "wdb/"#_pos"/show_more"; \ signal, "show,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.0; \ target, "wdb/"#_pos"/more"; \ } \ program { name, "wdb/"#_pos"/hide_more"; \ signal, "hide,"#_pos",more"; \ source, "prog"; \ action, STATE_SET "default" 0.1; \ target, "wdb/"#_pos"/more"; \ } \ } #define LEFT_WDB_S_EXPAND_DESC(_pos)\ description { \ state: "expand_hide_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ 0; \ offset, 0 (_pos/2)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, 0 \ 0; \ offset, 0 (_pos/2 + 1)*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ } \ description { \ state: "expand_hide_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ 1; \ offset, 0 (_pos/2-3)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, 0 \ 1; \ offset, 0 ((_pos-4)/2)*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ } \ description { \ state: "expand_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos); \ to, "wdb/base"; \ } \ rel2 { \ relative, 0 \ 1; \ offset, 0 ((_pos-4)/2)*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ color, 255 255 255 255;\ } \ description { \ state: "expand_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, WEEK_DAY_X_LEFT_COORD_RATIO(_pos) \ 0; \ offset, 0 (_pos/2)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ rel2 { \ relative, 0 \ 1; \ offset, 0 ((_pos-4)/2)*WEEK_DAY_TITLE_HEIGHT;\ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ color, 255 255 255 255;\ } #define RIGHT_WDB_B_EXPAND_DESC(_pos)\ description { \ state: "expand_hide_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, 1 \ 0; \ offset, 0 ((_pos-1)/2)*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ 0; \ offset, 0 ((_pos+1)/2)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state: "expand_hide_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, 1 \ 1; \ offset, 0 -WEEK_DAY_TITLE_HEIGHT*_pos; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ 1; \ offset, 0 (((_pos-1)/2)-3)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state: "expand_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, 1 \ WEEK_DAY_WDB_S_Y_TOP_COORD_RATIO(_pos); \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ 1; \ offset, 0 (((_pos-3)/2)-2)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ color, 255 255 255 255;\ } \ description { \ state: "expand_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, 1 \ 0; \ offset, 0 (_pos/3)*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, WEEK_DAY_X_RIGHT_COORD_RATIO(_pos) \ 1; \ offset, 0 (_pos/3-3)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ color, 255 255 255 255;\ } \ #define RIGHT_WDB_B_B_EXPAND_DESC(_pos) \ description { \ state: "expand_hide_up" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, 1 \ 0; \ offset, 0 (_pos-3)*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, (1) \ 0; \ offset, 0 (_pos-2)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state: "expand_hide_down" 0.0; \ inherit: "default" 0.0; \ rel1 { \ relative, 1 \ 1; \ offset, 0 (_pos-7)*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, (1) \ 1; \ offset, 0 (_pos-6)*WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state, "expand_up_1" 0.0; \ rel1 { \ relative, 1 \ 0; \ offset, 0 2*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, (1) \ 1; \ offset, 0 -WEEK_DAY_TITLE_HEIGHT; \ to, "wdb/base"; \ } \ } \ description { \ state, "expand_up_2" 0.0; \ rel1 { \ relative, 1 \ 0; \ offset, 0 3*WEEK_DAY_TITLE_HEIGHT; \ to_x: "wdb/line/vert";\ to_y: "wdb/base"; \ } \ rel2 { \ relative, (1) \ 1; \ to, "wdb/base"; \ } \ } \ group { name, "main/week/small"; images { image, "P01_week_view_icon_open.png" COMP; image, "P01_week_view_icon_close.png" COMP; } parts { part { name, "base"; type, RECT; description { state, "default" 0.0; color, 0 0 0 0; } } part { name, "wdb/base"; type, RECT; description { state, "default" 0.0; rel1.to, "base"; rel2.to, "base"; color, 0 0 0 0; } } part { name, "wdb/line/vert"; type, RECT; description { state, "default" 0.0; min: 2 0; fixed: 1 0; rel1 { relative: 1/2 0.0; to_x: "base"; to_y: "base"; } rel2 { relative: 1/2 1.0; to_x: "base"; to_y: "base"; } align: 0.0 0.0; color, 171 171 171 255; } } part { name, "wdb/0/base"; type, RECT; description { state, "default" 0.0; rel1 { relative: 0.0 0.0; to_x: "base"; to_y: "base"; } rel2 { relative: 0.0 1/3; to_x: "wdb/line/vert"; to_y: "base"; } color, 246 246 246 255; } LEFT_WDB_S_EXPAND_DESC(0) } LEFT_WDB_S_TITLE(0) WDB_S(0) part { name, "wdb/1/base"; type, RECT; description { state, "default" 0.0; rel1 { relative: 1.0 0.0; to_x: "wdb/line/vert"; to_y: "base"; } rel2 { relative: 1 1/3; to, "base"; } color, 246 246 246 255; } RIGHT_WDB_B_EXPAND_DESC(1) } RIGHT_WDB_S_TITLE(1) WDB_S(1) part { name, "wdb/2/base"; type, RECT; description { state, "default" 0.0; rel1 { relative: 0.0 1.0; to, "wdb/0/base"; } rel2 { relative: 0.0 2/3; to_x: "wdb/line/vert"; to_y: "base"; } color, 246 246 246 255; } LEFT_WDB_S_EXPAND_DESC(2) } LEFT_WDB_S_TITLE(2) WDB_S(2) part { name, "wdb/3/base"; type, RECT; description { state, "default" 0.0; rel1 { relative: 1.0 1.0; to_x: "wdb/line/vert"; to_y: "wdb/1/base"; } rel2 { relative: 1 2/3; to_x: "base"; to_y: "base"; } color, 246 246 246 255; } RIGHT_WDB_B_EXPAND_DESC(3) } RIGHT_WDB_S_TITLE(3) WDB_S(3) part { name, "wdb/4/base"; type, RECT; description { state, "default" 0.0; rel1 { relative: 0.0 1.0; to, wdb/2/base; } rel2 { relative: 0 1; to_x: "wdb/line/vert"; to_y: "base"; } color, 246 246 246 255; } LEFT_WDB_S_EXPAND_DESC(4) } LEFT_WDB_S_TITLE(4) WDB_S(4) part { name, "wdb/5/base"; type, RECT; description { state, "default" 0.0; rel1 { relative: 1.0 1.0; to_x: "wdb/line/vert"; to_y: "wdb/3/base"; } rel2 { relative: 1 1; offset, 0 145; to_x: "base"; to_y: "wdb/3/base"; } align: 0.0 0.0; color, 246 246 246 255; } RIGHT_WDB_B_B_EXPAND_DESC(5) } RIGHT_WDB_S_S_TITLE(5) WDB_S_S(5) part { name, "gap"; type, RECT; description { state, "default" 0.0; rel1 { relative: 1.0 1.0; to_x: "wdb/line/vert"; to_y: "wdb/5/base"; } rel2 { relative: 1.0 1.0; offset, 0 8; to_x: "base"; to_y: "wdb/5/base"; } color, 246 246 246 255; } } part { name, "wdb/6/base"; type, RECT; description { state, "default" 0.0; rel1 { relative: 1.0 1.0; to_x: "wdb/line/vert"; to_y: "gap"; } rel2 { relative: 1 1; to_x: "base"; to_y: "base"; } align: 0.0 0.0; color, 246 246 246 255; } RIGHT_WDB_B_B_EXPAND_DESC(6) } RIGHT_WDB_S_S_TITLE(6) WDB_S_S(6) } programs { WBS_S_PROGRAMS(0) WBS_S_PROGRAMS(1) WBS_S_PROGRAMS(2) WBS_S_PROGRAMS(3) WBS_S_PROGRAMS(4) WBS_S_S_PROGRAMS(5) WBS_S_S_PROGRAMS(6) } } group { name, "landscape/main/week/small"; images { image, "57_calendar_week_view_press.png" COMP; image, "57_calendar_week_view_bg.png" COMP; image, "calendar_selected.png" COMP; image, "P01_week_view_icon_open.png" COMP; image, "P01_week_view_icon_close.png" COMP; } parts { part { name, "base"; type, RECT; description { state, "default" 0.0; color, 0 0 0 0; } } part { name, "wdb/base"; type, RECT; description { state, "default" 0.0; rel1 { offset, 0 1; to, "base"; } rel2.to, "base"; color, 0 0 0 0; } } LS_WDB_S( 0) LS_WDB_S( 1) LS_WDB_S( 2) LS_WDB_S( 3) LS_WDB_S( 4) LS_WDB_S_S( 5) LS_WDB_S_S( 6) part { name, "wdb/line/top"; type, RECT; description { state, "default" 0.0; rel1.to, "base"; rel2 { relative, 1.0 0.0; offset, -1 0; to, "base"; } color, 195 192 179 255; } } part { name, "wdb/line/vertical/1"; type, RECT; description { state, "default" 0.0; rel1 { relative, 1/3 0.0; to, "base"; } rel2 { relative, 1/3 1.0; offset, 0 -1; to, "base"; } color, 195 192 179 255; } } part { name, "wdb/line/vertical/2"; type, RECT; description { state, "default" 0.0; rel1 { relative, 2/3 0.0; to, "base"; } rel2 { relative, 2/3 1.0; offset, 0 -1; to, "base"; } color, 195 192 179 255; } } } }