zIRCk Final Project — File Browser
zIRCkFinalProjectv2.5 / zIRCkFinalProjectv2.5 / System / script1.mrc
script1.mrc — 3.64 KB — Download this file
[SCRIPT]
NAME=Toolbar
VERSION=2.5
; ## Toolbar (large)
; ## [AFX] 2005
; ## Toolbar command
alias tb {
if (!$1) && (!$2-) {
$iif(!$dialog(tb),dialog -m tb tb,dialog -v tb)
}
elseif ($1 = off) {
if ($dialog(tb)) { hdock -udock tb | dialog -x tb }
}
elseif ($1 = tbxps) && ($2 = on) {
conf Display XPBScheme on
}
elseif ($1 = tbxps) && ($2 = off) {
conf Display XPBScheme off
}
elseif ($1 = tbbkg) && ($2 = on) {
conf Display XPBkg on
}
elseif ($1 = tbbkg) && ($2 = off) {
conf Display XPBkg off
}
}
; ## Close toolbar
alias tb_close {
hdock -udock tb close
hdock -showtb
}
; ## Show bandwidth information
alias tb_band {
if ($dialog(tb)) {
did -ra tb 6 $_band_dn
did -ra tb 7 $_band_dn $+ KB
did -ra tb 9 $_band_up
did -ra tb 10 $_band_up $+ KB
}
}
alias tb_bandcheck {
if ($rconf(Display,BandMeter) = on) {
did -v tb 4,5,6,7,8,9,10
$iif(!$timer(tb),.timertb 0 1 tb_band)
.signal sz resize
}
elseif ($rconf(Display,BandMeter) = off) {
did -h tb 4,5,6,7,8,9,10
$iif($timer(tb),.timertb off)
}
}
; ## Toolbar dialog/dialog events
dialog tb {
title "bleh"
size 0 0 35000 $iif(%size = b,24,16)
option dbu
list 1, 6 3 260 20, size
button "Button", 2, 1 3 2 11, disable
box "", 3, -4 -3 35000 54
text "", 4, 491 3 86 19
text "DN:", 5, 481 4 19 8
text "", 6, 500 4 28 8
text "0KB", 7, 556 3 18 8
text "UP:", 8, 481 4 19 8
text "", 9, 500 4 28 8
text "0KB", 10, 556 3 18 8
}
on *:dialog:tb:init:0: {
mdx MarkDialog $dname
mdx SetControlMDX $dname 1 Toolbar flat arrows nodivider wrap list > $bars
mdx SetControlMDX $dname 6,9 Progressbar smooth > $ctl
did -a $dname 6,9 BarColor $color($color(normal text))
did -a $dname 6,9 BGColor $color($color(background))
mdx SetFont $dname 1 -11 700 Tahoma
mdx SetFont $dname 5,8 -10 700 Tahoma
mdx SetFont $dname 7,10 -10 400 Tahoma
mdx SetBorderStyle $dname 1,6,9
mdx SetBorderStyle $dname 4 staticedge
mdx SetColor $dname 4,5,7,8,10 background $color($color(background))
mdx SetColor $dname 4,5,7,8,10 textbg $color($color(background))
mdx SetColor $dname 4,5,7,8,10 text $color($color(normal text))
tb_refresh
mdx MoveControl tb 2 1 6 4 38
if ($rconf(Display,XPBScheme) = on) { did -i tb 1 1 setscheme $rgb(110,110,110) $rgb(110,110,110) }
if ($rconf(Display,XPBkg) = on) { mdx SetDialog $dname bgcolor $rgb(215,211,208) | mdx SetColor $dname 1 background $rgb(215,211,208) }
_toolbar.s
$iif(!$timer(tb),.timertb 0 1 tb_band)
tb_bandcheck
hdock -hidetb
hdock -dock $dialog(tb) top 48
.signal sz resize
}
on *:dialog:tb:sclick:1: {
var %s = $did($dname,1).sel
if %s = 2 {
if ($scid($activecid).status = connecting || $scid($activecid).status = connected ) { scid $activecid disconnect }
else {
scid $activecid server
.timer -m 1 1 load.sb
}
_toolbar.s
scid $activecid .timer -m 1 1 load.sb
did -f $dname 2
scid $activecid window -a "status window"
}
elseif %s = 4 { dodialog config }
elseif %s = 6 { dodialog mods }
elseif %s = 7 { zamp }
elseif %s = 8 { kte.load }
elseif %s = 10 {
if (+xca iswm $gettok($did($dname,1).seltext,1,32)) {
conf Display Sidepane on
sidepane
}
elseif (+ca iswm $gettok($did($dname,1).seltext,1,32)) {
conf Display Sidepane off
sidepane -x
}
}
elseif %s = 12 { run $shortfn($mircdir) }
elseif %s = 13 { zirckhelp }
elseif %s = 14 { dodialog about }
}
on *:dialog:tb:dclick:1: { if ($did($dname,1).sel = 2) { favservs } }