home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1994
- #
- # File: @(#)diagramsec.tcl /main/hindenburg/1
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)diagramsec.tcl /main/hindenburg/1 16 Jul 1996 Copyright 1994 Westmount Technology
-
- # Start user added include file section
- # End user added include file section
-
- require "filerefsec.tcl"
-
- Class DiagramSection : {FileRefSection} {
- constructor
- method destructor
- method promoter
- method print
- method preview
- method updateDocDir
- method docType
- }
-
- constructor DiagramSection {class this name document} {
- set this [FileRefSection::constructor $class $this $name $document]
- # Start constructor user section
- # End constructor user section
- return $this
- }
-
- method DiagramSection::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this FileRefSection::destructor
- }
-
- method DiagramSection::promoter {this document} {
- $this FileRefSection::promoter $document
-
- $this operationClass import
- }
-
- method DiagramSection::print {this} {
-
- # print the converted one
- set cmd [list \
- "[m4_var get M4_ps_printer] [$this docLocation]" \
- [$this uiName] \
- ]
- $this execute "$cmd"
- }
-
- method DiagramSection::preview {this} {
-
- # preview the converted one
- set cmd [list \
- "previewer [$this docType]Section" \
- [$this docLocation] \
- [$this uiName] \
- ]
- $this execute "$cmd" m4
- }
-
- method DiagramSection::updateDocDir {this} {
-
- set fileV [$this referredFileVersion]
- if [$fileV isNil] {
- return 1
- }
-
- # start Print::exportDiagram for this section and put the output
- # file in docLocation (in [$this docType] format)
- set fid [open [$this docLocation] w]
- close $fid
- set confV [[ClientContext::global] currentConfig]
- set sysV [[$this referredSystem] selectedVersion $confV]
-
- require "print.tcl"
- if [catch {Print::exportDiagram \
- -file [$this docLocation] \
- -type [string toupper [$this docType]] \
- -configVersion $confV \
- -systemVersion $sysV \
- -orientation portrait \
- -autoScale 1 \
- -pageWidth 6.0625\
- -pageHeight 7.0625\
- $fileV} reason] {
- wmtkerror "Export diagram failed: $reason"
- return 0
- }
-
- return 1
- }
-
- method DiagramSection::docType {this} {
-
- # the type of this section in the document directory is Epsi
- return Epsi
- }
-
- # Do not delete this line -- regeneration end marker
-
-