head	1.5;
access;
symbols
	core-8-5-9:1.5
	core-8-5-8:1.5
	macosx-cocoa-merge:1.5
	macosx-cocoa-premerge:1.5
	macosx-carbon-freeze:1.5
	core-8-5-7:1.5
	core-8-5-6:1.5
	core-8-6-b1:1.5
	core-8-6-a3:1.5
	core-8-5-5:1.5
	core-8-6-a2:1.5
	core-8-5-4:1.5
	core-8-5-3:1.5
	core-8-6-a1:1.5
	core-8-4-19:1.4
	core-8-5-branch:1.5.0.6
	core-8-5-2:1.5
	core-8-4-18:1.4
	core-8-5-1:1.5
	core-8-4-17:1.4
	core-8-5-0:1.5
	core-8-5-b3:1.5
	core-8-5-b2:1.5
	core-8-4-16:1.4
	core-8-5-b1:1.5
	core-stablilizer-merge:1.5
	core-stabilizer-branch:1.5.0.4
	core-stabilizer-merge:1.5
	core-8-4-15:1.4
	core-8-5-a6:1.5
	core-8-5-a5:1.5
	core-8-4-14:1.4
	core-8-5-a4:1.5
	core-8-4-13:1.4
	core-8-4-12:1.4
	core-8-4-11:1.4
	core-8-5-a3:1.5
	core-8-4-10:1.4
	core-8-4-9-branch:1.4.0.4
	core-8-5-a2:1.5
	core-8-4-9:1.4
	core-8-4-8:1.4
	core-8-4-7:1.4
	core-8-5-a1:1.5
	core-8-4-6:1.4
	core-8-4-5:1.4
	mistachkin-dev-branch:1.5.0.2
	core-8-4-4:1.4
	core-8-4-3:1.4
	core-8-4-branch:1.4.0.2
	core-8-4-2:1.4
	core-8-4-1:1.4
	core-8-3-5:1.2.18.1
	core-8-4-0:1.4
	macosx-8-4-merge-2002-08-31-trunk:1.4
	macosx-8-4-premerge-2002-08-31-branch:1.2.24.1
	macosx-8-4-premerge-2002-08-31-trunk:1.4
	macosx-8-4-merge-2002-08-30-branch:1.2.24.1
	macosx-8-4-merge-2002-08-30-trunk:1.4
	macosx-8-4-merge-2002-08-20-branch:1.2.24.1
	macosx-8-4-merge-2002-08-20-trunk:1.4
	core-8-4-b2:1.4
	core-8-4-b1:1.4
	macosx-premerge-6-9-02:1.2.24.1
	core-8-4-a4:1.4
	core-8-3-4:1.2.18.1
	macosx-8-4-branch:1.2.0.24
	macosx-8-4-branchpoint:1.2
	core-8-4-a3:1.2
	core-8-3-3:1.2
	dgp-privates-into-namespace:1.2.0.22
	tclpro-1-5-0:1.2
	core-8-4-win-speedup:1.2.0.20
	core-8-4-a2:1.2
	tclpro-1-4-1:1.2
	tclpro-1-4-0:1.2
	core-8-3-2:1.2
	ajuba-ajuba2-2-1-base:1.2
	ajuba-ajuba2-2-0:1.2
	core-8-4-a1:1.2
	core-8-3-1-branch:1.2.0.18
	core-8-3-1:1.2
	scriptics-sc-2-0-b5:1.2
	scriptics-sc-2-0-fixed:1.2
	scriptics-sc-2-0-b2:1.2
	scriptics-sc-2-0-b1:1.2
	core-8-3-0:1.2
	core-8-3-b2:1.2
	core-8-3-b1:1.2
	scriptics-sc-1-1:1.2
	scriptics-sc-1-1-b1:1.2
	core-8-2-3:1.2
	scriptics-sc-1-1-branch:1.2.0.16
	scriptics-sc-1-1-base:1.2
	scriptics-sc-1-0:1.2
	scriptics-sc-1-0-branch:1.2.0.14
	scriptics-sc-1-0-base:1.2
	core-8-2-2:1.2
	core-8-2-1:1.2
	scriptics-bc-1-0-b1:1.2
	core-8-2-1-branch:1.2.0.12
	scriptics-tclpro-1-3-0:1.2
	core-8-2-0:1.2
	core-8-2-b3-branch:1.2.0.10
	core-8-2-b3-base:1.2
	scriptics-tclpro-1-3-b4:1.2
	core-8-2-b2:1.2
	scriptics-tclpro-1-3-b3:1.2
	core-8-2-b1:1.2
	scriptics-tclpro-1-3-b2:1.2
	merge-to-mainline-5/21/99:1.2
	scriptics-tclpro-1-3-b2-branch:1.2.0.8
	core-8-1-1:1.2
	scriptics-tclpro-1-3-b1:1.2
	core-8-1-1-base:1.2
	core-8-1-0:1.2
	merge-to-mainline-4-29-99:1.2
	merge-to-mainline-4-23-99:1.2
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.1
	core-8-1-b2:1.1.4.1
	dev-8-1-stubs-branch:1.1.4.1.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.2
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.5
date	2003.09.30.14.54.30;	author dkf;	state Exp;
branches;
next	1.4;

