EpsonFX1PrinterStream.st
author Claus Gittinger <cg@exept.de>
Sat, 02 May 2020 21:40:13 +0200
changeset 5476 7355a4b11cb6
parent 5173 99246e219989
permissions -rw-r--r--
#FEATURE by cg class: Socket class added: #newTCPclientToHost:port:domain:domainOrder:withTimeout: changed: #newTCPclientToHost:port:domain:withTimeout:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
     1
"{ Encoding: utf8 }"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
     2
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     3
"
4
1f66800df351 *** empty log message ***
claus
parents: 2
diff changeset
     4
 COPYRIGHT (c) 1991 by Claus Gittinger
84
claus
parents: 36
diff changeset
     5
	      All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     6
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     7
 This software is furnished under a license and may be used
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    12
 hereby transferred.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    13
"
3997
856722248c9f #OTHER by mawalch
mawalch
parents: 1651
diff changeset
    14
"{ Package: 'stx:libbasic2' }"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    15
3997
856722248c9f #OTHER by mawalch
mawalch
parents: 1651
diff changeset
    16
"{ NameSpace: Smalltalk }"
1317
890b41076c7c changed inheritance;
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
    17
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    18
PrinterStream subclass:#EpsonFX1PrinterStream
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    19
	instanceVariableNames:''
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    20
	classVariableNames:''
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    21
	poolDictionaries:''
1651
020ab0e0ae2f category change
fm
parents: 1317
diff changeset
    22
	category:'Interface-Printing'
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    23
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    24
1317
890b41076c7c changed inheritance;
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
    25
!EpsonFX1PrinterStream class methodsFor:'documentation'!
31
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    26
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    27
copyright
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    28
"
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    29
 COPYRIGHT (c) 1991 by Claus Gittinger
84
claus
parents: 36
diff changeset
    30
	      All Rights Reserved
2
07d9ee98e092 *** empty log message ***
claus
parents: 0
diff changeset
    31
31
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    32
 This software is furnished under a license and may be used
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    33
 only in accordance with the terms of that license and with the
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    35
 be provided or otherwise made available to, or used by, any
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    36
 other person.  No title to or ownership of the software is
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    37
 hereby transferred.
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    38
"
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    39
!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    40
31
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    41
documentation
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    42
"
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    43
    This class defines protocol for simple text printing on an Epson-FX1 printer
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    44
    (and compatibles, such as FX80, FX100, etc.). 
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    45
    It does not support multiple fonts, but knows how to print bold, italic etc.
31
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    46
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    47
    Graphics printing is not supported - you need a postscriptPrinter for this.
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    48
31
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    49
    I cannot tell, if this is really an Epson -
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    50
    all I had to test was a Citizen 120D - its documentation claims it to be 
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    51
    FX1 compatible.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    52
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    53
    Notice: 
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    54
        This class only defines some minimum protocol for printing on
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    55
        Epsons - you really should use a PostscriptPrinter ...
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    56
        ... however, if you own an Epson, here is some class to start with.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    57
        It may need to be enhanced at some places (for example: provide more
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    58
        fonts/emphasis's; better international character translation etc.)
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    59
4197
51449951faf2 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 3997
diff changeset
    60
    [Disclaimer:]    
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    61
        This class is not officially supported - take it or leave it.
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    62
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    63
    [Disclaimer2:]    
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    64
        This is more or less completely outdated (look at the creation date of this class !!).
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    65
        Left for historic (nostalgic?) reasons.
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    66
        Will be removed (or made autoloaded) in the future.
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
    67
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    68
    [author:]
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
    69
        Claus Gittinger
31
e223f3cf2995 *** empty log message ***
claus
parents: 9
diff changeset
    70
"
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    71
! !
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    72
1317
890b41076c7c changed inheritance;
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
    73
!EpsonFX1PrinterStream class methodsFor:'initialization'!
441
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    74
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    75
initialize
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    76
    DefaultCommands := #('lpr' 
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    77
                         'lpr -P<your-printer>' 
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    78
                         'cat | rsh <printHost> lpr -h' 
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    79
                        ).
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    80
    super initialize
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    81
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    82
    "
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    83
     self initialize
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    84
    "
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    85
! !
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
    86
