home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / editdesela.tcl < prev    next >
Text File  |  1996-10-15  |  2KB  |  65 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1996
  4. #
  5. #      File:           @(#)editdesela.tcl    /main/hindenburg/2
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)editdesela.tcl    /main/hindenburg/2   15 Oct 1996 Copyright 1996 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "undocomman.tcl"
  15.  
  16. Class EditDeselAllCmd : {UndoCommand} {
  17.     constructor
  18.     method destructor
  19.     method do
  20.     method redo
  21.     method undo
  22. }
  23.  
  24. constructor EditDeselAllCmd {class this name} {
  25.     set this [UndoCommand::constructor $class $this $name]
  26.     # Start constructor user section
  27.     # End constructor user section
  28.     return $this
  29. }
  30.  
  31. method EditDeselAllCmd::destructor {this} {
  32.     # Start destructor user section
  33.     # End destructor user section
  34.     $this UndoCommand::destructor
  35. }
  36.  
  37. method EditDeselAllCmd::do {this} {
  38.     [$this objectSet] contents [[.main flatView] selectedSet]
  39.     $this redo
  40.     $this busy 0
  41. }
  42.  
  43. method EditDeselAllCmd::redo {this} {
  44.     busy {
  45.     [.main flatView] selectedSet ""
  46.     .main selectionChanged
  47.     }
  48. }
  49.  
  50. method EditDeselAllCmd::undo {this} {
  51.     busy {
  52.     set selectedSet ""
  53.     [$this objectSet] foreach flatObj {
  54.         if {! [$flatObj filteredOutState]} {
  55.         lappend selectedSet $flatObj
  56.         }
  57.     }
  58.     [.main flatView] selectedSet $selectedSet
  59.     .main selectionChanged
  60.     }
  61. }
  62.  
  63. # Do not delete this line -- regeneration end marker
  64.  
  65.