author | Claus Gittinger <cg@exept.de> |
Sat, 18 May 1996 09:14:51 +0200 | |
changeset 348 | e4790af5d077 |
parent 259 | 6d36f3ac42a2 |
child 370 | 705453f00711 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1988 by Claus Gittinger |
84 | 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 |
|
259 | 14 |
instanceVariableNames:'' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Streams-External' |
|
0 | 18 |
! |
19 |
||
31 | 20 |
!HPLjetIIPrinterStream class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1988 by Claus Gittinger |
|
84 | 25 |
All Rights Reserved |
31 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
38 |
This class defines protocol for simple text prinitng on an HP Laserjet 2/3 |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
39 |
(and compatible) printer. |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
40 |
It does not support multiple fonts, but knows how to print bold, italic etc. |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
41 |
|
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
42 |
Graphics printing is not supported - you need a postscriptprinter for this. |
259 | 43 |
|
348 | 44 |
Notice: |
45 |
This class only defines some minimum protocol for printing on |
|
46 |
HP-LJ - you really should use a PostscriptPrinter ... |
|
47 |
... however, if you own a LJ, here is some class to start with. |
|
48 |
It may need to be enhanced at some places (for example: provide more |
|
49 |
fonts/emphasis's, better international character translation, |
|
50 |
image printing etc.) |
|
51 |
||
52 |
This class is not officially supported - take it or leave it. |
|
53 |
||
259 | 54 |
[author:] |
55 |
Claus Gittinger |
|
31 | 56 |
" |
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
57 |
! ! |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
58 |
|
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
59 |
!HPLjetIIPrinterStream class methodsFor:'queries'! |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
60 |
|
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
61 |
printerTypeName |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
62 |
"return a descriptive name" |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
63 |
|
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
64 |
^ 'hp laserjet III compatible printer' |
31 | 65 |
! ! |
66 |
||
0 | 67 |
!HPLjetIIPrinterStream methodsFor:'access writing'! |
68 |
||
348 | 69 |
cr |
70 |
"send a carriage-return (newLine) to the printer. |
|
71 |
We have to output cr-nl here" |
|
72 |
||
73 |
super nextPutUntranslated:(Character value:13). |
|
74 |
super nextPutUntranslated:(Character value:10). |
|
75 |
self spaces:LeftMargin |
|
76 |
||
77 |
"Modified: 18.5.1996 / 09:11:05 / cg" |
|
78 |
! ! |
|
79 |
||
80 |
!HPLjetIIPrinterStream methodsFor:'emphasis change'! |
|
81 |
||
126 | 82 |
bold |
348 | 83 |
"switch to bold emphasis" |
0 | 84 |
|
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
85 |
"send <ESC>(s0S<ESC>(s3B" |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
86 |
|
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
87 |
super escapeAll:'(s0S'. |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
88 |
super escapeAll:'(s3B' |
348 | 89 |
|
90 |
"Modified: 18.5.1996 / 09:10:39 / cg" |
|
0 | 91 |
! |
92 |
||
348 | 93 |
italic |
94 |
"switch to italic/oblique emphasis" |
|
95 |
||
96 |
super escapeAll:'(s1S'. |
|
97 |
super escapeAll:'(s0B' |
|
98 |
||
99 |
"Modified: 18.5.1996 / 09:10:44 / cg" |
|
100 |
! |
|
101 |
||
102 |
normal |
|
103 |
"switch to normal/roman emphasis" |
|
104 |
||
105 |
super escapeAll:'(s0S'. |
|
106 |
super escapeAll:'(s0B' |
|
107 |
||
108 |
"Modified: 18.5.1996 / 09:10:48 / cg" |
|
109 |
! ! |
|
110 |
||
111 |
!HPLjetIIPrinterStream methodsFor:'font change'! |
|
112 |
||
0 | 113 |
courier |
114 |
"switch to courier font" |
|
115 |
||
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
116 |
super escapeAll:'(s3T' |
0 | 117 |
! |
118 |
||
119 |
helvetica |
|
120 |
"switch to helvetica font" |
|
121 |
||
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
122 |
super escapeAll:'(s4T' |
0 | 123 |
! |
124 |
||
126 | 125 |
times |
126 |
"switch to times font" |
|
127 |
||
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
126
diff
changeset
|
128 |
super escapeAll:'(s5T' |
0 | 129 |
! ! |
259 | 130 |
|
131 |
!HPLjetIIPrinterStream class methodsFor:'documentation'! |
|
132 |
||
133 |
version |
|
348 | 134 |
^ '$Header: /cvs/stx/stx/libbasic2/HPLjetIIPrinterStream.st,v 1.14 1996-05-18 07:14:31 cg Exp $' |
259 | 135 |
! ! |