1317
890b41076c7c changed inheritance;
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
    87
!EpsonFX1PrinterStream class methodsFor:'queries'!
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    88
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    89
printerTypeName
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    90
    "return a descriptive name"
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    91
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
    92
    ^ 'Epson FX1 compatible printer'
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    93
! !
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    94
4539
01e34acb71e4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4197
diff changeset
    95
!EpsonFX1PrinterStream methodsFor:'access-writing'!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    96
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    97
cr
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    98
    "send a carriage return (newLine).
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    99
     We have to output cr-nl here"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   100
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   101
    super nextPutUntranslated:(Character value:13).
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   102
    super nextPutUntranslated:(Character value:10).
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   103
    self spaces:self class leftMargin
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   104
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   105
    "Modified: 1.6.1996 / 00:13:39 / cg"
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   106
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   107
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   108
nextPut:aCharacter
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   109
    "send aCharacter to the printer.
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   110
     Catch special characters.
5173
99246e219989 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 5145
diff changeset
   111
     Answer aCharacter.
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   112
     - currently only german umlauts are handled - If you own this type
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   113
       of printer and depend on it, add more translation here.
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   114
     See https://files.support.epson.com/pdf/fx100_/fx100_u1.pdf table6.2."
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   115
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   116
    |ascii xLation|
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   117
3997
856722248c9f #OTHER by mawalch
mawalch
parents: 1651
diff changeset
   118
    ascii := aCharacter codePoint.
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   119
    (ascii < 128) ifTrue:[
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   120
        stream nextPut:aCharacter.
5173
99246e219989 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 5145
diff changeset
   121
        ^ aCharacter.
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   122
    ].
