📄 taskbar.gml
字号:
#ifndef taskbar_gml
#define taskbar_gml
#ifndef TASKH
#define TASKH 24
#endif
<sys import=,$.\menu.gml>
<style>
.TaskIcon:text{
font=Webdings,20,20,800;
anti=1;
color=#CCFFFF;
src=8;
filltext={bar(0,0,40,40,#09999F);Circlelight(6,6,13,#FFFFCC);Circlelight(6,6,5,#FFFFFF);};
bk=shadow(#006666,250,0,0,2);
clip=0;
ctrl=loopt(1,alpha,0,255,12,20);
OnCreate={<: eve=size>};
OnSize={<: if=(x>0)?{xpos=*x}:{xpos=(pid.width+x)}>};
}
.SndValBtn:img{
size=18,9;
drawcmd={Glint(0,0,width/2,height/2,#E0E7E0,#7F7F7F);rect(0,0,width,height,#7F7F7F);
rect(3,3,width-3,height-3,#7F7F7F);
};
alphacmd={bar(0,0,width,height,#FFFFFF);bar(4,4,width-4,height-4,0);};
addframe=1;
zorder=10;
pos=1,1;
cursor=movev;
TrParam=vertpos(&desktop,sndval,0,1000,1,-54);
OnMouseOver={<: bk=shadow(白,230,0,0,3,2)>};
OnMouseOut={<: bk=null>};
OnLButtonDown={<: cursor=movel2;TrParam=follow_mouse;bk=shadow(黄,230,0,0,2)>};
OnLButtonUp={<: cursor=movev;TrParam=normal;bk=null>}
}
.SysSndVal:div{
size=20,64;
pid=desktop;
bk=btnup();
draw=2:{wv();line(4,4,4,height-4,R240G240B240);line(4,4,width-4,4,R240G240B240);
line(width-4,4,4,height-4,R120G120B120);}
OnCreate={<: pbtnid=new SndValBtn;paramctrl=timer(100,RegMouse);
>};
OnRegMouse={<: mousemsg=1;>};
OnLButtonDownEnd={<: if=(1-ifmouseover)?{mousemsg=0;del=1}>};
OnClick={<: pbtnid.TrParam=moveto($[mousepos]);>}
}
.IconSpeak:TaskIcon{
OnClick={<SysSndVal pos=$[srcpos];ypos=ypos-height>};
//OnLButtonUp={<SysSndVal pos=$[srcpos];ypos=ypos-height>};
}
.TaskBtn:img{
bk=null;
size=16,16;
OnMouseOver={<: bk=shadow(#33CC00,255,0,0,1)>};
OnMouseOut={<: bk=null>};
OnCreate={<: plink=*txt[0];peve=*txt[1];stxt=*txt[2];simg=*txt[3];sx=*txt[4];sy=*txt[5];
xpos=*sx;ypos=*sy;src=*simg>};
OnClick={<: plink.eve=$[peve]>};
}
.IconTurn:TaskIcon{
// OnMouseOver={<: bk=shadow(#00CCCC,255,0,0,1)>};
// OnMouseOut={<: if=(b>0)?{bk=shadow(#00CC00,255,0,0,1)}:{bk=null}>};
// ifchged(b)={<: if=(b>0)?{bk=shadow(#00CC00,255,0,0,1)}:{bk=null}>};
b=1;
OnClick={<: b=(1-b);num=*pc[];while(num>0){
pc[num-1].show=b;num=(num-1)}>};
}
.IconWeb:TaskIcon{
ingml="ming.htm";
nick=论坛;
OnClick=openGmlWnd(id,ingml,nick,740,580);
}
.IconStart:TaskIcon{
OnLButtondown={<: paramCtrl=loopcmd(1,20,1,{<: &desktop.guidebarid.startmenuid.eve=showme;>});>};
}
.guidebarmenu:menu{
zorder=top;
OnCreate={<: &desktop.guidebarid.$[idname]=$[id];>};
//draw corder
draw={wv();rect(-1,-1,width+1,height+1,#D6D2CE);};
Onshowme={<: pid.ypos=&desktop.guidebarid.ypos-pid.height;pid.show=1;>};
Onhidme={<: >};
Ongetmmsg=null;
}
.guidebarmenudiv:menu{
pos=5,100;
zorder=top;show=1;size=6,6;OnClick={};
OnLButtonDownEnd={<: show=0;>};OnRButtonDownEnd={<: show=0;>};
bk=round4_3(#CCFFFF,6,#CCFFFF);
autosubpos=vert(3,3,1,1);
OnCreate={<guidebarmenu idname=$[idname];bk=null;></guidebarmenu>
<menu_item_close>
<: pid=desktop;mousemsg=1;show=0;xpos=5;>
}
// Onshowme={<: enumsub={<: eve=setsize;>};show=1;>};
Onhidme={<: >};
Ongetmmsg=null;
}
.guidebar:div{
bk=color(gray);
pid=desktop;height=25;
OnSize={<: width=pid.width;ypos=pid.height-height;>};
OnCreate#startbtn={<:desktop guidebarid=$[id];>
<img src=$.\imgs\btn_start.bmp;size=48,20;pos=2,2;OnLButtondown={<: paramCtrl=loopcmd(1,20,1,{<: &desktop.guidebarid.startmenuid.eve=showme;>});>};>
<guidebarmenudiv idname=startmenuid;
show=1;
></guidebarmenudiv>
};
}
.linefire:atomsys{
clip=0;
color=#AAAAFF;
hicolor=#EEEEFF;
wind=10,0;
randforword=0,2;
OnUpdate={<: newatom=rand(width-40)+20,0,3,12,95,10,98>}:6;
}
.TaskBar:div{
pid.ptaskbar=*id;
// bk=$.\..\imgs\misc\taskbk.gif#3,3;
bk=round4_3(#99999A,2,#333366,-1,-1);
size=pid.width,#(TASKH);
pos=0,pid.height-height;
OnSize={<: size=pid.width,#(TASKH);pos=0,pid.height-height;enumsub={<: eve=size>}>};
// draw#b={bar(0,0,width,height,#0099CC);line(0,height-3,width,height-3,#FFCC66);}
OnLButtonDown={};
OnLButtonUp={};
OnRButtonDown={};
OnRButtonUp={};
OnCreate#l={<linefire pos=pid.xpos,-1;rect=0,-40,pid.width,40;>};
bstart=1;
bweb=1;
OnCreate={<: &desktop.guidebarid=*id;
if=(bstart==1)?{<Btn src="开始";pos=2,1;
OnLButtondown={<: paramCtrl=loopcmd(1,20,1,{<: &desktop.guidebarid.startmenuid.eve=showme;>});>};>}:{<Btn src="关闭";pos=2,1;OnClick={<: pid.pid.myid.eve=退出>}>};
if=(bweb==1)?{<IconWeb src=?;x=-140;pid.piweb=*id>};
>
<guidebarmenudiv idname=startmenuid;></guidebarmenudiv>
};
OnAddIcon={<TaskBtn txt=$[ep]>};
class=MyTask;
eve=size;path=stepin(0,40,8);
}
</style>
<TaskBar>
<IconSpeak src=X;x=-90>
<IconTurn src=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -