?? embedded_com - introduction to uml statecharts.htm
字號:
}else{ var str = '\n<DIV id='+Homeboy.lyrName+' style="visibility: hidden; position:absolute; left:'+x+'; top:'+y+'; width:'+w str += '; height:'+(h+1)+'px; clip:rect(0px '+(w+1)+'px '+(h+1)+'px 0px)' str += '; background-color:'+((jsLAYERcreateLayer.arguments.length>5)?bColor:menuBcolor)+';z-Index:5;"> </DIV>'; document.body.insertAdjacentHTML("BeforeEnd",str); } Homeboy.jsLAYERobject=document.all[Homeboy.lyrName]; if(systemIsNS) { Homeboy.jsLAYERdocument =document.layers[Homeboy.lyrName].document; Homeboy.style =document.layers[Homeboy.lyrName]; }else{ Homeboy.jsLAYERdocument =document.all[Homeboy.lyrName]; Homeboy.style =document.all[Homeboy.lyrName].style; Homeboy.style.zIndex =systemMaxZ++; } Homeboy.jsLAYERobject.HomeBoy=Homeboy; Homeboy.jsLAYERobject.W =w; Homeboy.jsLAYERobject.X =x; Homeboy.jsLAYERobject.Y =y; Homeboy.jsLAYERobject.H =h; Homeboy.jsLAYERobject.MOUSEHANDLER="MOUSEVECTOR"; return Homeboy; }function jsLAYERsetHandler(Homeboy,szHANDLER) // named function for events { Homeboy.jsLAYERobject.MOUSEHANDLER=szHANDLER; MOUSECAPTURE(Homeboy,Homeboy.lyrName); }function jsLAYERhomeboy(layername){return document.all[layername].HomeBoy;}function jsLAYERopen(Homeboy){if(systemIsNS){Homeboy.jsLAYERobject.document.open(); }else{ Homeboy.jsLAYERobject.innerHTML="";}}function jsLAYERwrite(Homeboy,Text){if(systemIsNS){Homeboy.jsLAYERdocument.write(Text);}else{Homeboy.jsLAYERobject.innerHTML+=Text;}}function jsLAYERclose(Homeboy) { if(systemIsNS) { Homeboy.jsLAYERdocument.close(); MOUSECAPTURE(Homeboy,Homeboy.lyrName); } }function jsLAYERsetContent(Homeboy,text) { jsLAYERopen(Homeboy); jsLAYERwrite(Homeboy,text); jsLAYERclose(Homeboy);return; }function jsLAYERshow(Homeboy,vis){Homeboy.style.visibility=((vis)?"visible":"hidden");}function jsLAYERgetX(Homeboy){return parseInt(Homeboy.style.left);}function jsLAYERgetY(Homeboy){return parseInt(Homeboy.style.top);}function jsLAYERxy(Homeboy,x,y,InLayer) { this.InX=x;this.InY=y; if(document.layers) { if(InLayer) { InX+=InLayer.style.left; InY+=InLayer.style.top; } Homeboy.jsLAYERobject.x=this.InX; Homeboy.jsLAYERobject.y=this.InY; }else{ if(InLayer) { this.InX+=parseInt(document.all[Homeboy.lyrName].style.left); this.InY+=parseInt(document.all[Homeboy.lyrName].style.top); }//alert(document.all[Homeboy.lyrName].style.left+"[]"+this.InX+"[]"+x) document.all[Homeboy.lyrName].style.left=this.InX document.all[Homeboy.lyrName].style.top=this.InY } }/*Function :MEVENT**Parameters :Homeboy - Layer Class Pointer** Evt - javascript Browser Event**Description :Noramalizes Netscape/MSIE evnts to **a class containing variables for both, with Netscape names**superceding MSIE names. It is this psudeo event class that**is passed to all MOUSE... event handler functions.*/function MEVENT(Homeboy,Evt) //normalizes the differences in NS and MSIE events { this.type=Evt.type; this.screenX=Evt.screenX; this.screenY=Evt.screenY; if(systemIsNS) { this.pageX=Evt.pageX; this.pageY=Evt.pageY; this.locationX=Homeboy.jsLAYERobject.x; this.locationY=Homeboy.jsLAYERobject.y; this.layerX=Evt.layerX; this.layerY=Evt.layerY; this.which=Evt.which; this.target=Evt.target; this.modifiers=Evt.modifiers; }else{ this.pageX=Evt.x; this.pageY=Evt.y; if(document.body.scrollTop)this.pageY+=document.body.scrollTop; this.locationX=parseInt(Homeboy.jsLAYERobject.style.left); this.locationY=parseInt(Homeboy.jsLAYERobject.style.top); this.layerX=this.pageX-this.locationX; this.layerY=this.pageY-this.locationY; this.which=Evt.button+1; this.target=Evt.srcElement; this.modifiers=(((Evt.altKey)?1:0)+((Evt.ctrlKey)?2:0)+((Evt.AltKey)?4:0)); } }function MOUSEVECTOR(layername,Evt)// handles the actuall prep and call of mouse events { Homeboy=document.all[layername].HomeBoy;return false; }// Sets up mouse event NOTE: Use of "new Function" is importantfunction MOUSECAPTURE(Homeboy,layername) {var NFD="return "+Homeboy.jsLAYERobject.MOUSEHANDLER+"('"+layername+"',"+((systemIsNS)?"arguments[0]":"window.event")+")"Homeboy.jsLAYERobject.onmouseover=new Function(NFD)Homeboy.jsLAYERobject.onmouseout=new Function(NFD)Homeboy.jsLAYERdocument.onmousemove=new Function(NFD)Homeboy.jsLAYERdocument.onmousedown=new Function(NFD)Homeboy.jsLAYERdocument.onmouseup=new Function(NFD)if(systemIsNS)Homeboy.jsLAYERdocument.captureEvents( Event.MOUSEUP | Event.MOUSEDOWN | Event.MOUSEMOVE); }function NSResizePatch(){document.location.href=document.location.href;}function jsNULLvector(layername,Evt){return true;}var MPTYPE ="",MSTYPE ="";function jsMPANELvector(panelName,Evt) // Vectors mouse messages for the panel { Homeboy=jsLAYERhomeboy(panelName); if(menuTimeOut)clearTimeout(menuTimeOut); if(Evt.type=="mouseout" || Evt.type=="mouseover") { MPTYPE=Evt.type; if(MPTYPE==MSTYPE&&MPTYPE=="mouseout")menuTimeOut=setTimeout("menuPOPDN()",100); } if(Evt.type!="mousemove" )return false; EVENT=new MEVENT(Homeboy,Evt); EntryNum=0; EntryNotch=EVENT.layerY; if(EntryNotch) { EntryNotch-=(EntryNotch%(menuCharHeight+1)); EntryNum=(EntryNotch/(menuCharHeight+1)) } if(Homeboy.mParent.Items.length<=EntryNum)return true; lastEVENT=EVENT; if(Homeboy.mParent.EntryNum==EntryNum)return false;//if(!systemIsNS)//{//alert(EntryNum+"[]"+EntryNotch+"[]"+EVENT.layerY)//Homeboy.mParent.Items[EntryNum].RENDER)//} jsLAYERsetContent(Homeboy.mParent.mSELECT,Homeboy.mParent.Items[EntryNum].RENDER); jsLAYERxy(Homeboy.mParent.mSELECT,jsLAYERgetX(Homeboy),jsLAYERgetY(Homeboy)+(EntryNum*(menuCharHeight+1))); Homeboy.mParent.EntryNum=EntryNum; if(!menuSubAuto)return false; if(Homeboy.mParent.Items[EntryNum].ACTION.substring(0,1)=="@") { fakeEvt = new Object(); fakeEvt.type="mouseup"; jsMSELECTvector(Homeboy.mParent.mSELECT.lyrName,fakeEvt); } return false; }/*** Vectors mouse messages for the menu selector*/function jsMSELECTvector(panelName,Evt) { if(menuTimeOut)clearTimeout(menuTimeOut); if(Evt.type=="mouseout" || Evt.type=="mouseover") { MSTYPE=Evt.type; if(MPTYPE==MSTYPE&&MPTYPE=="mouseout")menuTimeOut=setTimeout("menuPOPDN()",100); Homeboy=jsLAYERhomeboy(panelName); return false; } if(Evt.type!="mouseup")return false; Homeboy=jsLAYERhomeboy(panelName); var action = Homeboy.mParent.Items[Homeboy.mParent.EntryNum].ACTION; if(menuCurrentPath.indexOf(Homeboy.jsLAYERobject.GROUP)>0) { var FindGroup = ":"+Homeboy.jsLAYERobject.GROUP+":"; var killList = menuCurrentPath.substring(menuCurrentPath.indexOf(FindGroup)+FindGroup.length-1); menuPOPDN(killList); } if(action.length<1){window.status="[Not Available]";return false;} var isMenu = action.substring(0,1)=="@"; var isJavascript = action.substring(0,1)=="!"; if(isJavascript) { eval(action.substring(1)) return false; } if(isMenu) { menuPOPUP(jsLAYERgetX(Homeboy)+Homeboy.jsLAYERobject.W+2,jsLAYERgetY(Homeboy),action.substring(1)); }else{ document.location.href=action; } return false; }/*** This is the menu panel*/function jsMPANELclass(group,entry,label,action,x,y,w,h) { this.lyrName =group+entry; if(!document.all[this.lyrName])jsLAYERcreateLayer(this,x,y,w,h,"#000000"); jsLAYERsetHandler(this,"jsMPANELvector"); this.jsLAYERobject.GROUP=group;this.jsLAYERobject.ENTRY=entry; this.jsLAYERobject.rtWidth=10; this.jsLAYERobject.rtSymbol="»"; }/*** This is the highlite bar*/function jsMSELECTclass(group,entry,label,action,x,y,w,h) { this.lyrName =group+entry; if(!document.all[this.lyrName])jsLAYERcreateLayer(this,x,y,w,h); jsLAYERsetHandler(this,"jsMSELECTvector"); this.jsLAYERobject.GROUP=group; this.jsLAYERobject.ENTRY=entry; this.jsLAYERobject.rtWidth=10; this.jsLAYERobject.rtSymbol="»"; }/*** Create the menu label obeject string for display*/function menuLABEL(Homeboy,text,isHighlight,isSub) { var fontstart="<FONT FACE='"+menuFont+"' SIZE="+menuFontSize+" COLOR='"+((isHighlight)?menuHTcolor:menuTcolor)+"'>"+((menuBold)?"<B>":""); var CONTENT=" "; if(text)CONTENT=text.length?" "+text:" "; var lyrtxt="<TABLE BORDER=0 CELLPADDING=0 STYLE='cursor:hand' CELLSPACING='0' BGCOLOR='"; lyrtxt+=((isHighlight)?menuHBcolor:menuBcolor); lyrtxt+="' WIDTH='"+Homeboy.jsLAYERobject.W+"' HEIGHT='"+menuCharHeight+"'><TR VALIGN=MIDDLE>"; twidth=parseInt(Homeboy.jsLAYERobject.W)-parseInt(Homeboy.jsLAYERobject.rtWidth); lyrtxt+="<TD WIDTH='"+twidth.toString(); lyrtxt+="'>"+fontstart+CONTENT+((menuBold)?"</B>":"")+"</FONT></TD>"; lyrtxt+="<TD WIDTH='10'>"+fontstart+((isSub)?menuSubSymbol:" ")+((menuBold)?"</B>":"")+"</FONT></TD></TR></TABLE>";
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -