GIF89a; EcchiShell v1.0
//usr/lib64/lib64/lib64/tcl8.5/Tix8.4.3/

1 || [tixGetBoolean $data(-allowzero)]} { # Take the button from the selected list # set newValue "" foreach item $data(-value) { if {$item != $button} { lappend newValue $item } } } } else { # This button was not selected # if {[tixGetBoolean $data(-radio)]} { # The button become the sole item in the list # set newValue [list $button] } else { # Add this button into the list # lappend newValue $button } } if {$newValue != $data(-value)} { tixSelect:SetValue $w $newValue } } #---------------------------------------------------------------------- # Private functions #---------------------------------------------------------------------- proc tixSelect:SetValue {w newValue {noUpdate 0}} { upvar #0 $w data set oldValue $data(-value) if {$data(-validatecmd) != ""} { set data(-value) [tixEvalCmdBinding $w $data(-validatecmd) "" $newValue] } else { if {[tixGetBoolean $data(-radio)] && [llength $newValue] > 1} { error "cannot choose more than one items in a radio box" } if {![tixGetBoolean $data(-allowzero)] && [llength $newValue] == 0} { error "empty selection not allowed" } set data(-value) $newValue } if {! $noUpdate} { tixVariable:UpdateVariable $w } # Reset all to be unselected # foreach item $data(items) { if {[lsearch $data(-value) $item] == -1} { # Is unselected # if {[lsearch $oldValue $item] != -1} { # was selected # -> popup the button, call command # $data(w:$item) config -relief raised -bg $data(buttonbg) tixSelect:CallCommand $w $item 0 } } else { # Is selected # if {[lsearch $oldValue $item] == -1} { # was unselected # -> push down the button, call command # $data(w:$item) config -relief sunken -bg $data(-selectedbg) tixSelect:CallCommand $w $item 1 } } } } proc tixSelect:CallCommand {w name value} { upvar #0 $w data if {!$data(-disablecallback) && $data(-command) != ""} { if {![info exists data(varInited)]} { set bind(specs) "name value" set bind(name) $name set bind(value) $value tixEvalCmdBinding $w $data(-command) bind $name $value } } } proc tixSelect:Destructor {w} { tixVariable:DeleteVariable $w # Chain this to the superclass # tixChainMethod $w Destructor }