home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)prtreebox.tcl /main/titanic/2
- # Author: voyager
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)prtreebox.tcl /main/titanic/2 8 Oct 1997 Copyright 1997 Cayenne Software Inc.
-
- global TreePrintOut::location
- set TreePrintOut::location BOTTOM
-
- global TreePrintOut::offset
- set TreePrintOut::offset 40
-
- method TreePrintOut::printInfoBox {this device} {
- set margin [$this margin]
- if [$this landscape] {
- set y [expr {[$device width] - ${TreePrintOut::offset}}]
- set bottomY [expr {[$device width] - $margin}]
- set width [$device height]
- } else {
- set y [expr {[$device height] - ${TreePrintOut::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 normalFont "times-normal-10"
- set boldFont "times-bold-10"
- set y [expr {$y + 15}]
- $device drawString 25 $y "Object: " $boldFont
-
- set context [ClientContext::global]
- set str /
- append str [[$context currentCorporate] name]/
- append str [[$context currentProject] name]/
- if ![[$context currentConfig] isNil] {
- append str [[[$context currentConfig] ConfigVersion::config] name]:
- append str [[$context currentConfig] versionNumber]/
- if ![[$context currentPhase] isNil] {
- append str [[[$context currentPhase] phase] name]/
- if ![[$context currentSystem] isNil] {
- append str [[[$context currentSystem] system] name]/
- }
- }
- }
- append str [[lindex [[.main infoView] root] 0] labelA]
-
- $device drawString 80 $y $str $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
- }
-