1.4
date	2001.11.05.10.13.53;	author dkf;	state Exp;
branches;
next	1.3;

1.3
date	2001.10.30.10.17.07;	author dkf;	state Exp;
branches;
next	1.2;

1.2
date	98.09.14.18.23.29;	author stanton;	state Exp;
branches
	1.2.18.1
	1.2.20.1
	1.2.24.1;
next	1.1;

1.1
date	98.04.01.09.54.29;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.17.49;	author stanton;	state Exp;
branches;
next	;

1.2.18.1
date	2001.10.12.10.56.13;	author dkf;	state Exp;
branches;
next	;

1.2.20.1
date	2002.04.02.20.58.50;	author hobbs;	state Exp;
branches;
next	;

1.2.24.1
date	2002.02.05.02.25.16;	author wolfsuit;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Added [package require] to demos. [FRQ 815118]
@
text
@#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@@"}

# ixset --
# A nice interface to "xset" to change X server settings
#
# History :
#   91/11/23 : pda@@masi.ibp.fr, jt@@ratp.fr : design
#   92/08/01 : pda@@masi.ibp.fr : cleaning
#
# RCS: @@(#) $Id: ixset,v 1.4 2001/11/05 10:13:53 dkf Exp $

package require Tcl 8.4
package require Tk

#
# Button actions
#

proc quit {} {
    destroy .
}

proc ok {} {
    writesettings
    quit
}

proc cancel {} {
    readsettings
    dispsettings
    .buttons.apply configure -state disabled
    .buttons.cancel configure -state disabled
}

proc apply {} {
    writesettings
    .buttons.apply configure -state disabled
    .buttons.cancel configure -state disabled
}

#
# Read current settings
#

