HPLjetIIPrinterStream.st
author claus
Thu, 10 Aug 1995 20:36:43 +0200
changeset 85 df13b436b54e
parent 84 d401ce0001dc
child 112 3e18f2cfe430
permissions -rw-r--r--
.

"
 COPYRIGHT (c) 1988 by Claus Gittinger
	      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.
"

PrinterStream subclass:#HPLjetIIPrinterStream
       instanceVariableNames:''
       classVariableNames:''
       poolDictionaries:''
       category:'Streams-External'
!

HPLjetIIPrinterStream comment:'
COPYRIGHT (c) 1988 by Claus Gittinger
	      All Rights Reserved

$Header: /cvs/stx/stx/libbasic2/HPLjetIIPrinterStream.st,v 1.9 1995-08-10 18:35:36 claus Exp $
'!

!HPLjetIIPrinterStream class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1988 by Claus Gittinger
	      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.
"
!

version
"
$Header: /cvs/stx/stx/libbasic2/HPLjetIIPrinterStream.st,v 1.9 1995-08-10 18:35:36 claus Exp $
"
!

documentation
"
    This class defines protocol for simple text prinitng on an HP Laserjet 2
    (and compatible) printer. It knows the escape codes for bold, italic etc.
"
! !

!HPLjetIIPrinterStream methodsFor:'access writing'!

cr
    "have to output cr-nl here"

    super nextPutUntranslated:(Character value:13).
    super nextPutUntranslated:(Character value:10).
    self spaces:LeftMargin
!

courier
    "switch to courier font"

    super nextPut:(Character esc).
    super nextPutAll:'(s3T'
!

times
    "switch to times font"

    super nextPut:(Character esc).
    super nextPutAll:'(s5T'
!

helvetica
    "switch to helvetica font"

    super nextPut:(Character esc).
    super nextPutAll:'(s4T'
!

italic
    "switch to italic/oblique font-face"

    super nextPut:(Character esc).
    super nextPutAll:'(s1S'.
    super nextPut:(Character esc).
    super nextPutAll:'(s0B'
!

bold
    "switch to bold font-face"

    super nextPut:(Character esc).
    super nextPutAll:'(s0S'.
    super nextPut:(Character esc).
    super nextPutAll:'(s3B'
!

normal
    "switch to normal/roman font-face"

    super nextPut:(Character esc).
    super nextPutAll:'(s0S'.
    super nextPut:(Character esc).
    super nextPutAll:'(s0B'
! !