# check.tcl --
#
# This demonstration script creates a toplevel window containing
# several checkbuttons.
#
# RCS: @(#) $Id: check.tcl,v 1.1 1999/03/31 15:08:26 m-hirano Exp $

if {![info exists widgetDemo]} {
    error "This script should be run from the \"widget\" demo."
}

set w .check
catch {destroy $w}
toplevel $w
wm title $w "Checkbutton Demonstration"
wm iconname $w "check"
positionWindow $w

label $w.msg -font $font -wraplength 4i -justify left -text [langSel \
"Three checkbuttons are displayed below.  If you click on a button, it will toggle the button's selection state and set a Tcl variable to a value indicating the state of the checkbutton.  Click the \"See Variables\" button to see the current values of the variables." \
"下には 3 つのチェックボタンが表示されています。クリックするとボタンの選択状態が変わり、Tcl 変数にそのボタンの状態を示す値を設定します。現在の変数の値を見るには「変数参照」ボタンをクリックしてください。"]
pack $w.msg -side top

frame $w.buttons
pack $w.buttons -side bottom -fill x -pady 2m
button $w.buttons.dismiss -text [langSel Dismiss 了解] -command "destroy $w"
button $w.buttons.code -text [langSel "See Code" "コード参照"] -command "showCode $w"
button $w.buttons.vars -text [langSel "See Variables" "変数参照"]  \
	-command "showVars $w.dialog wipers brakes sober"
pack $w.buttons.dismiss $w.buttons.code $w.buttons.vars -side left -expand 1

checkbutton $w.b1 -text [langSel "Wipers OK" "ワイパー OK"] -variable wipers -relief flat
checkbutton $w.b2 -text [langSel "Brakes OK" "ブレーキ OK"] -variable brakes -relief flat
checkbutton $w.b3 -text [langSel "Driver Sober" "ドライバー素面"] -variable sober -relief flat
pack $w.b1 $w.b2 $w.b3 -side top -pady 2 -anchor w
