home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
menudefine.tcl
< prev
next >
Wrap
Text File
|
1996-05-29
|
3KB
|
121 lines
#---------------------------------------------------------------------------
#
# (c) Westmount Technology 1994
#
# File: @(#)menudefine.tcl 1.8
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)menudefine.tcl 1.8 12 Mar 1996 Copyright 1994 Westmount Technology
# Start user added include file section
# End user added include file section
require "defstoredi.tcl"
Class MenuDefineDialog : {DefStoreDialog} {
constructor
method destructor
method createInterface
method clearInterface
method save
method objVisible
}
constructor MenuDefineDialog {class this name} {
set this [DefStoreDialog::constructor $class $this $name]
# Start constructor user section
$this helpPressed { .main helpOnName editMenuProperties }
# End constructor user section
return $this
}
method MenuDefineDialog::destructor {this} {
# Start destructor user section
# End destructor user section
$this DefStoreDialog::destructor
}
method MenuDefineDialog::createInterface {this} {
$this DefStoreDialog::createInterface
# add the visibility stuff
interface NamedGroup [$this sPage].visibleNG {
verStretchFactor 0
label Visible
DlgColumn DC {
CheckButton corporateCB { label Corporate}
CheckButton projectCB { label Project}
CheckButton configCB { label Configuration}
CheckButton phaseCB { label Phase}
CheckButton systemCB { label System}
}
}
}
method MenuDefineDialog::clearInterface {this} {
$this DefStoreDialog::clearInterface
[$this sPage].visibleNG.DC.corporateCB state 1
[$this sPage].visibleNG.DC.projectCB state 1
[$this sPage].visibleNG.DC.configCB state 1
[$this sPage].visibleNG.DC.phaseCB state 1
[$this sPage].visibleNG.DC.systemCB state 1
}
method MenuDefineDialog::save {this popDown} {
set newLevel [$this determineSpecLevel [$this objScope]]
set error [[$this curObject] check [$this objScope] [$this objVisible]\
$newLevel [[$this curObject] parent]]
if {$error != ""} {
wmtkerror "$error : object not saved"
} else {
if {[$this DefineDialog::save $popDown] == 1} {
# reset redefined attribute
[$this curObject] redefined 0
}
}
}
method MenuDefineDialog::objVisible {this args} {
if {$args == ""} {
set vis "[[$this sPage].visibleNG.DC.corporateCB state]"
set vis "$vis [[$this sPage].visibleNG.DC.projectCB state]"
set vis "$vis [[$this sPage].visibleNG.DC.configCB state]"
set vis "$vis [[$this sPage].visibleNG.DC.phaseCB state]"
set vis "$vis [[$this sPage].visibleNG.DC.systemCB state]"
return $vis
} else {
set count 0
set args [lvarpop args]
foreach i $args {
if {$count == 0} {
[$this sPage].visibleNG.DC.corporateCB state $i
}
if {$count == 1} {
[$this sPage].visibleNG.DC.projectCB state $i
}
if {$count == 2} {
[$this sPage].visibleNG.DC.configCB state $i
}
if {$count == 3} {
[$this sPage].visibleNG.DC.phaseCB state $i
}
if {$count == 4} {
[$this sPage].visibleNG.DC.systemCB state $i
}
incr count
}
}
}
# Do not delete this line -- regeneration end marker