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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Westmount Technology    1994
  4. #
  5. #      File:           @(#)separatorn.tcl    1.8
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)separatorn.tcl    1.8   11 Mar 1996 Copyright 1994 Westmount Technology
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "childnode.tcl"
  15.  
  16. Class SeparatorNode : {ChildNode} {
  17.     constructor
  18.     method destructor
  19.     method open
  20. }
  21.  
  22. constructor SeparatorNode {class this name specification} {
  23.     set this [ChildNode::constructor $class $this $name $specification]
  24.     # Start constructor user section
  25.     $this config -displayName Separator -icon separator_16 \
  26.         -activeIcon separator_16 -activated {%this open}
  27.     # End constructor user section
  28.     return $this
  29. }
  30.  
  31. method SeparatorNode::destructor {this} {
  32.     # Start destructor user section
  33.     # End destructor user section
  34.     $this ChildNode::destructor
  35. }
  36.  
  37. method SeparatorNode::open {this} {
  38.  
  39.     if {![$this editable]} {
  40.         return
  41.     }
  42.  
  43.     .main busy TRUE
  44.     set definer [[.main editorArea] separatorDefiner]
  45.  
  46.     if {[catch {$definer load $this}]} {
  47.         require separatord.tcl
  48.         set definer [SeparatorDialog new .main.separatorDefiner]
  49.         [.main editorArea] separatorDefiner $definer
  50.         $definer load $this
  51.     }
  52.     .main busy FALSE
  53. }
  54.  
  55. # Do not delete this line -- regeneration end marker
  56.  
  57.