proc readsettings {} {
    global kbdrep ;	set kbdrep	"on"
    global kbdcli ;	set kbdcli	0
    global bellvol ;	set bellvol	100
    global bellpit ;	set bellpit	440
    global belldur ;	set belldur	100
    global mouseacc ;	set mouseacc	"3/1"
    global mousethr ;	set mousethr	4
    global screenbla ;	set screenbla	"blank"
    global screentim ;	set screentim	600
    global screencyc ;	set screencyc	600

    set xfd [open "|xset q" r]
    while {[gets $xfd line] > -1} {
	switch -- [lindex $line 0] {
	    auto {
		set rpt [lindex $line 1]
		if {$rpt eq "repeat:"} {
		    set kbdrep [lindex $line 2]
		    set kbdcli [lindex $line 6]
		}
	    }
	    bell {
		set bellvol [lindex $line 2]
		set bellpit [lindex $line 5]
		set belldur [lindex $line 8]
	    }
	    acceleration: {
		set mouseacc [lindex $line 1]
		set mousethr [lindex $line 3]
	    }
	    prefer {
		set bla [lindex $line 2]
		set screenbla [expr {$bla eq "yes" ? "blank" : "noblank"}]
	    }
	    timeout: {
		set screentim [lindex $line 1]
		set screencyc [lindex $line 3]
	    }
	}
    }
    close $xfd

    # puts stdout [format "Key REPEAT = %s\n" $kbdrep]
    # puts stdout [format "Key CLICK  = %s\n" $kbdcli]
    # puts stdout [format "Bell VOLUME = %s\n" $bellvol]
    # puts stdout [format "Bell PITCH = %s\n" $bellpit]
    # puts stdout [format "Bell DURATION = %s\n" $belldur]
    # puts stdout [format "Mouse ACCELERATION = %s\n" $mouseacc]
    # puts stdout [format "Mouse THRESHOLD = %s\n" $mousethr]
    # puts stdout [format "Screen BLANCK = %s\n" $screenbla]
    # puts stdout [format "Screen TIMEOUT = %s\n" $screentim]
    # puts stdout [format "Screen CYCLE = %s\n" $screencyc]
}


#
# Write settings into the X server
#

proc writesettings {} {
    global kbdrep kbdcli  bellvol bellpit belldur
    global mouseacc mousethr  screenbla screentim screencyc

    set bellvol		[.bell.vol get]
    set bellpit		[.bell.val.pit.entry get]
    set belldur		[.bell.val.dur.entry get]

    if {$kbdrep eq "on"} {
	set kbdcli	[.kbd.val.cli get]
    } else {
	set kbdcli	"off"
    }

    set mouseacc	[.mouse.hor.acc.entry get]
    set mousethr	[.mouse.hor.thr.entry get]

    set screentim	[.screen.tim.entry get]
    set screencyc	[.screen.cyc.entry get]

    exec xset \
	b $bellvol $bellpit $belldur \
	c $kbdcli \
	r $kbdrep \
	m $mouseacc $mousethr \
	s $screentim $screencyc \
	s $screenbla
}


#
# Sends all settings to the window
#

proc dispsettings {} {
    global kbdrep kbdcli  bellvol bellpit belldur
    global mouseacc mousethr  screenbla screentim screencyc

    .bell.vol set $bellvol
    .bell.val.pit.entry delete 0 end
    .bell.val.pit.entry insert 0 $bellpit
    .bell.val.dur.entry delete 0 end
    .bell.val.dur.entry insert 0 $belldur

    .kbd.val.onoff [expr {$kbdrep eq "on" ? "select" : "deselect"}]
    .kbd.val.cli set $kbdcli

    .mouse.hor.acc.entry delete 0 end
    .mouse.hor.acc.entry insert 0 $mouseacc
    .mouse.hor.thr.entry delete 0 end
    .mouse.hor.thr.entry insert 0 $mousethr

    .screen.blank [expr {$screenbla eq "blank" ? "select" : "deselect"}]
    .screen.pat   [expr {$screenbla ne "blank" ? "select" : "deselect"}]
    .screen.tim.entry delete 0 end
    .screen.tim.entry insert 0 $screentim
    .screen.cyc.entry delete 0 end
    .screen.cyc.entry insert 0 $screencyc
}


#
# Create all windows, and pack them
#

proc labelentry {path text length {range {}}} {
    frame $path
    label $path.label -text $text
    if {[llength $range]} {
	spinbox $path.entry -width $length -relief sunken \
		-from [lindex $range 0] -to [lindex $range 1]
    } else {
	entry $path.entry -width $length -relief sunken
    }
    pack $path.label -side left
    pack $path.entry -side right -expand y -fill x
}

