--- a/WinPrinterStream.st Mon Apr 16 12:56:32 2007 +0200
+++ b/WinPrinterStream.st Mon Apr 16 13:02:37 2007 +0200
@@ -1,3 +1,14 @@
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
"{ Package: 'stx:libview2' }"
PrinterStream subclass:#WinPrinterStream
@@ -9,6 +20,21 @@
category:'Interface-Printing'
!
+!WinPrinterStream class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+! !
!WinPrinterStream class methodsFor:'instance creation'!
@@ -18,12 +44,12 @@
PrinterInfo := PrintingDialog getPrinterInfo.
PrinterInfo isNil ifTrue:[^nil].
- printerContext := PrinterContext fromPrinterInfo: PrinterInfo.
+ printerContext := WinPrinterContext fromPrinterInfo: PrinterInfo.
^ self basicNew printerContext:printerContext.
- "Modified: / 10-10-2006 / 18:47:18 / cg"
- "Modified: / 12-10-2006 / 10:07:36 / User"
+ "Modified: / 12-10-2006 / 10:07:36 / fm"
+ "Modified: / 16-04-2007 / 12:58:13 / cg"
!
newForFile:aFileNameOrNil
@@ -36,8 +62,8 @@
printer startPrint.
^ printer
- "Modified: / 10-10-2006 / 19:08:52 / cg"
- "Modified: / 12-10-2006 / 14:35:09 / User"
+ "Modified: / 12-10-2006 / 14:35:09 / fm"
+ "Modified: / 16-04-2007 / 12:58:18 / cg"
!
newNative
@@ -74,24 +100,26 @@
!WinPrinterStream methodsFor:'accessing'!
fontWidthForTabComputing
+ ^ 120
-^120
-
- "Created: / 12-10-2006 / 11:59:33 / User"
+ "Created: / 12-10-2006 / 11:59:33 / fm"
+ "Modified: / 16-04-2007 / 13:00:05 / cg"
!
hasJobStarted
-^jobStarted = true
+ ^jobStarted = true
- "Created: / 12-10-2006 / 14:38:00 / User"
+ "Created: / 12-10-2006 / 14:38:00 / fm"
+ "Modified: / 16-04-2007 / 13:00:26 / cg"
!
hasPageStarted
-^pageStarted = true
+ ^pageStarted = true
- "Created: / 12-10-2006 / 14:41:39 / User"
+ "Created: / 12-10-2006 / 14:41:39 / fm"
+ "Modified: / 16-04-2007 / 13:00:32 / cg"
!
heightOfFont
@@ -99,14 +127,16 @@
heightOfFont isNil ifTrue:[heightOfFont := printerContext getCharHeight].
^heightOfFont
- "Created: / 12-10-2006 / 12:00:57 / User"
+ "Created: / 12-10-2006 / 12:00:57 / fm"
+ "Modified: / 16-04-2007 / 13:00:35 / cg"
!
linesPerPage
^printerContext linesPerPageFor: nil
- "Created: / 12-10-2006 / 11:57:53 / User"
+ "Created: / 12-10-2006 / 11:57:53 / fm"
+ "Modified: / 16-04-2007 / 13:00:38 / cg"
!
printerContext:something
@@ -119,7 +149,8 @@
printerContext endPage.
pageStarted := false.
- "Created: / 12-10-2006 / 14:42:18 / User"
+ "Created: / 12-10-2006 / 14:42:18 / fm"
+ "Modified: / 16-04-2007 / 12:58:33 / cg"
!
endPrint
@@ -127,15 +158,17 @@
jobStarted := false.
"Created: / 10-10-2006 / 18:50:05 / cg"
- "Modified: / 12-10-2006 / 14:41:11 / User"
+ "Modified: / 12-10-2006 / 14:41:11 / fm"
+ "Modified: / 16-04-2007 / 12:58:36 / cg"
!
formFeed
- printerContext formFeed.
- self resetPage
+ printerContext formFeed.
+ self resetPage
- "Created: / 12-10-2006 / 10:41:40 / User"
- "Modified: / 12-10-2006 / 14:40:53 / User"
+ "Created: / 12-10-2006 / 10:41:40 / fm"
+ "Modified: / 12-10-2006 / 14:40:53 / fm"
+ "Modified: / 16-04-2007 / 13:00:21 / cg"
!
startPage
@@ -143,7 +176,8 @@
pageStarted := true.
self resetPage
- "Created: / 12-10-2006 / 14:39:27 / User"
+ "Created: / 12-10-2006 / 14:39:27 / fm"
+ "Modified: / 16-04-2007 / 13:00:58 / cg"
!
startPrint
@@ -152,7 +186,7 @@
PrinterInfo := PrintingDialog getPrinterInfo.
PrinterInfo isNil ifTrue:[^self].
].
- printerContext := PrinterContext fromPrinterInfo: PrinterInfo.
+ printerContext := WinPrinterContext fromPrinterInfo: PrinterInfo.
].
printerContext foreground:(Color black) background:(Color white).
self resetPage.
@@ -162,16 +196,18 @@
pageStarted := true.
"Created: / 10-10-2006 / 18:49:55 / cg"
- "Modified: / 12-10-2006 / 15:25:29 / User"
+ "Modified: / 12-10-2006 / 15:25:29 / fm"
+ "Modified: / 16-04-2007 / 13:01:01 / cg"
! !
!WinPrinterStream methodsFor:'private'!
resetPage
-cX := cY := colNr := lineNr := 0.
+ cX := cY := colNr := lineNr := 0.
- "Created: / 12-10-2006 / 14:40:23 / User"
+ "Created: / 12-10-2006 / 14:40:23 / fm"
+ "Modified: / 16-04-2007 / 13:00:52 / cg"
!
setPrintFileName:something
@@ -193,7 +229,8 @@
self endPage
].
- "Modified: / 12-10-2006 / 14:42:57 / User"
+ "Modified: / 12-10-2006 / 14:42:57 / fm"
+ "Modified: / 16-04-2007 / 12:58:30 / cg"
!
nextPut:aCharacter
@@ -220,7 +257,8 @@
colNr := colNr + 1.
cX := cX + (printerContext stringWidthOf: aCharacter asString).
- "Modified: / 12-10-2006 / 15:06:14 / User"
+ "Modified: / 12-10-2006 / 15:06:14 / fm"
+ "Modified: / 16-04-2007 / 13:00:44 / cg"
!
nextPutAll:aString
@@ -238,11 +276,12 @@
colNr := colNr + aString size.
cX := cX + (printerContext stringWidthOf: aString string).
- "Modified: / 12-10-2006 / 15:21:02 / User"
+ "Modified: / 12-10-2006 / 15:21:02 / fm"
+ "Modified: / 16-04-2007 / 13:00:46 / cg"
! !
!WinPrinterStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/WinPrinterStream.st,v 1.2 2006-10-12 14:33:19 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/WinPrinterStream.st,v 1.3 2007-04-16 11:02:37 cg Exp $'
! !