home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
undocomman.tcl
< prev
next >
Wrap
Text File
|
1996-09-27
|
2KB
|
74 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)undocomman.tcl /main/hindenburg/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)undocomman.tcl /main/hindenburg/3 27 Sep 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
Class UndoCommand : {Object} {
constructor
method destructor
method toggleUndo
method addObject
method removeObject
attribute undone
attribute busy
attribute validAfterLevelChange
attribute objectSet
attribute currentObj
}
constructor UndoCommand {class this name} {
set this [Object::constructor $class $this $name]
$this undone 0
$this busy 1
$this validAfterLevelChange 0
$this objectSet [List new]
# Start constructor user section
if {! [isCommand [.main undoCommand]]} {
if [isCommand [.main currentObj]] {
$this currentObj [[.main currentObj] browsUiObj]
}
[.main undoButton] sensitive 1
}
# End constructor user section
return $this
}
method UndoCommand::destructor {this} {
# Start destructor user section
[.main undoButton] sensitive 0
# End destructor user section
}
method UndoCommand::toggleUndo {this} {
if [$this undone] {
$this redo
$this undone 0
} else {
$this undo
$this undone 1
}
}
# Do not delete this line -- regeneration end marker
method UndoCommand::addObject {this newObject} {
[$this objectSet] append $newObject
}
method UndoCommand::removeObject {this oldObject} {
[$this objectSet] removeValue $oldObject
}