--- a/PrinterContext.st Tue Oct 10 18:22:07 2006 +0200
+++ b/PrinterContext.st Tue Oct 10 20:25:51 2006 +0200
@@ -50,8 +50,6 @@
!PrinterContext class methodsFor:'instance creation'!
fromPrinterInfo: aPrinterInfo
- "Private - Answer a Printer object given an hDC"
-
| aPrinter hDC|
hDC := aPrinterInfo createDC.
@@ -64,15 +62,7 @@
"Created: / 03-08-2006 / 12:53:52 / fm"
"Modified: / 04-08-2006 / 12:55:01 / fm"
- "Modified: / 10-10-2006 / 17:32:59 / cg"
-!
-
-printWith: aRecordingPen
- "Print the contents of aRecordingPen on
- the system printer."
- self new drawUsing: aRecordingPen
-
- "Created: / 27-07-2006 / 17:53:59 / fm"
+ "Modified: / 10-10-2006 / 19:05:07 / cg"
! !
!PrinterContext class methodsFor:'accessing'!
@@ -122,18 +112,21 @@
"Modified: / 10-10-2006 / 17:32:45 / cg"
!
-getPrinterInformation: printerNameString
+getPrinterInformation:printerNameString
" Answer the printer information for the printer named printerNameString. If no name is specified,
- answer the information for the default printer. "
+ answer the information for the default printer."
+
+ |h|
- | h |
-
- h := OperatingSystem openPrinter: printerNameString.
- ^OperatingSystem getDocumentProperties:nil hPrinter:h pDeviceName: printerNameString .
+ h := OperatingSystem openPrinter:printerNameString.
+ ^ OperatingSystem
+ getDocumentProperties:nil
+ hPrinter:h
+ pDeviceName:printerNameString.
"Created: / 27-07-2006 / 10:22:32 / fm"
"Modified: / 01-08-2006 / 16:01:44 / fm"
- "Modified: / 10-10-2006 / 17:33:07 / cg"
+ "Modified: / 10-10-2006 / 18:57:45 / cg"
!
named: aName
@@ -150,11 +143,12 @@
!
printerNames
- "Answer a collection of all known printer names."
-
- ^OperatingSystem getPrintersNames
+ "Answer a collection of all known printer names."
+
+ ^ OperatingSystem getPrintersNames
"Created: / 27-07-2006 / 17:54:45 / fm"
+ "Modified: / 10-10-2006 / 18:57:51 / cg"
! !
!PrinterContext class methodsFor:'testing & examples'!
@@ -722,13 +716,11 @@
device close.
gcId := nil.
jobid := nil.
- result >= 0 ifFalse:[
- ^ self error
- ]
+ result >= 0 ifFalse:[ self error ]
"Created: / 27-07-2006 / 18:21:04 / fm"
"Modified: / 01-08-2006 / 16:01:38 / fm"
- "Modified: / 10-10-2006 / 18:15:02 / cg"
+ "Modified: / 10-10-2006 / 18:50:43 / cg"
!
formFeed
@@ -1081,5 +1073,5 @@
!PrinterContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/PrinterContext.st,v 1.6 2006-10-10 16:22:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/PrinterContext.st,v 1.7 2006-10-10 18:25:51 cg Exp $'
! !