|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
proc RunSample {w} { |
|
set top [frame $w.f -bd 1 -relief raised] |
|
set box [tixButtonBox $w.b -bd 1 -relief raised] |
|
|
|
pack $box -side bottom -fill both |
|
pack $top -side top -fill both -expand yes |
|
|
|
|
|
|
|
|
|
tixListNoteBook $top.n -ipadx 6 -ipady 6 |
|
|
|
set img0 [tix getimage harddisk] |
|
set img1 [tix getimage network] |
|
|
|
$top.n subwidget hlist add hard_disk -itemtype imagetext \ |
|
-image $img0 -text "Hard Disk" -under 0 |
|
$top.n subwidget hlist add network -itemtype imagetext \ |
|
-image $img1 -text "Network" -under 0 |
|
|
|
$top.n add hard_disk |
|
$top.n add network |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set name [tixOptionName $w] |
|
option add *$name*TixControl*entry.width 10 |
|
option add *$name*TixControl*label.width 18 |
|
option add *$name*TixControl*label.anchor e |
|
|
|
set f [$top.n subwidget hard_disk] |
|
|
|
tixControl $f.a -value 12 -label "Access Time: " |
|
tixControl $f.w -value 400 -label "Write Throughput: " |
|
tixControl $f.r -value 400 -label "Read Throughput: " |
|
tixControl $f.c -value 1021 -label "Capacity: " |
|
pack $f.a $f.w $f.r $f.c -side top -padx 20 -pady 2 |
|
|
|
set f [$top.n subwidget network] |
|
|
|
tixControl $f.a -value 12 -label "Access Time: " |
|
tixControl $f.w -value 400 -label "Write Throughput: " |
|
tixControl $f.r -value 400 -label "Read Throughput: " |
|
tixControl $f.c -value 1021 -label "Capacity: " |
|
tixControl $f.u -value 10 -label "Users: " |
|
|
|
pack $f.a $f.w $f.r $f.c $f.u -side top -padx 20 -pady 2 |
|
|
|
pack $top.n -expand yes -fill both -padx 5 -pady 5 |
|
|
|
|
|
|
|
$box add ok -text Ok -command "destroy $w" -width 6 |
|
$box add cancel -text Cancel -command "destroy $w" -width 6 |
|
} |
|
|
|
|
|
|
|
|
|
|
|
if {![info exists tix_demo_running]} { |
|
wm withdraw . |
|
set w .demo |
|
toplevel $w; wm transient $w "" |
|
RunSample $w |
|
bind $w <Destroy> exit |
|
} |
|
|