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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Westmount Technology    1994
  4. #
  5. #      File:           @(#)crfilestgd.tcl    1.3
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)crfilestgd.tcl    1.3   24 Jan 1996 Copyright 1994 Westmount Technology
  10.  
  11. # Start user added include file section
  12. require "crfiledefd.tcl"
  13. # End user added include file section
  14.  
  15. require "opendefobj.tcl"
  16.  
  17. Class CrFileStgDef : {OpenDefObject} {
  18.     constructor
  19.     method destructor
  20.     method infoList
  21.     method writeObject
  22.     method open
  23.     attribute fileQualifier
  24.     attribute fileName
  25.     attribute fileType
  26. }
  27.  
  28. constructor CrFileStgDef {class this name specification} {
  29.     set this [OpenDefObject::constructor $class $this $name $specification]
  30.     # Start constructor user section
  31.     $this smallIcon folder_16
  32.     $this largeIcon folder_32
  33.     # End constructor user section
  34.     return $this
  35. }
  36.  
  37. method CrFileStgDef::destructor {this} {
  38.     # Start destructor user section
  39.     # End destructor user section
  40.     $this OpenDefObject::destructor
  41. }
  42.  
  43. method CrFileStgDef::infoList {this} {
  44.     set list [$this OpenDefObject::infoList]
  45.     set list [concat $list \"Diagram Qualifier\"]
  46.     set list [concat $list \"[$this fileQualifier]\"]
  47.     set list [concat $list \"Diagram Name\"]
  48.     set list [concat $list \"[$this fileName]\"]
  49.     set list [concat $list \"Diagram Type\"]
  50.     set list [concat $list \"[$this fileType]\"]
  51.     return $list
  52. }
  53.  
  54. method CrFileStgDef::writeObject {this fid} {
  55.     set formatString "%-25s | %s | %-10s | %-10s | %s"
  56.     puts $fid [format $formatString [$this name] [$this type] \
  57.         [$this fileQualifier] [$this fileName] [$this fileType]]
  58. }
  59.  
  60. method CrFileStgDef::open {this} {
  61.     if {![$this editable]} {
  62.         return
  63.     }
  64.  
  65.     .main busy TRUE
  66.     set definer [[.main editorArea] crFileDefiner]
  67.     if {[catch {$definer load $this}]} {
  68.         set definer [CrFileDefDialog new .main.crFileDefiner]
  69.         [.main editorArea] crFileDefiner $definer
  70.         $definer load $this
  71.     }
  72.     .main busy FALSE
  73. }
  74.  
  75. # Do not delete this line -- regeneration end marker
  76.  
  77.