terminology/data/themes/default/background.edc

1584 lines
52 KiB
Plaintext

//// the background and general container for the terminal
group { name: "terminology/background";
images {
image: "pm_shadow.png" COMP;
image: "icon-tab-btn-060.png" COMP;
}
set { name: "tab_grouped";
image { image: "tab_grouped_8.png" COMP; size: 0 0 8 8; }
image { image: "tab_grouped_16.png" COMP; size: 8 8 16 16; }
image { image: "tab_grouped_32.png" COMP; size: 16 16 99999 99999; }
}
I060("tab_close", "close")
I060("arrow-l", "arrow-l")
I060("arrow-r", "arrow-r")
I060("arrow-u", "arrow-u")
I060("arrow-d", "arrow-d")
sounds {
sample { name: "bell" LOSSY 64;
source: "bell.wav";
}
}
script {
public message(Msg_Type:type, id, ...) {
new r, g, b, a, v;
if (type != MSG_INT)
return;
if (id == 1) {
v = (getarg(2) * 255) / 100;
custom_state(PART:"base", "default", 0.0);
get_state_val(PART:"base", STATE_COLOR, r, g, b, a);
set_state_val(PART:"base", STATE_COLOR, r, g, b, v);
set_state(PART:"base", "custom", 0.0);
} else if (id == 2) {
v = getarg(2);
// custom_state(PART:"shine_focused", "focused", 0.0);
// get_state_val(PART:"shine_focused", STATE_COLOR, r, g, b, a);
// set_state_val(PART:"shine_focused", STATE_COLOR, r, g, b, v);
// set_state(PART:"shine_focused", "custom", 0.0);
//
// custom_state(PART:"shine_unfocused", "default", 0.0);
// get_state_val(PART:"shine_unfocused", STATE_COLOR, r, g, b, a);
// set_state_val(PART:"shine_unfocused", STATE_COLOR, r, g, b, v/8);
// set_state(PART:"shine_unfocused", "custom", 0.0);
}
}
}
parts {
////////////////////////////////////////////////////////////////////
// background handling
part { name: "base"; type: RECT;
description { state: "default" 0.0;
color_class: "BG";
}
}
////////////////////////////////////////////////////////////////////
// actual text grid for chars, cursors, selectiond etc. goes here
// and has a background layered behind it inside the swallowed
// child edje. Swallow `terminology/core`
part { name: "terminology.content"; type: SWALLOW;
description { state: "default" 0.0;
}
}
////////////////////////////////////////////////////////////////////
// indicator of other tabs and control {{{
part { name: "tabcount_clip"; type: RECT;
description { state: "default" 0.0;
color: 255 255 255 0; // mo cc
visible: 0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255; // no cc
visible: 1;
}
}
part { name: "terminology.tabmissed.label"; type: TEXT; mouse_events: 0;
scale: 1;
clip_to: "tabcount_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.tabcount.label";
rel1.offset: -9 0;
rel2.relative: 0.0 1.0;
rel2.offset: -9 -1;
offscale;
color: 255 255 255 160; // no cc
color_class: "/fg/normal/term/text/tabcount/missed";
align: 1.0 0.5;
text { font: "Sans"; size: 8;
align: 1.0 0.5;
min: 1 1;
ellipsis: 0;
}
}
description { state: "over" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
}
}
part { name: "terminology.tabcount.label"; type: TEXT; mouse_events: 0;
scale: 1;
clip_to: "tabcount_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.tabcount.control";
rel2.offset: -5 0;
rel2.relative: 0.0 1.0;
rel2.offset: -5 -1;
offscale;
color: 255 255 255 160; // no cc
color_class: "/fg/normal/term/text/tabcount";
align: 1.0 0.5;
text { font: "Sans"; size: 8;
align: 1.0 0.5;
min: 1 1;
ellipsis: 0;
}
}
description { state: "over" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255; // no cc
}
}
part { name: "tabcount_bg"; mouse_events: 0;
clip_to: "tabcount_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.tabcount.control";
image.normal: "icon-tab-btn-060.png";
color: 255 255 255 160; // no cc
color_class: "/fg/normal/term/tabcount";
fixed: 1 1;
}
description { state: "over" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255; // no cc
}
}
part { name: "terminology.tabcount.control"; type: SWALLOW;
clip_to: "tabcount_clip";
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "viewregion";
rel1.relative: 1.0 0.0;
rel1.offset: -5 4;
rel2.relative: 1.0 0.0;
rel2.offset: -5 4;
align: 1.0 0.0;
min: 15 15;
offscale;
}
}
part { name: "tabcount_ev"; type: RECT; repeat_events: 1;
clip_to: "tabcount_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.tabcount.control";
color: 0 0 0 0; // no cc
}
}
part { name: "terminology.tabregion"; type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "terminology.content";
rel2.to: "viewregion";
rel2.relative: 1.0 0.0;
}
}
part { name: "viewregion"; type: SWALLOW;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.content";
offscale;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
rel1.to_y: "tabmiddle";
rel1.relative: 0.0 1.0;
rel1.offset: 0 1;
}
}
program { signal: "mouse,in"; source: "tabcount_ev";
action: STATE_SET "over" 0.0;
transition: DECELERATE 0.2;
target: "tabcount_bg";
target: "terminology.tabcount.label";
target: "terminology.tabmissed.label";
}
program { signal: "mouse,out"; source: "tabcount_ev";
action: STATE_SET "default" 0.0;
transition: DECELERATE 2.0;
target: "tabcount_bg";
target: "terminology.tabcount.label";
target: "terminology.tabmissed.label";
}
program { signal: "mouse,clicked,1"; source: "tabcount_ev";
action: SIGNAL_EMIT "tab,go" "terminology";
}
program { signal: "mouse,clicked,3"; source: "tabcount_ev";
action: SIGNAL_EMIT "tab,new" "terminology";
}
program { signal: "mouse,wheel,0,1"; source: "tabcount_ev";
action: SIGNAL_EMIT "tab,prev" "terminology";
}
program { signal: "mouse,wheel,0,-1"; source: "tabcount_ev";
action: SIGNAL_EMIT "tab,next" "terminology";
}
program { signal: "tabcount,off"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.5;
target: "tabcount_clip";
}
program { signal: "tabcount,on"; source: "terminology";
action: STATE_SET "on" 0.0;
transition: DECELERATE 0.5;
target: "tabcount_clip";
}
program { signal: "tabmissed,off"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.5;
target: "terminology.tabmissed.label";
}
program { signal: "tabmissed,on"; source: "terminology";
action: STATE_SET "over" 0.0;
transition: DECELERATE 0.2;
target: "terminology.tabmissed.label";
after: "tabmissed2";
}
program { name: "tabmissed2";
signal: "tabmissed,on"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 3.0;
target: "terminology.tabmissed.label";
}
// }}}
////////////////////////////////////////////////////////////////////
// sendfile request {{{
// XXX: make this a swallow
part { name: "sendfile_request_clip"; type: RECT;
description { state: "default" 0.0;
color: 255 255 255 0;
visible: 0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part { name: "sendfile_request_shadow";
mouse_events: 0;
clip_to: "sendfile_request_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "sendfile_request_bg";
rel1.offset: -32 -32;
rel2.offset: 31 31;
image.normal: "pm_shadow.png";
image.border: 64 64 64 64;
fill.smooth: 0;
}
}
part { name: "sendfile_request_bg"; type: RECT;
clip_to: "sendfile_request_clip";
description { state: "default" 0.0;
fixed: 1 1;
color: 255 255 255 255;
color_class: "BG_SENDFILE";
rel1.relative: 0.0 -1.0;
rel2.relative: 1.0 0.0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.0;
}
}
part { name: "terminology.sendfile.request"; type: SWALLOW;
clip_to: "sendfile_request_clip";
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "sendfile_request_bg";
rel1.offset: 4 4;
rel2.offset: -5 -5;
offscale;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 0.0;
rel2.relative: 1.0 1.0;
}
}
program { signal: "sendfile,request,on"; source: "terminology";
action: ACTION_STOP;
target: "sendfile_request_on";
target: "sendfile_request_off";
}
program { signal: "sendfile,request,off"; source: "terminology";
action: ACTION_STOP;
target: "sendfile_request_on";
target: "sendfile_request_off";
}
program { name: "sendfile_request_on";
signal: "sendfile,request,on"; source: "terminology";
in: 0.5 0.0;
action: STATE_SET "on" 0.0;
transition: DECELERATE 0.5;
target: "sendfile_request_clip";
target: "sendfile_request_bg";
}
program { name: "sendfile_request_off";
signal: "sendfile,request,off"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.5;
target: "sendfile_request_clip";
target: "sendfile_request_bg";
}
// }}}
////////////////////////////////////////////////////////////////////
// sendfile progress {{{
part { name: "sendfile_progress_clip"; type: RECT;
description { state: "default" 0.0;
color: 255 255 255 0;
visible: 0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part { name: "sendfile_progress_shadow";
mouse_events: 0;
clip_to: "sendfile_progress_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "sendfile_progress_bg";
rel1.offset: -32 -32;
rel2.offset: 31 31;
image.normal: "pm_shadow.png";
image.border: 64 64 64 64;
fill.smooth: 0;
}
}
part { name: "sendfile_progress_bg"; type: RECT;
clip_to: "sendfile_progress_clip";
scale : 1;
description { state: "default" 0.0;
fixed: 1 1;
color: 255 255 255 255;
color_class: "BG_SENDFILE";
rel.to: "terminology.sendfile.progress";
rel1.offset: -4 -4;
rel2.offset: 4 4;
offscale;
}
}
part { name: "terminology.sendfile.progress"; type: SWALLOW;
clip_to: "sendfile_progress_clip";
scale : 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.relative: 0.0 0.0;
rel1.offset: 4 -5;
rel2.relative: 1.0 0.0;
rel2.offset: -5 -5;
align: 0.5 1.0;
offscale;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
rel1.offset: 4 4;
rel2.offset: -5 4;
align: 0.5 0.0;
}
}
program { signal: "sendfile,progress,on"; source: "terminology";
action: ACTION_STOP;
target: "sendfile_progress_on";
target: "sendfile_progress_off";
}
program { signal: "sendfile,progress,off"; source: "terminology";
action: ACTION_STOP;
target: "sendfile_progress_on";
target: "sendfile_progress_off";
}
program { name: "sendfile_progress_on";
signal: "sendfile,progress,on"; source: "terminology";
in: 0.5 0.0;
action: STATE_SET "on" 0.0;
transition: DECELERATE 0.5;
target: "sendfile_progress_clip";
target: "terminology.sendfile.progress";
}
program { name: "sendfile_progress_off";
signal: "sendfile,progress,off"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.5;
target: "sendfile_progress_clip";
target: "terminology.sendfile.progress";
}
// }}}
////////////////////////////////////////////////////////////////////
// miniview {{{
part { name: "terminology.miniview"; type: SWALLOW;
description { state: "default" 0.0;
rel1.to_x: "terminology.content";
rel1.to_y: "viewregion";
rel2.to: "terminology.content";
visible: 0;
fixed: 1 1;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
program { signal: "miniview,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "terminology.miniview";
}
program { signal: "miniview,on"; source: "terminology";
action: STATE_SET "on" 0.0;
target: "terminology.miniview";
}
// }}}
////////////////////////////////////////////////////////////////////
// overlayed prettiness {{{
/* leave this here for docs - can have shine overlay that settings can
* change color of via HIGHLIGHT color class
part { name: "shine_focused";
mouse_events: 0;
description { state: "default" 0.0;
fixed: 1 1;
rel1.offset: 0 0;
rel2.offset: -1 -1;
image.normal: "bg_shine";
fill.smooth: 0;
align: 0.5 0.0;
aspect: (256/120) (256/120);
aspect_preference: HORIZONTAL;
color: 255 255 255 0;
color_class: "HIGHLIGHT";
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255;
color_class: "HIGHLIGHT";
}
}
*/
// }}}
////////////////////////////////////////////////////////////////////
// tabs {{{
part { name: "tab_clip"; type: RECT;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "tab_base_l"; type: RECT; mouse_events: 0;
clip_to: "tab_clip";
description { state: "default" 0.0;
rel1.to: "tab_bevel_top0";
rel2.to: "tab_bevel_top1";
color_class: "/bg/normal/background";
fixed: 1 1;
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
color_class: "/bg/selected/titlebar";
}
}
part { name: "tab_base_r"; type: RECT; mouse_events: 0;
clip_to: "tab_clip";
description { state: "default" 0.0;
rel1.to: "tab_bevel_top3";
rel2.to_y: "tab_bevel_top4";
color_class: "/bg/normal/background";
fixed: 1 1;
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
color_class: "/bg/selected/titlebar";
}
}
part { name: "tab_bevel_top0"; type: SPACER; mouse_events: 0;
description { state: "default" 0.0;
rel1.to: "tableft";
rel2.to_y: "tableft";
rel2.to_x: "tab_bevel_top1";
rel2.relative: 0.0 1.0;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "tab_bevel_top1"; type: SPACER; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
rel.to: "tabmiddle";
align: 0.0 0.0;
max: 5 99999;
min: 5 0;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "tab_bevel_top2"; type: RECT; mouse_events: 0;
clip_to: "tab_clip";
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "tab_bevel_top1";
rel2.to: "tab_bevel_top3";
rel1.relative: 1.0 0.0;
rel2.relative: 0.0 1.0;
align: 0.5 0.0;
min: 0 0; max: 99999 0;
visible: 0;
color_class: "/bg/selected/tab/hilight";
}
description { state: "focused" 0.0;
inherit: "default" 0.0;
min: 0 5; max: 99999 5;
visible: 1;
}
}
part { name: "tab_bevel_top3"; type: SPACER; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
rel.to: "tabmiddle";
align: 1.0 0.0;
max: 5 99999;
min: 5 0;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "tab_bevel_top4"; type: SPACER; mouse_events: 0;
description { state: "default" 0.0;
rel1.to_y: "tabright";
rel1.to_x: "tab_bevel_top3";
rel1.relative: 1.0 0.0;
rel2.to_y: "tabright";
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "tab_bevel_bg0"; type: SPACER; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top0";
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "tab_bevel_bg1"; type: SPACER; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top1";
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "tab_bevel_bg3"; type: SPACER; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top3";
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "tab_bevel_bg4"; type: SPACER; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top4";
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
}
}
part { name: "terminology.tabl.content"; type: SWALLOW;
description { state: "default" 0.0;
rel.to: "tableft";
fixed: 1 1;
}
}
part { name: "terminology.tabr.content"; type: SWALLOW;
description { state: "default" 0.0;
rel.to: "tabright";
fixed: 1 1;
}
}
images.image: "tab_shad.png" COMP;
part { name: "tab_bevel_shad0"; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top0";
image.normal: "tab_shad.png";
image.border: 0 0 5 15;
image.border_scale_by: 0.25;
image.border_scale: 1;
fill.smooth: 0;
visible: 0;
fixed: 1 1;
color_class: "/shadow/selected/tab";
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
images.image: "tab_shad_l.png" COMP;
part { name: "tab_bevel_shad1"; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top1";
image.normal: "tab_shad_l.png";
image.border: 0 20 5 15;
image.border_scale_by: 0.25;
image.border_scale: 1;
fill.smooth: 0;
visible: 0;
fixed: 1 1;
color_class: "/shadow/selected/tab";
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
images.image: "tab_shad_r.png" COMP;
part { name: "tab_bevel_shad3"; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top3";
image.normal: "tab_shad_r.png";
image.border: 20 0 5 15;
image.border_scale_by: 0.25;
image.border_scale: 1;
fill.smooth: 0;
visible: 0;
fixed: 1 1;
color_class: "/shadow/selected/tab";
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "tab_bevel_shad4"; mouse_events: 0;
description { state: "default" 0.0;
rel.to: "tab_bevel_top4";
image.normal: "tab_shad.png";
image.border: 0 0 5 15;
image.border_scale_by: 0.25;
image.border_scale: 1;
fill.smooth: 0;
visible: 0;
fixed: 1 1;
color_class: "/shadow/selected/tab";
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
program { signal: "focus,in"; source: "terminology";
action: STATE_SET "focused" 0.0;
target: "tab_base_l";
target: "tab_base_r";
target: "tab_bevel_top2";
}
program { signal: "focused,set"; source: "terminology";
action: STATE_SET "focused" 0.0;
target: "tab_base_l";
target: "tab_base_r";
target: "tab_bevel_top2";
}
program { signal: "focus,out"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "tab_base_l";
target: "tab_base_r";
target: "tab_bevel_top2";
}
program { signal: "tabbar,on"; source: "terminology";
action: STATE_SET "tab" 0.0;
target: "viewregion";
target: "tableft";
target: "tabmiddle";
target: "tabright";
target: "tab_bevel_top0";
target: "tab_bevel_top1";
target: "tab_bevel_top3";
target: "tab_bevel_top4";
target: "tab_bevel_bg0";
target: "tab_bevel_bg1";
target: "tab_bevel_bg3";
target: "tab_bevel_bg4";
target: "tab_bevel_shad0";
target: "tab_bevel_shad1";
target: "tab_bevel_shad3";
target: "tab_bevel_shad4";
target: "tab_clip";
target: "tabtitle";
target: "tabclose";
}
program { signal: "tabbar,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "viewregion";
target: "tableft";
target: "tabmiddle";
target: "tabright";
target: "tab_bevel_top0";
target: "tab_bevel_top1";
target: "tab_bevel_top3";
target: "tab_bevel_top4";
target: "tab_bevel_bg0";
target: "tab_bevel_bg1";
target: "tab_bevel_bg3";
target: "tab_bevel_bg4";
target: "tab_bevel_shad0";
target: "tab_bevel_shad1";
target: "tab_bevel_shad3";
target: "tab_bevel_shad4";
target: "tab_clip";
target: "tabtitle";
target: "tabclose";
}
program { signal: "tab_btn,on"; source: "terminology";
action: STATE_SET "on" 0.0;
target: "tab_btn_clip";
target: "terminology.tab_btn";
}
program { signal: "tab_btn,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "tab_btn_clip";
target: "terminology.tab_btn";
}
part { name: "tab_btn_clip"; type: RECT;
description { state: "default" 0.0;
visible: 0;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "tab_btn_bg"; mouse_events: 0;
clip_to: "tab_btn_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.tab_btn";
image.normal: "icon-tab-btn-060.png";
color_class: "/fg/normal/term/tab_button";
fixed: 1 1;
}
description { state: "pressed" 0.0;
inherit: "default" 0.0;
color_class: "/fg/pressed/term/tab_button";
}
}
part { name: "terminology.tab_btn"; type: SWALLOW; mouse_events: 0;
clip_to: "tab_btn_clip";
scale: 1;
description { state: "default" 0.0;
rel1.relative: 1.0 0.0;
rel2.to_y: "tabmiddle";
rel1.offset: 3 3;
rel2.offset: -4 -4;
visible: 0;
align: 1.0 0.5;
max: 0 0;
fixed: 1 1;
offscale;
}
description { state: "on" 0.0;
inherit: "default" 0.0;
min: 15 15;
max: 15 15;
visible: 1;
}
}
part { name: "tab_btn_ev"; type: RECT; repeat_events: 1;
clip_to: "tab_btn_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.tab_btn";
color: 0 0 0 0; // no cc
}
}
program { signal: "mouse,clicked,1"; source: "tab_btn_ev";
action: SIGNAL_EMIT "tab,go" "terminology";
}
program { signal: "mouse,clicked,3"; source: "tab_btn_ev";
action: SIGNAL_EMIT "tab,new" "terminology";
}
program { signal: "mouse,wheel,0,1"; source: "tab_btn_ev";
action: SIGNAL_EMIT "tab,prev" "terminology";
}
program { signal: "mouse,wheel,0,-1"; source: "tab_btn_ev";
action: SIGNAL_EMIT "tab,next" "terminology";
}
program { signal: "mouse,down,*"; source: "tab_btn_ev";
action: STATE_SET "pressed" 0.0;
target: "tab_btn_bg";
}
program { signal: "mouse,up,*"; source: "tab_btn_ev";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.3;
target: "tab_btn_bg";
}
part { name: "terminology.tab"; type: SWALLOW;
mouse_events: 0;
description { state: "default" 0.0;
rel1.relative: 1.0 0.0;
rel1.to_x: "terminology.tabl";
rel2.relative: 0.0 0.0;
rel2.to_x: "terminology.tabr";
align: 0.5 0.0;
visible: 0;
fixed: 1 1;
}
}
// some slot for dragable parts to stay in along top edge of bg
part { name: "tabdrag"; type: SPACER;
description { state: "default" 0.0;
rel2.relative: 0.0 0.0;
rel2.to_x: "terminology.tab_btn";
fixed: 1 1;
}
description { state: "hdrag,off" 0.0;
inherit: "default" 0.0;
}
description { state: "drag_over" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.3 0.0;
rel2.to_x: "terminology.tabregion";
rel2.relative: 0.7 0.0;
}
}
program { name: "drag_over_tabs,on";
signal: "drag_over_tabs,on"; source: "terminology";
action: STATE_SET "drag_over" 0.0;
target: "tabdrag";
after: "drag_over_tabs,pulse";
}
program { name: "drag_over_tabs,pulse";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.5;
target: "tabdrag";
after: "drag_over_tabs,pulse2";
}
program { name: "drag_over_tabs,pulse2";
transition: ACCELERATE 0.5;
action: STATE_SET "drag_over" 0.0;
target: "tabdrag";
after: "drag_over_tabs,pulse";
}
program { signal: "drag_over_tabs,off"; source: "terminology";
action: ACTION_STOP;
target: "drag_over_tabs,on";
target: "drag_over_tabs,pulse";
target: "drag_over_tabs,pulse2";
after: "drag_over_tabs,off2";
}
program { name: "drag_over_tabs,off2";
action: STATE_SET "default" 0.0;
target: "tabdrag";
}
program { signal: "hdrag,on"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "tabdrag";
target: "drag_clip";
}
program { signal: "hdrag,off"; source: "terminology";
action: STATE_SET "hdrag,off" 0.0;
target: "tabdrag";
target: "drag_clip";
}
// left boundary of the active tab (dragable 0.0 -> 1.0)
part { name: "terminology.tabl"; type: SPACER;
dragable.x: 1 1 0;
dragable.confine: "tabdrag";
description { state: "default" 0.0;
rel2.relative: 1.0 0.0;
max: 1 1;
fixed: 1 1;
}
}
// right boundary of the active tab (dragable 0.0 -> 1.0)
part { name: "terminology.tabr"; type: SPACER;
dragable.x: 1 1 0;
dragable.confine: "tabdrag";
description { state: "default" 0.0;
rel2.relative: 0.0 0.0;
rel2.to_x: "tabdrag";
max: 1 1;
fixed: 1 1;
}
}
part { name: "tabgrouped";
scale: 1;
description { state: "default" 0.0;
align: 0.0 0.5;
fixed: 1 1;
max: 0 0;
rel1 {
to_x: "tab_bevel_top2";
to_y: "tabmiddle";
relative: 0.0 0.0;
offset: 4 4;
}
rel2 {
to_x: "tab_bevel_top2";
to_y: "tabmiddle";
relative: 0.0 1.0;
offset: 4 -5;
}
image.normal: "tab_grouped";
color_class: "FG";
visible: 0;
offscale;
}
description { state: "grouped" 0.0;
inherit: "default" 0.0;
min: 15 15;
max: 15 15;
visible: 1;
}
}
program { signal: "grouped,on"; source: "terminology";
action: STATE_SET "grouped" 0.0;
target: "tabgrouped";
}
program { signal: "grouped,off"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "tabgrouped";
}
part { name: "terminology.tab.title"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
text { font: "Sans:style=Bold"; size: 10;
align: 0.5 0.0;
min: 0 1;
}
align: 0.5 0.0;
rel1.to_x: "tabgrouped";
rel1.offset: 4 4;
rel2.to_x: "tabclose";
rel2.offset: -5 4;
rel2.relative: 1.0 0.0;
visible: 0;
fixed: 1 1;
offscale;
}
}
part { name: "tabtitle"; type: TEXT; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
color_class: "/fg/selected/term/tab/title/text";
text { font: "Sans:style=Bold"; size: 10;
align: 0.5 0.5;
min: 0 1;
text_source: "terminology.tab.title";
}
align: 0.5 0.5;
rel1 {
to_x: "tabgrouped";
to_y: "tabmiddle";
relative: 1.0 0.0;
offset: 2 0;
}
rel2 {
to_x: "tabclose";
to_y: "tabmiddle";
relative: 0.0 1.0;
}
visible: 0;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
description { state: "bell" 0.0;
inherit: "tab" 0.0;
}
}
program { name: "tab,bell,on";
signal: "tab,bell,on"; source: "terminology";
action: STATE_SET "bell" 0.0;
target: "tabtitle";
}
program { name: "tab,bell,off";
signal: "tab,bell,off"; source: "terminology";
action: STATE_SET "tab" 0.0;
target: "tabtitle";
}
part { name: "tablimit0"; type: SPACER;
scale: 1;
description { state: "default" 0.0;
rel1.to_y: "terminology.tab";
rel1.relative: 0.0 1.0;
rel2.to_y: "terminology.tab.title";
rel2.offset: -1 7;
align: 0.0 0.0;
fixed: 1 1;
offscale;
}
}
part { name: "tableft"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
rel2.to_x: "terminology.tab";
rel2.to_y: "tabmiddle";
rel2.relative: 0.0 1.0;
color: 0 0 0 0; // no cc
visible: 0;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "tabright"; type: RECT; mouse_events: 0;
description { state: "default" 0.0;
rel1.to: "terminology.tab";
rel1.relative: 1.0 0.0;
rel2.to_x: "terminology.tab_btn";
rel2.to_y: "tabmiddle";
rel2.relative: 0.0 1.0;
color: 0 0 0 0; // no cc
visible: 0;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "tabmiddle"; type: RECT;
description { state: "default" 0.0;
rel1.to: "terminology.tab";
rel2.to_x: "terminology.tab";
rel2.to_y: "tablimit0";
rel2.offset: -1 0;
color: 0 0 0 0; // no cc
align: 0.0 0.0;
visible: 0;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "tabclose";
scale: 1;
description { state: "default" 0.0;
aspect: 1.0 1.0; aspect_preference: BOTH;
align: 1.0 0.5;
image.normal: "tab_close";
rel1 {
to_y: "tabmiddle";
to_x: "tab_bevel_top3";
relative: 0.0 0.3;
offset: -9 0;
}
rel2 {
to_y: "tabmiddle";
to_x: "tab_bevel_top3";
relative: 0.0 0.7;
offset: -9 -1;
}
min: 15 15;
max: 15 15;
fixed: 1 1;
color_class: "/fg/selected/term/tab/title/close";
visible: 0;
offscale;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
color: 255 255 255 160; // no cc
visible: 1;
}
description { state: "over" 0.0;
inherit: "default" 0.0;
color: 255 255 255 255; // no cc
visible: 1;
}
}
program { signal: "mouse,in"; source: "tabclose";
action: STATE_SET "over" 0.0;
target: "tabclose";
}
program { signal: "mouse,out"; source: "tabclose";
action: STATE_SET "tab" 0.0;
target: "tabclose";
}
program { signal: "mouse,clicked,1"; source: "tabclose";
action: SIGNAL_EMIT "tab,close" "terminology";
}
program { signal: "mouse,move"; source: "tabmiddle";
script {
new y, h, drag_x, drag_w;
new state[31]; \
new Float:vl;
if (!get_mouse_buttons())
return;
get_state(PART:"tabdrag", state, 30, vl);
if (!strcmp(state, "hdrag,off")) {
emit("tab,drag,move", "terminology");
return
}
get_geometry(PART:"tabdrag", drag_x, y, drag_w, h);
if (drag_w > 0) {
new m_x, m_y;
new Float:mid;
new Float:d;
new Float:v1;
new Float:v2;
new Float:n;
get_mouse(m_x, m_y);
mid = m_x - drag_x;
mid = mid / drag_w;
get_drag(PART:"terminology.tabl", v1, n);
get_drag(PART:"terminology.tabr", v2, n);
d = (v2 - v1) / 2;
set_drag(PART:"terminology.tabl", mid - d, 0.0);
set_drag(PART:"terminology.tabr", mid + d, 0.0);
emit("tab,hdrag", "terminology");
}
}
}
program { signal: "mouse,down,1,double"; source: "tabmiddle";
action: SIGNAL_EMIT "tab,title" "terminology";
}
program { signal: "mouse,down,1"; source: "tabmiddle";
action: SIGNAL_EMIT "tab,mouse,down" "terminology";
}
program { signal: "mouse,up,1"; source: "tabmiddle";
action: SIGNAL_EMIT "tab,drag,stop" "terminology";
}
// }}}
////////////////////////////////////////////////////////////////////
// visual bell - spinning red siren light {{{
// XXX: make this a swallow
images.image: "circle-1200.png" COMP;
images.image: "strobe-600.png" COMP;
part { name: "bell_glow"; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
color: 255 80 60 0; // no cc
rel.to: "bell";
min: 1200 1200;
image.normal: "circle-1200.png";
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 80 60 128;
}
description { state: "done" 0.0;
inherit: "default" 0.0;
visible: 0;
color: 255 80 60 0;
min: 0 0;
}
}
part { name: "bell_glow2"; mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
color: 255 240 160 0; // no cc
rel.to: "bell";
min: 400 400;
image.normal: "circle-1200.png";
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 220 120 128;
}
description { state: "done" 0.0;
inherit: "default" 0.0;
visible: 0;
color: 255 220 120 0;
min: 0 0;
}
}
part { name: "bell_strobe";
mouse_events: 0;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
color: 255 255 200 0;
rel.to: "bell_glow2";
image.normal: "strobe-600.png";
rel1.relative: -0.5 -0.5;
rel2.relative: 1.5 1.5;
map {
on: 1;
smooth: 1;
rotation.center: "bell";
}
}
description { state: "spin" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 200 255;
map.rotation.z: 36.0;
}
description { state: "spin_done" 0.0;
inherit: "default" 0.0;
map.rotation.z: 720.0;
}
}
part { name: "bell";
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
color: 255 255 255 0;
max: 20 20;
min: 20 20;
align: 1.0 1.0;
rel1.offset: 15 15;
rel2.offset: -16 -16;
image.normal: "circle-1200.png";
offscale;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
program { signal: "bell,ring"; source: "terminology";
action: PLAY_SAMPLE "bell" 1.0 ALERT;
}
program { signal: "bell"; source: "terminology";
action: STATE_SET "default" 0.0;
target: "bell";
target: "bell_strobe";
target: "bell_glow";
target: "bell_glow2";
after: "bell";
}
program { name: "bell";
action: STATE_SET "visible" 0.0;
target: "bell_glow";
target: "bell_glow2";
after: "bell2";
}
program { name: "bell2";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.1;
target: "bell";
after: "bell3";
after: "bell3.1";
}
program { name: "bell3";
action: STATE_SET "spin" 0.0;
transition: LINEAR 0.1;
target: "bell_strobe";
after: "bell4.0";
after: "bell4.1";
}
program { name: "bell3.1";
action: STATE_SET "done" 0.0;
transition: DECELERATE 0.5;
target: "bell_glow";
target: "bell_glow2";
}
program { name: "bell4.0";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 1.2;
target: "bell";
}
program { name: "bell4.1";
action: STATE_SET "spin_done" 0.0;
transition: LINEAR 0.9;
target: "bell_strobe";
}
// }}}
////////////////////////////////////////////////////////////////////
// Drag target areas {{{
part { name: "drag_clip"; type: RECT;
description { state: "default" 0.0;
visible: 0;
fixed: 1 1;
}
description { state: "hdrag,off" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
#define DRAG_TARGET(DIR, ICON, REL_ONE, REL_TWO, ALIGN, OFF_ONE, OFF_TWO, MIN) \
part { name: "drag_"##DIR##"_outline"; type: RECT; \
mouse_events: 0; \
scale: 1; \
clip_to: "drag_clip"; \
description { state: "default" 0.0; \
rel.to: "viewregion"; \
rel1.relative: REL_ONE; \
rel1.offset: OFF_ONE; \
rel2.relative: REL_TWO; \
rel2.offset: OFF_TWO; \
align: ALIGN; \
min: MIN; \
color: 255 255 255 20; /* no cc */ \
color_class: "/bg/normal/term/drag/target"; \
offscale; \
fixed: 1 1; \
} \
description { state: "active" 0.0; \
inherit: "default" 0.0; \
color: 255 255 255 80; /* no cc */ \
color_class: "/bg/selected/term/drag/target"; \
} \
} \
part { name: "drag_"##DIR##"_icon"; \
scale: 1; \
clip_to: "drag_clip"; \
description { state: "default" 0.0; \
rel.to: "drag_"##DIR##"_outline"; \
min: 15 15; \
max: 15 15; \
image.normal: "icon-split-"##ICON##"-060.png"; \
color_class: "/fg/normal/term/drag/target"; \
fixed: 1 1; \
} \
description { state: "active" 0.0; \
inherit: "default" 0.0; \
color_class: "/fg/selected/term/drag/target"; \
} \
} \
program { signal: "drag_"##DIR##",on"; source: "terminology"; \
action: STATE_SET "active" 0.0; \
transition: LINEAR 0.2; \
target: "drag_"##DIR##"_outline"; \
target: "drag_"##DIR##"_icon"; \
} \
program { signal: "drag_"##DIR##",off"; source: "terminology"; \
action: STATE_SET "default" 0.0; \
transition: LINEAR 0.3; \
target: "drag_"##DIR##"_outline"; \
target: "drag_"##DIR##"_icon"; \
}
DRAG_TARGET(left, v, 0.0 0.0, 0.0 1.0, 0.0 0.5, 4 34, 4 -35, 25 25)
DRAG_TARGET(right, v, 1.0 0.0, 1.0 1.0, 1.0 0.5, -5 34, -5 -35, 25 25)
DRAG_TARGET(top, h, 0.0 0.0, 1.0 0.0, 0.5 0.0, 34 4, -35 4, 25 25)
DRAG_TARGET(bottom, h, 0.0 1.0, 1.0 1.0, 0.5 1.0, 34 -5, -35 -5, 25 25)
// }}}
////////////////////////////////////////////////////////////////////
// popup media over the terminal (until dismissed) {{{
// XXX: make this a swallow in the middle
part { name: "popmedia_clip"; type: RECT;
description { state: "default" 0.0;
fixed: 1 1;
visible: 0;
color: 255 255 255 0; // no cc
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255; // no cc
}
}
part { name: "popmedia_shadow";
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.popmedia";
image.normal: "pm_shadow.png";
image.border: 64 64 64 64;
image.border_scale_by: 0.2;
image.border_scale: 1;
rel1.offset: -12 -12;
rel2.offset: 11 11;
color: 0 0 0 128;
visible: 0;
offscale;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.offset: -64 -64;
rel2.offset: 63 63;
image.border_scale_by: 1.0;
visible: 1;
}
}
part { name: "popmedia_fill"; type: RECT;
mouse_events: 0;
description { state: "default" 0.0;
fixed: 1 1;
rel.to: "terminology.popmedia";
color: 48 48 48 255;
}
}
part { name: "terminology.popmedia"; type: SWALLOW;
clip_to: "popmedia_clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.relative: 0.5 0.5;
rel2.relative: 0.5 0.5;
visible: 0;
}
description { state: "image" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.1 0.1;
rel2.relative: 0.9 0.9;
visible: 1;
}
description { state: "scale" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.1 0.1;
rel2.relative: 0.9 0.9;
visible: 1;
}
description { state: "edje" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.1 0.1;
rel2.relative: 0.9 0.9;
visible: 1;
}
description { state: "movie" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.1 0.1;
rel2.relative: 0.9 0.9;
visible: 1;
}
}
part { name: "popmedia_dismiss"; type: RECT;
mouse_events: 1;
description { state: "default" 0.0;
fixed: 1 1;
color: 0 0 0 0; // no cc
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
program { signal: "mouse,clicked,*"; source: "popmedia_dismiss";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.3 USE_DURATION_FACTOR 1;
target: "terminology.popmedia";
target: "popmedia_clip";
target: "popmedia_dismiss";
target: "popmedia_shadow";
after: "popmedia_dismiss2";
}
program { name: "popmedia_dismiss2";
action: SIGNAL_EMIT "popmedia,done" "terminology";
}
program { signal: "popmedia,off"; source: "terminology";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "terminology.popmedia";
target: "popmedia_clip";
target: "popmedia_dismiss";
target: "popmedia_shadow";
after: "popmedia_dismiss2";
}
program { signal: "popmedia,image"; source: "terminology";
action: STATE_SET "image" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "terminology.popmedia";
}
program { signal: "popmedia,scale"; source: "terminology";
action: STATE_SET "scale" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "terminology.popmedia";
}
program { signal: "popmedia,edje"; source: "terminology";
action: STATE_SET "edje" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "terminology.popmedia";
}
program { signal: "popmedia,movie"; source: "terminology";
action: STATE_SET "movie" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "terminology.popmedia";
}
program { signal: "popmedia,image"; source: "terminology";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "popmedia_clip";
target: "popmedia_dismiss";
target: "popmedia_shadow";
}
program { signal: "popmedia,scale"; source: "terminology";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "popmedia_clip";
target: "popmedia_dismiss";
target: "popmedia_shadow";
}
program { signal: "popmedia,edje"; source: "terminology";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "popmedia_clip";
target: "popmedia_dismiss";
target: "popmedia_shadow";
}
program { signal: "popmedia,movie"; source: "terminology";
action: STATE_SET "visible" 0.0;
transition: DECELERATE 0.2 USE_DURATION_FACTOR 1;
target: "popmedia_clip";
target: "popmedia_dismiss";
target: "popmedia_shadow";
}
/* media busy */
// XXX: make this a swallow bottom-right
part { name: "busy_base"; type: SPACER;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
min: 40 40; max: 40 40;
align: 1.0 1.0;
rel1.offset: 4 4;
rel2.offset: -5 -5;
offscale;
}
}
BUSY("busy_base", "busy", "terminology", "done", "terminology")
// }}}
}
}