0
|
1 |
"
|
4
|
2 |
COPYRIGHT (c) 1988 by Claus Gittinger
|
9
|
3 |
All Rights Reserved
|
0
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
PrinterStream subclass:#HPLjetIIPrinterStream
|
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Streams-External'
|
|
18 |
!
|
|
19 |
|
|
20 |
HPLjetIIPrinterStream comment:'
|
31
|
21 |
COPYRIGHT (c) 1988 by Claus Gittinger
|
|
22 |
All Rights Reserved
|
0
|
23 |
'!
|
|
24 |
|
31
|
25 |
!HPLjetIIPrinterStream class methodsFor:'documentation'!
|
|
26 |
|
|
27 |
copyright
|
|
28 |
"
|
|
29 |
COPYRIGHT (c) 1988 by Claus Gittinger
|
|
30 |
All Rights Reserved
|
|
31 |
|
|
32 |
This software is furnished under a license and may be used
|
|
33 |
only in accordance with the terms of that license and with the
|
|
34 |
inclusion of the above copyright notice. This software may not
|
|
35 |
be provided or otherwise made available to, or used by, any
|
|
36 |
other person. No title to or ownership of the software is
|
|
37 |
hereby transferred.
|
|
38 |
"
|
|
39 |
!
|
|
40 |
|
|
41 |
version
|
|
42 |
"
|
|
43 |
$Header: /cvs/stx/stx/libbasic2/HPLjetIIPrinterStream.st,v 1.6 1994-06-02 17:19:44 claus Exp $
|
|
44 |
5 claus Exp $
|
|
45 |
"
|
|
46 |
!
|
|
47 |
|
|
48 |
documentation
|
|
49 |
"
|
|
50 |
This class defines protocol for simple text prinitng on an HP Laserjet 2
|
|
51 |
(and compatible) printer. It knows the escape codes for bold, italic etc.
|
|
52 |
"
|
|
53 |
! !
|
|
54 |
|
0
|
55 |
!HPLjetIIPrinterStream methodsFor:'access writing'!
|
|
56 |
|
|
57 |
cr
|
|
58 |
"have to output cr-nl here"
|
|
59 |
|
|
60 |
super nextPutUntranslated:(Character value:13).
|
|
61 |
super nextPutUntranslated:(Character value:10).
|
9
|
62 |
self spaces:LeftMargin
|
0
|
63 |
!
|
|
64 |
|
|
65 |
courier
|
|
66 |
"switch to courier font"
|
|
67 |
|
|
68 |
super nextPut:(Character esc).
|
|
69 |
super nextPutAll:'(s3T'
|
|
70 |
!
|
|
71 |
|
|
72 |
times
|
|
73 |
"switch to times font"
|
|
74 |
|
|
75 |
super nextPut:(Character esc).
|
|
76 |
super nextPutAll:'(s5T'
|
|
77 |
!
|
|
78 |
|
|
79 |
helvetica
|
|
80 |
"switch to helvetica font"
|
|
81 |
|
|
82 |
super nextPut:(Character esc).
|
|
83 |
super nextPutAll:'(s4T'
|
|
84 |
!
|
|
85 |
|
|
86 |
italic
|
|
87 |
"switch to italic/oblique font-face"
|
|
88 |
|
|
89 |
super nextPut:(Character esc).
|
|
90 |
super nextPutAll:'(s1S'.
|
|
91 |
super nextPut:(Character esc).
|
|
92 |
super nextPutAll:'(s0B'
|
|
93 |
!
|
|
94 |
|
|
95 |
bold
|
|
96 |
"switch to bold font-face"
|
|
97 |
|
|
98 |
super nextPut:(Character esc).
|
|
99 |
super nextPutAll:'(s0S'.
|
|
100 |
super nextPut:(Character esc).
|
|
101 |
super nextPutAll:'(s3B'
|
|
102 |
!
|
|
103 |
|
|
104 |
normal
|
|
105 |
"switch to normal/roman font-face"
|
|
106 |
|
|
107 |
super nextPut:(Character esc).
|
|
108 |
super nextPutAll:'(s0S'.
|
|
109 |
super nextPut:(Character esc).
|
|
110 |
super nextPutAll:'(s0B'
|
|
111 |
! !
|