|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
proc RunSample {w} { |
|
|
|
|
|
|
|
|
|
tixNoteBook $w.nb -ipadx 6 -ipady 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set hdd_img [image create compound -window [$w.nb subwidget nbframe] \ |
|
-pady 4 -padx 4 -bg #f09090 -showbackground 1] |
|
$hdd_img add line |
|
$hdd_img add text -text "Hard Disk" -underline 0 -padx 6 -pady 4 |
|
|
|
|
|
|
|
set net_img [image create compound -window [$w.nb subwidget nbframe] \ |
|
-pady 4 -pady 4 -bg #9090f0 -showbackground 1] |
|
$net_img add line |
|
$net_img add text -text "Network" -underline 0 -padx 6 -pady 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
$w.nb add hard_disk -image $hdd_img |
|
$w.nb add network -image $net_img |
|
pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top |
|
|
|
|
|
|
|
|
|
set f [$w.nb subwidget hard_disk] |
|
|
|
|
|
|
|
|
|
frame $f.f |
|
frame $f.common |
|
pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes |
|
pack $f.common -side right -padx 2 -pady 2 -fill y |
|
|
|
|
|
|
|
tixControl $f.f.a -value 12 -label "Access Time: " |
|
tixControl $f.f.w -value 400 -label "Write Throughput: " |
|
tixControl $f.f.r -value 400 -label "Read Throughput: " |
|
tixControl $f.f.c -value 1021 -label "Capacity: " |
|
pack $f.f.a $f.f.w $f.f.r $f.f.c -side top -padx 20 -pady 2 |
|
|
|
|
|
|
|
CreateCommonButtons $w $f.common |
|
|
|
|
|
|
|
|
|
set f [$w.nb subwidget network] |
|
|
|
frame $f.f |
|
frame $f.common |
|
pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes |
|
pack $f.common -side right -padx 2 -pady 2 -fill y |
|
|
|
tixControl $f.f.a -value 12 -label "Access Time: " |
|
tixControl $f.f.w -value 400 -label "Write Throughput: " |
|
tixControl $f.f.r -value 400 -label "Read Throughput: " |
|
tixControl $f.f.c -value 1021 -label "Capacity: " |
|
tixControl $f.f.u -value 10 -label "Users: " |
|
|
|
pack $f.f.a $f.f.w $f.f.r $f.f.c $f.f.u -side top -padx 20 -pady 2 |
|
|
|
CreateCommonButtons $w $f.common |
|
} |
|
|
|
proc CreateCommonButtons {w f} { |
|
button $f.ok -text OK -width 6 -command "destroy $w" |
|
button $f.cancel -text Cancel -width 6 -command "destroy $w" |
|
|
|
pack $f.ok $f.cancel -side top -padx 2 -pady 2 |
|
} |
|
|
|
if {![info exists tix_demo_running]} { |
|
wm withdraw . |
|
set w .demo |
|
toplevel $w; wm transient $w "" |
|
RunSample $w |
|
bind $w <Destroy> exit |
|
} |
|
|