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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Westmount Technology    1994
  4. #
  5. #      File:           @(#)fmbooksect.tcl    1.3
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)fmbooksect.tcl    1.3   21 Sep 1995 Copyright 1994 Westmount Technology
  10.  
  11. # Start user added include file section
  12. require "fmbookcong.tcl"
  13. # End user added include file section
  14.  
  15. require "fmsection.tcl"
  16.  
  17. Class FmBookSection : {FmSection} {
  18.     constructor
  19.     method destructor
  20.     method promoter
  21.     method generateTypeContents
  22.     method contentsGenerator
  23.     attribute _contentsGenerator
  24. }
  25.  
  26. constructor FmBookSection {class this name document} {
  27.     set this [FmSection::constructor $class $this $name $document]
  28.     # Start constructor user section
  29.     # End constructor user section
  30.     return $this
  31. }
  32.  
  33. method FmBookSection::destructor {this} {
  34.     set ref [$this _contentsGenerator]
  35.     if {$ref != ""} {
  36.         $ref _section ""
  37.     }
  38.     # Start destructor user section
  39.     # End destructor user section
  40.     $this FmSection::destructor
  41. }
  42.  
  43. method FmBookSection::promoter {this document} {
  44.     $this FmSection::promoter $document
  45.  
  46.     $this uiType Book
  47.     global classCount
  48.     $this _contentsGenerator \
  49.         [FmBookConGen new FmBookConGen$classCount $this]
  50.     incr classCount
  51.     set version [[[$this document] editor] version]
  52.     $this initContents fm${version}book.con
  53. }
  54.  
  55. method FmBookSection::generateTypeContents {this} {
  56.  
  57.     [$this contentsGenerator] generate
  58. }
  59.  
  60. # Do not delete this line -- regeneration end marker
  61.  
  62. method FmBookSection::contentsGenerator {this args} {
  63.     if {$args == ""} {
  64.         return [$this _contentsGenerator]
  65.     }
  66.     set ref [$this _contentsGenerator]
  67.     if {$ref != ""} {
  68.         $ref _section ""
  69.     }
  70.     set obj [lindex $args 0]
  71.     if {$obj != ""} {
  72.         $obj _section $this
  73.     }
  74.     $this _contentsGenerator $obj
  75. }
  76.  
  77.