proc createwindows {} {
    #
    # Buttons
    #

    frame .buttons
    button .buttons.ok	   -default active -command ok     -text "Ok"    
    button .buttons.apply  -default normal -command apply  -text "Apply" \
	    -state disabled
    button .buttons.cancel -default normal -command cancel -text "Cancel" \
	    -state disabled
    button .buttons.quit   -default normal -command quit   -text "Quit"  

    pack .buttons.ok .buttons.apply .buttons.cancel .buttons.quit \
	    -side left -expand yes -pady 5

    bind . <Return> {.buttons.ok   flash; .buttons.ok   invoke}
    bind . <Escape> {.buttons.quit flash; .buttons.quit invoke}
    bind . <1> {
	if {![string match .buttons* %W]} {
	    .buttons.apply  configure -state normal
	    .buttons.cancel configure -state normal
	}
    }
    bind . <Key> {
	if {![string match .buttons* %W]} {
	    switch -glob %K {
		Return - Escape - Tab - *Shift* {}
		default {
		    .buttons.apply  configure -state normal
		    .buttons.cancel configure -state normal
		}
	    }
	}
    }

    #
    # Bell settings
    #

    labelframe .bell -text "Bell Settings" -padx 1.5m -pady 1.5m
    scale .bell.vol \
	    -from 0 -to 100 -length 200 -tickinterval 20 \
	    -label "Volume (%)" -orient horizontal

    frame .bell.val
    labelentry .bell.val.pit "Pitch (Hz)"    6 {25 20000}
    labelentry .bell.val.dur "Duration (ms)" 6 {1 10000}
    pack .bell.val.pit -side left -padx 5
    pack .bell.val.dur -side right -padx 5
    pack .bell.vol .bell.val -side top -expand yes

    #
    # Keyboard settings
    #

    labelframe .kbd -text "Keyboard Repeat Settings" -padx 1.5m -pady 1.5m

    frame .kbd.val
    checkbutton .kbd.val.onoff \
	    -text "On" \
	    -onvalue "on" -offvalue "off" -variable kbdrep \
	    -relief flat
    scale .kbd.val.cli \
	    -from 0 -to 100 -length 200 -tickinterval 20 \
	    -label "Click Volume (%)" -orient horizontal
    pack .kbd.val.onoff -side left -fill x -expand yes -padx {0 1m}
    pack .kbd.val.cli -side left -expand yes -fill x -padx {1m 0}

    pack .kbd.val -side top -expand yes -pady 2 -fill x

    #
    # Mouse settings
    #

    labelframe .mouse -text "Mouse Settings" -padx 1.5m -pady 1.5m

    frame .mouse.hor
    labelentry .mouse.hor.acc "Acceleration" 5
    labelentry .mouse.hor.thr "Threshold (pixels)" 3 {1 2000}

    pack .mouse.hor.acc -side left -padx {0 1m}
    pack .mouse.hor.thr -side right -padx {1m 0}

    pack .mouse.hor -side top -expand yes

    #
    # Screen Saver settings
    #

    labelframe .screen -text "Screen-saver Settings" -padx 1.5m -pady 1.5m

    radiobutton .screen.blank \
	    -variable screenblank -text "Blank" -relief flat \
	    -value "blank" -variable screenbla -anchor w
    radiobutton .screen.pat \
	    -variable screenblank -text "Pattern" -relief flat \
	    -value "noblank" -variable screenbla -anchor w
    labelentry .screen.tim "Timeout (s)" 5 {1 100000}
    labelentry .screen.cyc "Cycle (s)" 5 {1 100000}

    grid .screen.blank .screen.tim -sticky e
    grid .screen.pat   .screen.cyc -sticky e
    grid configure .screen.blank .screen.pat -sticky ew

    #
    # Main window
    #

    pack .buttons -side top -fill both
    pack .bell .kbd .mouse .screen -side top -fill both -expand yes \
	    -padx 1m -pady 1m

    #
    # Let the user resize our window
    #
    wm minsize . 10 10
}

