home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
cbsetfilte.tcl
< prev
next >
Wrap
Text File
|
1996-05-29
|
3KB
|
105 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)cbsetfilte.tcl 1.4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)cbsetfilte.tcl 1.4 20 Mar 1996 Copyright 1994 Westmount Technology
# Start user added include file section
# End user added include file section
Class CBSetFilterElementDialog : {TemplateDialog} {
constructor
method destructor
method handleOkPressed
method popItUp
method filterFeaturesDialog
attribute currentFilterElement
attribute _filterFeaturesDialog
}
constructor CBSetFilterElementDialog {class this name} {
set this [TemplateDialog::constructor $class $this $name]
# Start constructor user section
$this config -okPressed {
%this handleOkPressed
%this delete
} \
-modal true
$this delHelpButton
interface DlgColumn $this.c {
CheckButton filterElemEnabled {
label "Enabled"
}
}
# End constructor user section
return $this
}
method CBSetFilterElementDialog::destructor {this} {
set ref [$this _filterFeaturesDialog]
if {$ref != ""} {
$ref _setFilterElemDialog ""
}
# Start destructor user section
# End destructor user section
}
method CBSetFilterElementDialog::handleOkPressed {this} {
set filterElem [$this currentFilterElement]
set propDef [$filterElem propDefinition]
$filterElem enabled [$this.c.filterElemEnabled state]
if {[$propDef ifClass] != "CheckButton"} {
$filterElem value [$this.c.text text]
} else {
set value [expr {([$this.c.chkBtn state] == 1) ? "1" : "0"}]
$filterElem value $value
}
[$this filterFeaturesDialog] updateFilterElemTextList
}
method CBSetFilterElementDialog::popItUp {this filterElem} {
$this currentFilterElement $filterElem
set propDef [$filterElem propDefinition]
$this title "Set Filter Element '[$propDef longName]'"
$this.c.filterElemEnabled state [$filterElem enabled]
if {[$propDef ifClass] != "CheckButton"} {
Label new $this.c.lab -text "Value:"
SingleLineText new $this.c.text \
-columnCount 30 \
-text [$filterElem value]
} else {
set state [expr {([$filterElem value] == "1") ? 1 : 0}]
CheckButton new $this.c.chkBtn -state $state \
-label [$propDef longName]
}
$this popUp
}
# Do not delete this line -- regeneration end marker
method CBSetFilterElementDialog::filterFeaturesDialog {this args} {
if {$args == ""} {
return [$this _filterFeaturesDialog]
}
set ref [$this _filterFeaturesDialog]
if {$ref != ""} {
$ref _setFilterElemDialog ""
}
set obj [lindex $args 0]
if {$obj != ""} {
$obj _setFilterElemDialog $this
}
$this _filterFeaturesDialog $obj
}