home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
editselinv.tcl
< prev
next >
Wrap
Text File
|
1997-08-29
|
2KB
|
92 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)editselinv.tcl /main/titanic/4
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)editselinv.tcl /main/titanic/4 29 Aug 1997 Copyright 1996 Cadre Technologies 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
set invertEntry [$this editMenu].invertselection
if [isCommand $invertEntry] {
$this commandName [$invertEntry label]
} else {
$this commandName "Invert Selection"
}
$this setUndoLabel undo
# 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 {[isCommand $flatObj] && (! [$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 {[isCommand $flatObj] && (! [$flatObj filteredOutState])} {
lappend selectedSet $flatObj
}
}
[.main flatView] selectedSet $selectedSet
.main selectionChanged
}
}
# Do not delete this line -- regeneration end marker