home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1996
- #
- # File: @(#)editselall.tcl /main/titanic/4
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)editselall.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 EditSelAllCmd : {UndoCommand} {
- constructor
- method destructor
- method do
- method redo
- method undo
- }
-
- constructor EditSelAllCmd {class this name} {
- set this [UndoCommand::constructor $class $this $name]
- # Start constructor user section
- set selectEntry [$this editMenu].selectall
- if [isCommand $selectEntry] {
- $this commandName [$selectEntry label]
- } else {
- $this commandName "Select All"
- }
- $this setUndoLabel undo
- # End constructor user section
- return $this
- }
-
- method EditSelAllCmd::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this UndoCommand::destructor
- }
-
- method EditSelAllCmd::do {this} {
- [$this objectSet] contents [[.main flatView] selectedSet]
- $this redo
- $this busy 0
- }
-
- method EditSelAllCmd::redo {this} {
- busy {
- set selectedSet ""
- foreach flatObj [[.main flatView] objectSet] {
- if {(! [$flatObj filteredOutState]) &&
- "[$flatObj browsUiObj]" != ""} {
- lappend selectedSet $flatObj
- }
- }
- [.main flatView] selectedSet $selectedSet
- .main selectionChanged
- }
- }
-
- method EditSelAllCmd::undo {this} {
- 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
-
-