home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Westmount Technology 1995
- #
- # File: @(#)printbox.tcl 1.4
- # Author: frmo
- # Description: Default Print Info Box.
- #---------------------------------------------------------------------------
- # SccsId = @(#)printbox.tcl 1.4 09 Nov 1995 Copyright 1995 Westmount Technology
-
- global DiagramPrintOut::location
- set DiagramPrintOut::location BOTTOM
-
- global DiagramPrintOut::offset
- set DiagramPrintOut::offset 55
-
- method DiagramPrintOut::printInfoBox {this device} {
- set margin [$this margin]
- if [$this landscape] {
- set y [expr {[$device width] - ${DiagramPrintOut::offset}}]
- set bottomY [expr {[$device width] - $margin}]
- set width [$device height]
- } else {
- set y [expr {[$device height] - ${DiagramPrintOut::offset}}]
- set bottomY [expr {[$device height] - $margin}]
- set width [$device width]
- }
- set sx $margin
- set ex [expr {$sx + $width - 2 * $margin}]
- $device drawLine $sx $y $ex $y
- $device drawLine $sx $bottomY $ex $bottomY
- $device drawLine $sx $y $sx $bottomY
- $device drawLine $ex $y $ex $bottomY
-
- set context [ClientContext::global]
- set str /
- append str [[$context currentCorporate] name]/
- append str [[$context currentProject] name]/
- append str [[[$context currentConfig] ConfigVersion::config] name]:
- append str [[$context currentConfig] versionNumber]/
- append str [[[$context currentPhase] phase] name]/
- append str [[[$context currentSystem] system] name]/
-
- set diag [$this diagram]
- set title [$this title]
- if {$title == ""} {
- set title [[$diag file] qualifiedName :].[[$diag file] type]:[$diag versionNumber]
- }
- append str $title
-
- set normalFont "times-normal-10"
- set boldFont "times-bold-10"
- set y [expr {$y + 15}]
- $device drawString 25 $y "Diagram: " $boldFont
- $device drawString 80 $y $str $normalFont
- $device drawString [expr {$ex - 100}] $y "Status:" $boldFont
- $device drawString [expr {$ex - 50}] $y [$diag status] $normalFont
- set y [expr {$y + 15}]
- $device drawString 25 $y "Changed:" $boldFont
- $device drawString 80 $y [fmtclock [$diag updateTime]] $normalFont
- $device drawString [expr {$ex - 100}] $y "Page:" $boldFont
- set pages [expr {[$this horNumPages] * [$this verNumPages]}]
- set pageStr "[$this currentPageNo] of $pages"
- $device drawString [expr {$ex - 50}] $y $pageStr $normalFont
- }
-