5145
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   123
    xLation := #(
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   124
                "/ german
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   125
                ($ä  ${ 2 )     "adiaeresis"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   126
                ($ö  $| 2 )     "odiaeresis"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   127
                ($ü  $} 2 )     "udiaeresis"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   128
                ($Ä  $[ 2 )     "Adiaeresis"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   129
                ($Ö  $\ 2 )     "Odiaeresis"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   130
                ($Ü  $] 2 )     "Udiaeresis"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   131
                ($ß  $~ 2 )     "ssharp"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   132
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   133
                "/ france  
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   134
                ($à  $@ 1 )     "a-grave"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   135
                ($é  ${ 1 )     "e-aigu"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   136
                ($ú  $| 1 )     "u-aigu"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   137
                ($è  ${ 1 )     "e-grave"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   138
                ($ç  $\ 1 )     "c-cedille"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   139
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   140
                "/ italy  
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   141
                ($ò  $| 6 )     "o-grave"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   142
                ($ì  $~ 6 )     "i-grave"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   143
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   144
                "/ spain  
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   145
                ($Ñ  $\ 7 )     "N-tilde"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   146
                ($ñ  $| 7 )     "n-tilde"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   147
                ($¿  $] 7 )     "question"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   148
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   149
                "/ british  
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   150
                ($£  $# 3 )     "pound"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   151
                "/ japan  
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   152
                ($Â¥  $\ 8 )     "Yen"
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   153
            ) detect:[:pair | pair first == aCharacter] ifNone:nil.
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   154
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   155
    xLation notNil ifTrue:[
8a1040ff7c87 #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 4539
diff changeset
   156
        self character:(xLation second) fromCharacterSet:(xLation third)
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   157
    ].
5173
99246e219989 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 5145
diff changeset
   158
    ^ aCharacter
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   159
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   160
    "Modified: 18.5.1996 / 09:03:18 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   161
! !
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   162
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   163
!EpsonFX1PrinterStream methodsFor:'emphasis change'!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   164
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   165
bold
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   166
    "set emphasis to bold"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   167
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   168
    "send: <ESC>G "
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   169
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   170
    super escape:$G
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   171
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   172
    "Modified: 18.5.1996 / 09:03:31 / cg"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   173
!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   174
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   175
italic
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   176
    "set emphasis to italic"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   177
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   178
    "send: <ESC>4 will do that"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   179
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   180
    super escape:$4
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   181
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   182
    "Modified: 18.5.1996 / 09:03:33 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   183
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   184
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   185
normal
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   186
    "set emphasis to normal"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   187
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   188
    "send: <ESC>H<ESC>5"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   189
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   190
    super escape:$H. super escape:$5
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   191
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   192
    "Modified: 18.5.1996 / 09:03:35 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   193
! !
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   194
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   195
!EpsonFX1PrinterStream methodsFor:'layout'!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   196
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   197
linesPerPage:n
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   198
    "change the lines-per-page setting"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   199
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   200
    "send: <ESC>C<n>"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   201
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   202
    super escape:$C.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   203
    super nextPut:(Character value:n)
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   204
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   205
    "Modified: 18.5.1996 / 09:03:50 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   206
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   207
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   208
newPage
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   209
    "force a newPage"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   210
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   211
    super nextPut:(Character value:12)
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   212
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   213
    "Modified: 18.5.1996 / 09:04:04 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   214
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   215
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   216
noTopMargin
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   217
    "turn off topMargin in the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   218
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   219
    "send <ESC>0"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   220
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   221
    super escape:$O
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   222
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   223
    "Modified: 18.5.1996 / 09:04:19 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   224
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   225
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   226
pageHeight:inches
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   227
    "set the pageHeight in inches"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   228
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   229
    "send <ESC>G<0><inch>"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   230
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   231
    super escape:$C.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   232
    super nextPut:(Character value:0).
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   233
    super nextPut:(Character value:inches)
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   234
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   235
    "Modified: 18.5.1996 / 09:04:38 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   236
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   237
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   238
proportional:aBoolean
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   239
    "turn on/off proportional printing"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   240
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   241
    "send <ESC>p0 or <ESC>p1"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   242
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   243
    super escape:$p.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   244
    super nextPut:(aBoolean ifTrue:[$1] ifFalse:[$0])
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   245
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   246
    "Modified: 18.5.1996 / 09:05:18 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   247
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   248
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   249
reset
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   250
    "reset the printer - send <ESC>@"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   251
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   252
    super escape:$@
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   253
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   254
    "Modified: 18.5.1996 / 09:05:27 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   255
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   256
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   257
topMargin:n
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   258
    "set the topMargin"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   259
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   260
    "send <ESC>N<n>"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   261
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   262
    super escape:$N.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   263
    super nextPut:(Character value:n)
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   264
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   265
    "Modified: 18.5.1996 / 09:05:43 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   266
! !
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   267
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   268
!EpsonFX1PrinterStream methodsFor:'private'!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
   269
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   270
character:char fromCharacterSet:set
6
claus
parents: 4
diff changeset
   271
    "send a character from an alternate character set"
claus
parents: 4
diff changeset
   272
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   273
    "send: <ESC>R<set><char><ESC>R<0>"
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   274
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   275
    super escape:$R.
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   276
    super nextPut:(Character value:set).
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   277
    super nextPut:char.
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   278
    super escape:$R.
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   279
    super nextPut:(Character value:0)
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   280
! !
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   281
1317
890b41076c7c changed inheritance;
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   282
!EpsonFX1PrinterStream class methodsFor:'documentation'!
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   283
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   284
version
3997
856722248c9f #OTHER by mawalch
mawalch
parents: 1651
diff changeset
   285
    ^ '$Header$'
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   286
! !
1317
890b41076c7c changed inheritance;
Claus Gittinger <cg@exept.de>
parents: 441
diff changeset
   287
3997
856722248c9f #OTHER by mawalch
mawalch
parents: 1651
diff changeset
   288
441
dbbbefa3beae no a2ps in command-list
dq
parents: 370
diff changeset
   289
EpsonFX1PrinterStream initialize!