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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cadre Technologies Inc.    1996
  4. #
  5. #      File:           @(#)filepropse.tcl    /main/3
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)filepropse.tcl    /main/3   5 Jun 1996 Copyright 1996 Cadre Technologies Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "fileprdbob.tcl"
  15. require "propertyse.tcl"
  16.  
  17. Class FilepropSection : {PropertySection FilePRDbObj} {
  18.     method destructor
  19.     constructor
  20.     method promoter
  21.     method edit
  22.     method makeFixed
  23.     method makeSelected
  24.     method uiName
  25.     method docTitle
  26. }
  27.  
  28. method FilepropSection::destructor {this} {
  29.     # Start destructor user section
  30.     # End destructor user section
  31.     $this PropertySection::destructor
  32.     $this FilePRDbObj::destructor
  33. }
  34.  
  35. constructor FilepropSection {class this name document} {
  36.     set this [FilePRDbObj::constructor $class $this $name]
  37.     set this [PropertySection::constructor $class $this $name $document]
  38.     return $this
  39. }
  40.  
  41. selfPromoter FilePRDbObj {this} {
  42.     set sysV [$this systemVersion]
  43.     if {"[[$sysV system] type]" != "document"} return
  44.     set editor [$sysV editor]
  45.     if {! [isCommand $editor]} return
  46.  
  47.     set editorName [$editor name]
  48.     set editorVersion [$editor version]
  49.     set class [Document::getClass $editorName $editorVersion Fileprop]
  50.  
  51.     if {$class != ""} {
  52.         $class promote $this $sysV
  53.     }
  54. }
  55.  
  56. method FilepropSection::promoter {this document} {
  57.     $this PropertySection::promoter $document
  58.  
  59.     $this uiType Fileprop
  60. }
  61.  
  62. method FilepropSection::edit {this} {
  63.     $this PropertySection::edit
  64. }
  65.  
  66. method FilepropSection::makeFixed {this} {
  67.     set cv [[$this document] configVersion]
  68.     $this status fixed $cv
  69. }
  70.  
  71. method FilepropSection::makeSelected {this} {
  72.     set cv [[$this document] configVersion]
  73.     $this status selected $cv
  74. }
  75.  
  76. method FilepropSection::uiName {this args} {
  77.     return [$this PropertySection::uiName $args]
  78. }
  79.  
  80. method FilepropSection::docTitle {this} {
  81.  
  82.     set title "Properties of file"
  83.     set file [$this referredFile]
  84.     if {! [$file isNil]} {
  85.         set title "$title '[$file name].[$file type]'"
  86.     } else {
  87.         set title "$title <unknown>"
  88.     }
  89.     return $title
  90. }
  91.  
  92. # Do not delete this line -- regeneration end marker
  93.  
  94.