home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
m4envdialo.tcl
< prev
next >
Wrap
Text File
|
1996-09-23
|
2KB
|
84 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)m4envdialo.tcl /main/titanic/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)m4envdialo.tcl /main/titanic/1 23 Sep 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
Class M4EnvDialog : {TemplateDialog} {
method destructor
constructor
method addToggle
method setLabelText
method addButton
method removeButton
attribute m4varList
attribute m4VarDes
attribute buttonSet
}
method M4EnvDialog::destructor {this} {
# Start destructor user section
# End destructor user section
}
constructor M4EnvDialog {class this name NrOfColumns} {
set this [TemplateDialog::constructor $class $this $name]
$this buttonSet [List new]
# create window
DlgColumn new $this.top
Label new $this.top.message -text "Meta4 Enviroment Box" -alignment CENTER
HorSeparator new $this.top.separator
Viewport new $this.top.vp -width 375 -height 300
DlgRow new $this.top.vp.row
for {set i 0} {$i < $NrOfColumns} {incr i 1} {
DlgColumn new $this.top.vp.row.col$i
}
# initialize attributes
$this modal yes
$this m4varList ""
return $this
}
method M4EnvDialog::addToggle {this name column m4var {state 0}} {
if [isCommand [$this m4VarDes]] {
set label "[[$this m4VarDes] getUiName $m4var]"
if {"$label" == ""} {
set label "$m4var"
}
} else {
set label "$m4var"
}
$this addButton [CheckButton new $this.top.vp.row.col$column.$name \
-label $label -state $state]
set tmpList [$this m4varList]
lappend tmpList "$m4var"
$this m4varList $tmpList
}
method M4EnvDialog::setLabelText {this labelText} {
$this.top.message text "$labelText"
}
# Do not delete this line -- regeneration end marker
method M4EnvDialog::addButton {this newButton} {
[$this buttonSet] append $newButton
}
method M4EnvDialog::removeButton {this oldButton} {
[$this buttonSet] removeValue $oldButton
}