##############################################################################
# Main program

#
# Listen what "xset" tells us...
#

readsettings

#
# Create all windows
#

createwindows

#
# Write xset parameters
#

dispsettings

#
# Now, wait for user actions...
#

# Local Variables:
# mode: tcl
# End:
@


1.4
log
@Minor fixes from wohnivec@@iol.cz  Thanks!
@
text
@d12 4
a15 1
# RCS: @@(#) $Id: ixset,v 1.3 2001/10/30 10:17:07 dkf Exp $
d61 6
a66 31
	set kw [lindex $line 0]

	case $kw in {
	    {auto}
		{
		    set rpt [lindex $line 1]
		    if {[expr "{$rpt} == {repeat:}"]} then {
			set kbdrep [lindex $line 2]
			set kbdcli [lindex $line 6]
		    }
		}
	    {bell}
		{
		    set bellvol [lindex $line 2]
		    set bellpit [lindex $line 5]
		    set belldur [lindex $line 8]
		}
	    {acceleration:}
		{
		    set mouseacc [lindex $line 1]
		    set mousethr [lindex $line 3]
		}
	    {prefer}
		{
		    set bla [lindex $line 2]
		    set screenbla [expr "{$bla} == {yes} ? {blank} : {noblank}"]
		}
	    {timeout:}
		{
		    set screentim [lindex $line 1]
		    set screencyc [lindex $line 3]
d68 18
d115 1
a115 1
    if {[expr "{$kbdrep} == {on}"]} then {
d151 1
a151 1
    .kbd.val.onoff [expr "{$kbdrep} == {on} ? {select} : {deselect}"]
d159 2
a160 2
    .screen.blank [expr "{$screenbla}=={blank} ? {select} : {deselect}"]
    .screen.pat   [expr "{$screenbla}!={blank} ? {select} : {deselect}"]
@


1.3
log
@More demo upgrades derived from 8.3.4 and using new features
@
text
@d3 1
a3 1
exec wish8.4 "$0" ${1+"$@@"} || exec wish "$0" ${1+"$@@"}
d12 1
a12 1
# RCS: @@(#) $Id: ixset,v 1.2 1998/09/14 18:23:29 stanton Exp $
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d3 1
a3 1
exec wish "$0" "$@@"
d12 1
a12 1
# RCS: @@(#) $Id$
d30 2
d34 5
a38 2
# apply is just "writesettings"

d128 2
a129 2
    set screentim	[.screen.val.le.tim.entry get]
    set screencyc	[.screen.val.le.cyc.entry get]
d163 6
a168 6
    .screen.val.rb.blank [expr "{$screenbla}=={blank} ? {select} : {deselect}"]
    .screen.val.rb.pat   [expr "{$screenbla}!={blank} ? {select} : {deselect}"]
    .screen.val.le.tim.entry delete 0 end
    .screen.val.le.tim.entry insert 0 $screentim
    .screen.val.le.cyc.entry delete 0 end
    .screen.val.le.cyc.entry insert 0 $screencyc
d176 1
a176 1
proc labelentry {path text length} {
d179 8
a186 3
    entry $path.entry -width $length -relief sunken
    pack $path.label -side left -expand y
    pack $path.entry -side right -expand y
d195 6
a200 4
    button .buttons.ok		-command "ok"			-text "Ok"
    button .buttons.apply	-command "writesettings"	-text "Apply"
    button .buttons.cancel	-command "cancel"		-text "Cancel"
    button .buttons.quit	-command "quit"			-text "Quit"
d205 20
d229 1
a229 2
    frame .bell -relief raised -borderwidth 2
    label .bell.label	-text "Bell Settings"
d235 2
a236 2
    labelentry .bell.val.pit "Pitch (Hz)"    6
    labelentry .bell.val.dur "Duration (ms)" 6
d239 1
a239 1
    pack .bell.label .bell.vol .bell.val -side top -expand yes
d245 1
a245 3
    frame .kbd -relief raised -borderwidth 2

    label .kbd.label -text "Keyboard Repeat Settings"
d255 2
a256 2
    pack .kbd.val.onoff -side left -expand yes -fill both
    pack .kbd.val.cli -side left -expand yes
a257 1
    pack .kbd.label -side top -expand yes
d264 1
a264 1
    frame .mouse -relief raised -borderwidth 2
a265 1
    label .mouse.label -text "Mouse Settings"
d267 2
a268 2
    labelentry .mouse.hor.acc "Acceleration" 3
    labelentry .mouse.hor.thr "Threshold (pixels)" 3
d270 2
a271 2
    pack .mouse.hor.acc -side left
    pack .mouse.hor.thr -side right
a272 1
    pack .mouse.label -side top
d279 1
a279 1
    frame .screen -relief raised -borderwidth 2
d281 1
a281 5
    label .screen.label -text "Screen-saver Settings"
    frame .screen.val

    frame .screen.val.rb
    radiobutton .screen.val.rb.blank \
d283 2
a284 2
	    -value "blank" -variable screenbla
    radiobutton .screen.val.rb.pat \
d286 7
a292 11
	    -value "noblank" -variable screenbla
    pack .screen.val.rb.blank .screen.val.rb.pat -side top -pady 2 -anchor w
    frame .screen.val.le
    labelentry .screen.val.le.tim "Timeout (s)" 5
    labelentry .screen.val.le.cyc "Cycle (s)" 5
    pack .screen.val.le.tim .screen.val.le.cyc -side top -pady 2 -anchor e

    pack .screen.val.rb .screen.val.le -side left

    pack .screen.label -side top
    pack .screen.val -side top -expand y
d299 2
a300 1
    pack .bell .kbd .mouse .screen -side top -fill both -ipady 5 -expand yes
d332 4
@


1.2.20.1
log
@sync with head
@
text
@d3 1
a3 1
exec wish "$0" ${1+"$@@"}
d12 1
a12 1
# RCS: @@(#) $Id: ixset,v 1.4 2001/11/05 10:13:53 dkf Exp $
a29 2
    .buttons.apply configure -state disabled
    .buttons.cancel configure -state disabled
d32 2
a33 5
proc apply {} {
    writesettings
    .buttons.apply configure -state disabled
    .buttons.cancel configure -state disabled
}
d123 2
a124 2
    set screentim	[.screen.tim.entry get]
    set screencyc	[.screen.cyc.entry get]
d158 6
a163 6
    .screen.blank [expr "{$screenbla}=={blank} ? {select} : {deselect}"]
    .screen.pat   [expr "{$screenbla}!={blank} ? {select} : {deselect}"]
    .screen.tim.entry delete 0 end
    .screen.tim.entry insert 0 $screentim
    .screen.cyc.entry delete 0 end
    .screen.cyc.entry insert 0 $screencyc
d171 1
a171 1
proc labelentry {path text length {range {}}} {
d174 3
a176 8
    if {[llength $range]} {
	spinbox $path.entry -width $length -relief sunken \
		-from [lindex $range 0] -to [lindex $range 1]
    } else {
	entry $path.entry -width $length -relief sunken
    }
    pack $path.label -side left
    pack $path.entry -side right -expand y -fill x
d185 4
a188 6
    button .buttons.ok	   -default active -command ok     -text "Ok"    
    button .buttons.apply  -default normal -command apply  -text "Apply" \
	    -state disabled
    button .buttons.cancel -default normal -command cancel -text "Cancel" \
	    -state disabled
    button .buttons.quit   -default normal -command quit   -text "Quit"  
a192 20
    bind . <Return> {.buttons.ok   flash; .buttons.ok   invoke}
    bind . <Escape> {.buttons.quit flash; .buttons.quit invoke}
    bind . <1> {
	if {![string match .buttons* %W]} {
	    .buttons.apply  configure -state normal
	    .buttons.cancel configure -state normal
	}
    }
    bind . <Key> {
	if {![string match .buttons* %W]} {
	    switch -glob %K {
		Return - Escape - Tab - *Shift* {}
		default {
		    .buttons.apply  configure -state normal
		    .buttons.cancel configure -state normal
		}
	    }
	}
    }

d197 2
a198 1
    labelframe .bell -text "Bell Settings" -padx 1.5m -pady 1.5m
d204 2
a205 2
    labelentry .bell.val.pit "Pitch (Hz)"    6 {25 20000}
    labelentry .bell.val.dur "Duration (ms)" 6 {1 10000}
d208 1
a208 1
    pack .bell.vol .bell.val -side top -expand yes
d214 3
a216 1
    labelframe .kbd -text "Keyboard Repeat Settings" -padx 1.5m -pady 1.5m
d226 2
a227 2
    pack .kbd.val.onoff -side left -fill x -expand yes -padx {0 1m}
    pack .kbd.val.cli -side left -expand yes -fill x -padx {1m 0}
d229 1
d236 1
a236 1
    labelframe .mouse -text "Mouse Settings" -padx 1.5m -pady 1.5m
d238 1
d240 2
a241 2
    labelentry .mouse.hor.acc "Acceleration" 5
    labelentry .mouse.hor.thr "Threshold (pixels)" 3 {1 2000}
d243 2
a244 2
    pack .mouse.hor.acc -side left -padx {0 1m}
    pack .mouse.hor.thr -side right -padx {1m 0}
d246 1
d253 1
a253 1
    labelframe .screen -text "Screen-saver Settings" -padx 1.5m -pady 1.5m
d255 5
a259 1
    radiobutton .screen.blank \
d261 2
a262 2
	    -value "blank" -variable screenbla -anchor w
    radiobutton .screen.pat \
d264 11
a274 7
	    -value "noblank" -variable screenbla -anchor w
    labelentry .screen.tim "Timeout (s)" 5 {1 100000}
    labelentry .screen.cyc "Cycle (s)" 5 {1 100000}

    grid .screen.blank .screen.tim -sticky e
    grid .screen.pat   .screen.cyc -sticky e
    grid configure .screen.blank .screen.pat -sticky ew
d281 1
a281 2
    pack .bell .kbd .mouse .screen -side top -fill both -expand yes \
	    -padx 1m -pady 1m
a312 4

# Local Variables:
# mode: tcl
# End:
@


1.2.24.1
log
@Merge with current TOT
Added support for the wm stackorder command
Fixed crash when selecting Menu items in the Application menu that we didn't
put there.
Added first bits of the use of CG for low-level drawing.  The line-drawing works,
the rest doesn't yet.  You have to set the file static useCGDrawing to 1 and
rebuild to activate this code.
@
text
@d3 1
a3 1
exec wish "$0" ${1+"$@@"}
d12 1
a12 1
# RCS: @@(#) $Id: ixset,v 1.2 1998/09/14 18:23:29 stanton Exp $
a29 2
    .buttons.apply configure -state disabled
    .buttons.cancel configure -state disabled
d32 2
a33 5
proc apply {} {
    writesettings
    .buttons.apply configure -state disabled
    .buttons.cancel configure -state disabled
}
d123 2
a124 2
    set screentim	[.screen.tim.entry get]
    set screencyc	[.screen.cyc.entry get]
d158 6
a163 6
    .screen.blank [expr "{$screenbla}=={blank} ? {select} : {deselect}"]
    .screen.pat   [expr "{$screenbla}!={blank} ? {select} : {deselect}"]
    .screen.tim.entry delete 0 end
    .screen.tim.entry insert 0 $screentim
    .screen.cyc.entry delete 0 end
    .screen.cyc.entry insert 0 $screencyc
d171 1
a171 1
proc labelentry {path text length {range {}}} {
d174 3
a176 8
    if {[llength $range]} {
	spinbox $path.entry -width $length -relief sunken \
		-from [lindex $range 0] -to [lindex $range 1]
    } else {
	entry $path.entry -width $length -relief sunken
    }
    pack $path.label -side left
    pack $path.entry -side right -expand y -fill x
d185 4
a188 6
    button .buttons.ok	   -default active -command ok     -text "Ok"    
    button .buttons.apply  -default normal -command apply  -text "Apply" \
	    -state disabled
    button .buttons.cancel -default normal -command cancel -text "Cancel" \
	    -state disabled
    button .buttons.quit   -default normal -command quit   -text "Quit"  
a192 20
    bind . <Return> {.buttons.ok   flash; .buttons.ok   invoke}
    bind . <Escape> {.buttons.quit flash; .buttons.quit invoke}
    bind . <1> {
	if {![string match .buttons* %W]} {
	    .buttons.apply  configure -state normal
	    .buttons.cancel configure -state normal
	}
    }
    bind . <Key> {
	if {![string match .buttons* %W]} {
	    switch -glob %K {
		Return - Escape - Tab - *Shift* {}
		default {
		    .buttons.apply  configure -state normal
		    .buttons.cancel configure -state normal
		}
	    }
	}
    }

d197 2
a198 1
    labelframe .bell -text "Bell Settings" -padx 1.5m -pady 1.5m
d204 2
a205 2
    labelentry .bell.val.pit "Pitch (Hz)"    6 {25 20000}
    labelentry .bell.val.dur "Duration (ms)" 6 {1 10000}
d208 1
a208 1
    pack .bell.vol .bell.val -side top -expand yes
d214 3
a216 1
    labelframe .kbd -text "Keyboard Repeat Settings" -padx 1.5m -pady 1.5m
d226 2
a227 2
    pack .kbd.val.onoff -side left -fill x -expand yes -padx {0 1m}
    pack .kbd.val.cli -side left -expand yes -fill x -padx {1m 0}
d229 1
d236 1
a236 1
    labelframe .mouse -text "Mouse Settings" -padx 1.5m -pady 1.5m
d238 1
d240 2
a241 2
    labelentry .mouse.hor.acc "Acceleration" 5
    labelentry .mouse.hor.thr "Threshold (pixels)" 3 {1 2000}
d243 2
a244 2
    pack .mouse.hor.acc -side left -padx {0 1m}
    pack .mouse.hor.thr -side right -padx {1m 0}
d246 1
d253 1
a253 1
    labelframe .screen -text "Screen-saver Settings" -padx 1.5m -pady 1.5m
d255 5
a259 1
    radiobutton .screen.blank \
d261 2
a262 2
	    -value "blank" -variable screenbla -anchor w
    radiobutton .screen.pat \
d264 11
a274 7
	    -value "noblank" -variable screenbla -anchor w
    labelentry .screen.tim "Timeout (s)" 5 {1 100000}
    labelentry .screen.cyc "Cycle (s)" 5 {1 100000}

    grid .screen.blank .screen.tim -sticky e
    grid .screen.pat   .screen.cyc -sticky e
    grid configure .screen.blank .screen.pat -sticky ew
d281 1
a281 2
    pack .bell .kbd .mouse .screen -side top -fill both -expand yes \
	    -padx 1m -pady 1m
a312 4

# Local Variables:
# mode: tcl
# End:
@


1.2.18.1
log
@Updates to demos
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: ixset,v 1.2 1998/09/14 18:23:29 stanton Exp $
a312 4

# Local Variables:
# mode: tcl
# End:
@


1.1
log
@Initial revision
@
text
@d12 1
a12 1
# SCCS: @@(#) ixset 1.7 96/02/16 10:49:19
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d12 1
a12 1
# RCS: @@(#) $Id: ixset,v 1.2 1998/09/14 18:23:29 stanton Exp $
@


