home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
editselinv.tcl
< prev
next >
Wrap
Text File
|
1996-10-15
|
2KB
|
85 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)editselinv.tcl /main/hindenburg/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)editselinv.tcl /main/hindenburg/2 15 Oct 1996 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "undocomman.tcl"
Class EditSelInvCmd : {UndoCommand} {
constructor
method destructor
method do
method redo
method undo
}
constructor EditSelInvCmd {class this name} {
set this [UndoCommand::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method EditSelInvCmd::destructor {this} {
# Start destructor user section
# End destructor user section
$this UndoCommand::destructor
}
method EditSelInvCmd::do {this} {
[$this objectSet] contents [[.main flatView] selectedSet]
$this redo
$this busy 0
}
method EditSelInvCmd::redo {this} {
busy {
set selectedSet ""
if {[[.main flatView] selectedSet] != [[$this objectSet] contents]} {
[$this objectSet] foreach flatObj {
if {! [$flatObj filteredOutState]} {
lappend selectedSet $flatObj
}
}
[.main flatView] selectedSet $selectedSet
}
foreach flatObj [[.main flatView] objectSet] {
if {(! [$flatObj filteredOutState]) &&
"[$flatObj browsUiObj]" != "" &&
(! [$flatObj selectState])} {
lappend selectedSet $flatObj
}
}
[.main flatView] selectedSet $selectedSet
.main selectionChanged
}
}
method EditSelInvCmd::undo {this} {
if {[[.main flatView] selectedSet] == [[$this objectSet] contents]} {
return
}
busy {
set selectedSet ""
[$this objectSet] foreach flatObj {
if {! [$flatObj filteredOutState]} {
lappend selectedSet $flatObj
}
}
[.main flatView] selectedSet $selectedSet
.main selectionChanged
}
}
# Do not delete this line -- regeneration end marker