'; termStringEnd=''; } else if (termSubDivs) { for (var r=0; r s+='\n' }; termStringStart=' '; termStringEnd=''; }; writeElement(termDiv,s); setDivXY(termDiv,conf_term_x,conf_term_y); setDivVisibility(termDiv,1); window.status='' }
function termDisplay(r) { var s=termStringStart; var curStyle=0; for (var i=0; i var c=term[r][i]; var cs=termStyle[r][i]; if (cs!=curStyle) { if (curStyle) { for (var k=termStyles.length-1; k>=0; k--) { var st=termStyles[k]; if (curStyle&st) s+=termStyleClose[st]; } }; curStyle=cs; for (var k=0; k var st=termStyles[k]; if (curStyle&st) s+=termStyleOpen[st]; } }; s+= (termSpecials[c])? termSpecials[c] : String.fromCharCode(c); }; if (curStyle>0) { for (var k=termStyles.length-1; k>=0; k--) { var st=termStyles[k]; if (curStyle&st) s+=termStyleClose[st]; } }; s+=termStringEnd; writeElement('term_'+r,s,termDocNS4) }
function termGuiReady() { ready=true; if (termGuiElementReady(termDiv, self.document)) { for (var r=0; r if (termGuiElementReady('term_'+r,termDocNS4)==false) { ready=false; break } } } else ready=false; return ready }
function cursorKbdLeft() { keyHandler({which:28}) }
function cursorKbdRight() { keyHandler({which:29}) }
function termKbdBackspace() { keyHandler({which:8}) }
function termKbdEsc() { keyHandler({which:27}) }
function termKbdClear() { if ((!cnslLock) && (!cnslRawMode)) cnslReset(); }
// UI-button repeat
function repeatSet(cmd,on) { if (repeatTimer) clearTimeout(repeatTimer); repeatTimer=setTimeout('repeatDo("'+cmd+'")',conf_repeat_delay1); }
function repeatClear() { if (repeatTimer) clearTimeout(repeatTimer); }
function repeatDo(cmd) { if (repeatTimer) clearTimeout(repeatTimer); if (cmd=='left') cursorKbdLeft() else if (cmd=='right') cursorKbdRight() else if (cmd=='backspace') termKbdBackspace(); repeatTimer=setTimeout('repeatDo("'+cmd+'")',conf_repeat_delay2); }
// basic dynamics
function writeElement(e,t,d) { if (document.layers) { var doc=(d)? d : self.document; doc.layers[e].document.open(); doc.layers[e].document.write(t); doc.layers[e].document.close() } else if (document.getElementById) { var obj=document.getElementById(e); obj.innerHTML=t } else if (document.all) { document.all[e].innerHTML=t } }
function setDivXY(d,x,y) { if (document.layers) { document.layers[d].moveTo(x,y) } else if (document.getElementById) { var obj=document.getElementById(d); obj.style.left=x+'px'; obj.style.top=y+'px' } else if (document.all) { document.all[d].style.left=x+'px'; document.all[d].style.top=y+'px' } }
function setDivVisibility(d,v) { if (document.layers) { document.layers[d].visibility= (v)? 'show':'hide'; } else if (document.getElementById) { var obj=document.getElementById(d); obj.style.visibility= (v)? 'visible':'hidden'; } else if (document.all) { document.all[d].style.visibility= (v)? 'visible':'hidden'; } }
function termGuiElementReady(e,d) { if (document.layers) { var doc=(d)? d : self.document; return ((doc) && (doc.layers[e]))? true:false } else if (document.getElementById) { return (document.getElementById(e))? true:false } else if (document.all) { return (document.all[e])? true:false } else return false }
//eof
|
|