PrinterStream.st
author Claus Gittinger <cg@exept.de>
Mon, 19 May 2003 11:44:22 +0200
changeset 1220 33fa58c0596d
parent 1109 3dd9d0a420a1
child 1317 890b41076c7c
permissions -rw-r--r--
category
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     1
"
4
1f66800df351 *** empty log message ***
claus
parents: 2
diff changeset
     2
 COPYRIGHT (c) 1990 by Claus Gittinger
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
     3
              All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     4
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    11
"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    12
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
    13
"{ Package: 'stx:libbasic2' }"
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
    14
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    15
PipeStream subclass:#PrinterStream
1220
33fa58c0596d category
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
    16
	instanceVariableNames:'native pageFormat underline strikeout'
33fa58c0596d category
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
    17
	classVariableNames:'DefaultPageFormat'
33fa58c0596d category
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
    18
	poolDictionaries:''
33fa58c0596d category
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
    19
	category:'Streams-External'
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    20
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    21
627
8003af47744a add landscape
ca
parents: 571
diff changeset
    22
PrinterStream class instanceVariableNames:'PrintCommand DefaultCommands PageFormat DefaultPageFormats Landscape
1220
33fa58c0596d category
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
    23
	PrintDevice DefaultDevices'
627
8003af47744a add landscape
ca
parents: 571
diff changeset
    24
8003af47744a add landscape
ca
parents: 571
diff changeset
    25
"
879
e69bf56dc758 category change
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
    26
 No other class instance variables are inherited by this class.
627
8003af47744a add landscape
ca
parents: 571
diff changeset
    27
"
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    28
!
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    29
456
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
    30
!PrinterStream class methodsFor:'documentation'!
31
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    31
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    32
copyright
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    33
"
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    34
 COPYRIGHT (c) 1990 by Claus Gittinger
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    35
              All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    36
31
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    37
 This software is furnished under a license and may be used
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    38
 only in accordance with the terms of that license and with the
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    39
 inclusion of the above copyright notice.   This software may not
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    40
 be provided or otherwise made available to, or used by, any
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    41
 other person.  No title to or ownership of the software is
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    42
 hereby transferred.
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    43
"
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    44
!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    45
31
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    46
documentation
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    47
"
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    48
    a stream for printing; this (concrete or abstract) class can handle only
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    49
    very dumb printers. 
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    50
    No attributes (italic, bold etc) and no multiple fonts are supported 
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    51
    - just plain single font text printing.
179
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
    52
38773360f4b7 more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
    53
    More intelligence is added by subclasses (see PostscriptPrinterStream among others.)
211
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    54
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    55
    These classes do not support graphics printing - they are only for
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    56
    text; although some limited font functionality (such as bold or italic printing)
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    57
    may be supported by some subclasses.
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    58
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    59
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    60
    [usage:]
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    61
211
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    62
    The concrete printer class is bound to the global variable Printer,
235
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
    63
    which is either set to PrinterStream (for dumb printers) or to one of
211
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    64
    the subclasses (PostscriptPrinterStream etc.).
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    65
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    66
    To print:
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    67
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    68
        |p|
211
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    69
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    70
        p := Printer new.
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    71
        p notNil ifTrue:[
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    72
            p nextPutAll:'hello world'; cr.
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    73
            p nextPutAll:' ...'; cr.
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    74
            p close
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    75
        ].
211
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    76
a7ca79962b92 commentary
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    77
    See users of the Printer global variable for more examples.
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 247
diff changeset
    78
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    79
    [class variables:]
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    80
        PrintCommand    <String>        UNIX only: the operatingSystem command for printing.
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    81
                                        Usually something like 'lp' or 'lpr'
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
    82
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    83
        PrintDevice     <String>        VMS only: the printers device.
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    84
                                        Usually something like 'sys$print:'
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
    85
259
6d36f3ac42a2 documentation
Claus Gittinger <cg@exept.de>
parents: 247
diff changeset
    86
    [author:]
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
    87
        Claus Gittinger
31
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    88
"
e223f3cf2995 *** empty log message ***
claus
parents: 10
diff changeset
    89
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    90
456
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
    91
!PrinterStream class methodsFor:'initialization'!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    92
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    93
initialize
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    94
    "this is usually redefined by the startup-file"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    95
569
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
    96
    OperatingSystem isUNIXlike ifTrue:[
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
    97
        DefaultCommands isNil ifTrue:[
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
    98
            DefaultCommands := #(
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
    99
                                 'lpr' 
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   100
                                 'lpr -P<your-printer>' 
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   101
                                 'rsh <printHost> lpr -h' 
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   102
                                 'cat >preview.ps ; gv preview.ps'
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   103
                                 'cat >printfile'
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   104
                                 'gs -q -DNOPAUSE -sDEVICE=pdfwrite -sOutputFile=/tmp/preview.pdf -'
569
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   105
                                 'a2ps'
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   106
                                 'a2ps | rsh <printHost> lpr -h' 
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   107
                                 'a2ps >printfile' 
569
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   108
                                ).
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   109
        ].
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   110
569
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   111
        PrintCommand isNil ifTrue:[
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   112
            (OperatingSystem canExecuteCommand:'lpr') ifTrue:[
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   113
                PrintCommand := 'lpr'
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   114
            ] ifFalse:[
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   115
                PrintCommand := 'lp'
9030f82afd08 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 468
diff changeset
   116
            ]
1107
8ea38fa19bd6 ghostview -> gv
ca
parents: 1076
diff changeset
   117
        ]
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   118
    ].
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   119
    OperatingSystem isVMSlike ifTrue:[
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   120
        DefaultDevices isNil ifTrue:[
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   121
            DefaultDevices := #(
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   122
                                 'sys$print:'
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   123
                                ).
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   124
        ].
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   125
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   126
        PrintDevice isNil ifTrue:[
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   127
            PrintDevice := 'sys$print:'
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   128
        ]
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   129
    ].
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   130
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   131
    DefaultPageFormats isNil ifTrue:[
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   132
        "/ UnitConverter must support all of them.
442
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   133
        self defaultPageFormats:#(
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   134
                                    'a3'
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   135
                                    'a4'
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   136
                                    'a5'
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   137
                                    'a6'
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   138
                                    'b5'
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   139
                                    'letter'
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   140
                                    'legal'
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   141
                                    'ledger'
442
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   142
                               ).
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   143
    ].
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   144
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   145
    Landscape isNil ifTrue:[
442
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   146
        Landscape := false
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   147
    ].
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   148
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   149
    PageFormat isNil ifTrue:[
442
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   150
        Language == #us ifTrue:[
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   151
            PageFormat := #letter
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   152
        ] ifFalse:[
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   153
            PageFormat := #a4
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   154
        ]
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   155
    ]
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   156
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   157
    "
386
cebdfb2e9cf0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   158
     DefaultPageFormats := nil.
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   159
     DefaultCommands := nil.
442
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   160
     PrintCommand := nil.
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   161
     PrinterStream initialize
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   162
    "
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   163
386
cebdfb2e9cf0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   164
    "Modified: 4.6.1996 / 17:16:32 / cg"
373
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   165
!
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   166
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   167
reInitPage
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   168
    "nothing done here"
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   169
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   170
    "Created: 1.6.1996 / 00:49:40 / cg"
2
07d9ee98e092 *** empty log message ***
claus
parents: 0
diff changeset
   171
! !
07d9ee98e092 *** empty log message ***
claus
parents: 0
diff changeset
   172
456
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   173
!PrinterStream class methodsFor:'instance creation'!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   174
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   175
new
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   176
    "return a new stream for printing"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   177
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   178
    ^ self basicNew initialize startPrint
160
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   179
!
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   180
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   181
newNative
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   182
    "return a new stream for untranslated printing
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   183
     (i.e. text should be sent via nextPutUntranslated in the printers
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   184
      native format)"
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   185
1076
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   186
    ^ self basicNew initialize setNative; startPrint.
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   187
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   188
1220
33fa58c0596d category
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   189
!PrinterStream class methodsFor:'accessing-defaults'!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   190
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   191
bottomMargin
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   192
    "return the bottomMargin (in inches). Here, no margin is supported,
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   193
     but its redefined in some printer classes"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   194
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   195
    ^ 0
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   196
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   197
    "Created: 5.9.1996 / 21:37:49 / cg"
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   198
!
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   199
247
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   200
defaultCommands
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   201
    "UNIX only: 
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   202
     return a list presented as possible commands for printing
247
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   203
     (in the launchers printer configuration).
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   204
     This list can be set from the startup script with:
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   205
        PrinterStream defaultCommands:#( ... )"
247
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   206
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   207
    DefaultCommands isNil ifTrue:[
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   208
        self == PrinterStream ifFalse:[
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   209
            ^ self superclass defaultCommands
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   210
        ]
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   211
    ].
247
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   212
    ^ DefaultCommands
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   213
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   214
    "Created: 23.4.1996 / 18:25:18 / cg"
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   215
!
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   216
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   217
defaultCommands:collectionOfCommandStrings
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   218
    "UNIX only: 
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   219
     set the list which will be presented as possible commands for printing.
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   220
     (shown in in the launchers printer configuration).
247
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   221
     This can be done from the startup script with:
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   222
        PrinterStream defaultCommands:#( ... )"
247
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   223
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   224
    DefaultCommands := collectionOfCommandStrings
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   225
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   226
    "Created: 23.4.1996 / 18:26:06 / cg"
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   227
!
d1e5c0187e59 keep defaultCommands in a classVar
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   228
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   229
defaultDevices
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   230
    "VMS only: 
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   231
     return a list presented as possible devices for printers.
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   232
     (in the launchers printer configuration).
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   233
     This list can be set from the startup script with:
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   234
        PrinterStream defaultDevices:#( ... )"
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   235
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   236
    DefaultDevices isNil ifTrue:[
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   237
        self == PrinterStream ifFalse:[
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   238
            ^ self superclass defaultDevices
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   239
        ]
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   240
    ].
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   241
    ^ DefaultDevices
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   242
!
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   243
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   244
defaultDevices:collectionOfDeviceNameStrings
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   245
    "VMS only:
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   246
     set the list which will be presented as possible devices for printing.
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   247
     (shown in in the launchers printer configuration).
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   248
     This can be done from the startup script with:
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   249
        PrinterStream defaultDevices:#( ... )"
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   250
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   251
    DefaultDevices := collectionOfDeviceNameStrings
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   252
!
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   253
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   254
defaultPageFormats
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   255
    "return a list of supported page formats.
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   256
     This list can be set from the startup script with:
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   257
        PrinterStream defaultPageFormats:#( ... )"
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   258
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   259
    DefaultPageFormats isNil ifTrue:[
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   260
        self == PrinterStream ifFalse:[
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   261
            ^ self superclass defaultPageFormats
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   262
        ]
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   263
    ].
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   264
    ^ DefaultPageFormats
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   265
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   266
    "Created: 23.4.1996 / 18:25:18 / cg"
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   267
    "Modified: 11.9.1996 / 11:17:44 / stefan"
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   268
!
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   269
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   270
defaultPageFormats:aList
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   271
    "set the list of supported page formats.
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   272
     (shown in in the launchers printer configuration).
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   273
     This list can be set from the startup script with:
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   274
        PrinterStream defaultPageFormats:#( ... ).
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   275
     All symbols must be known by UnitConverter"
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   276
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   277
    DefaultPageFormats := aList.
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   278
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   279
    "/ validate the list
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   280
    aList do:[:name |
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   281
        |unit ok|
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   282
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   283
        ok := true.
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   284
        #('W' 'H' 'lW' 'lH') do:[:what |
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   285
            unit := (name , what) asSymbolIfInterned.
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   286
            (unit isNil 
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   287
            or:[(UnitConverter convert:1 from:unit to:#millimeter) isNil]) ifTrue:[
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   288
                ok := false
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   289
            ]
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   290
        ].
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   291
        ok ifFalse:[
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   292
            ('PRINTER: UnitConverter has no size-info for ''' , name , '''-format') errorPrintCR
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   293
        ]
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   294
    ].
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   295
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   296
    "
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   297
     PrinterStream
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   298
        defaultPageFormats:#(
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   299
                                'letter'
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   300
                                'a4'
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   301
                                'a5'
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   302
                                'a6'
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   303
                            )
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   304
    "
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   305
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   306
    "Created: 23.4.1996 / 18:25:18 / cg"
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   307
    "Modified: 11.9.1996 / 11:19:01 / stefan"
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   308
!
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   309
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   310
landscape
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   311
    "return the landscape setting"
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   312
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   313
    Landscape isNil ifTrue:[
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   314
        self == PrinterStream ifFalse:[
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   315
            ^ self superclass landscape
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   316
        ]
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   317
    ].
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   318
    ^ Landscape
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   319
!
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   320
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   321
landscape:aBoolean
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   322
    "set/clear landscape printing"
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   323
373
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   324
    Landscape := aBoolean.
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   325
    self reInitPage.
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   326
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   327
    "Modified: 1.6.1996 / 00:49:22 / cg"
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   328
!
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   329
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   330
leftMargin
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   331
    "return the leftMargin (in inches). Here, no margin is supported,
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   332
     but its redefined in some printer classes"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   333
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   334
    ^ 0
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   335
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   336
    "Created: 5.9.1996 / 21:37:49 / cg"
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   337
    "Modified: 5.9.1996 / 21:39:55 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   338
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   339
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   340
pageFormat
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   341
    "return a symbol describing the default page format.
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   342
     This can be set from the startup script with:
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   343
        PrinterStream pageFormat:#...
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   344
     or via the launchers settings menu."
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   345
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   346
    PageFormat isNil ifTrue:[
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   347
        self == PrinterStream ifFalse:[
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   348
            ^ self superclass pageFormat
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   349
        ]
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   350
    ].
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   351
    ^ PageFormat
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   352
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   353
    "Created: 23.4.1996 / 18:25:18 / cg"
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   354
    "Modified: 11.9.1996 / 11:16:51 / stefan"
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   355
!
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   356
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   357
pageFormat:aSymbol
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   358
    "set the the default page format to be aSymbol.
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   359
     Valid symbols are #letter, #a4, #a5 etc.
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   360
     The UnitConverter must contain width/height information on
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   361
     that symbol, in order for printing to be correct.
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   362
    "
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   363
373
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   364
    PageFormat := aSymbol.
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   365
    self reInitPage.
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   366
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   367
    "Created: 23.4.1996 / 18:25:18 / cg"
373
6834d6a61ea9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 371
diff changeset
   368
    "Modified: 1.6.1996 / 00:49:06 / cg"
443
2c85dbf33207 Fix documentation (mostly typos).
Stefan Vogel <sv@exept.de>
parents: 442
diff changeset
   369
    "Modified: 11.9.1996 / 11:16:04 / stefan"
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   370
!
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   371
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   372
printCommand
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   373
    "UNIX only: 
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   374
     return the command used for printing (usually 'lp' or 'lpr').
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   375
     This is either set from the startup file, or via the launchers
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   376
     settings menu."
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   377
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   378
    PrintCommand isNil ifTrue:[
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   379
        self == PrinterStream ifFalse:[
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   380
            ^ self superclass printCommand
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   381
        ]
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   382
    ].
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   383
    ^ PrintCommand
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   384
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   385
    "Modified: 18.5.1996 / 09:12:35 / cg"
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   386
!
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   387
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   388
printCommand:aString
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   389
    "UNIX only:
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   390
     set the command for printing (usually 'lp' or 'lpr').
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   391
     This is either set from the startup file, or via the launchers
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   392
     settings menu."
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   393
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   394
    PrintCommand := aString
139
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   395
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   396
    "
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   397
     PrinterStream printCommand:'lpr'
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   398
     PrinterStream printCommand:'lpr -h'
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   399
     PrinterStream printCommand:'rsh ibm lpr -h'
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   400
     PrinterStream printCommand:'gs -sDEVICE=djet500 -sOutputFile=/tmp/stx.ps -sPAPERSIZE=a4 -q -; cat /tmp/stx.ps | rsh ibm lpr -h'
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   401
    "
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   402
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   403
    "Modified: 18.5.1996 / 09:12:48 / cg"
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   404
!
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   405
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   406
printDevice
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   407
    "VMS only: return the device for printing (usually 'sys$print:')
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   408
     This is either set from the startup file, or via the launchers
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   409
     settings menu."
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   410
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   411
    PrintDevice isNil ifTrue:[
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   412
        self == PrinterStream ifFalse:[
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   413
            ^ self superclass printDevice
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   414
        ]
571
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   415
    ].
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   416
    ^ PrintDevice
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   417
!
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   418
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   419
printDevice:aString
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   420
    "VMS only:
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   421
     set the device for printing (usually 'sys$print:').
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   422
     This is either set from the startup file, or via the launchers
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   423
     settings menu."
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   424
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   425
    PrintCommand := aString
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   426
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   427
    "
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   428
     PrinterStream printDevice:'lta1739:'
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   429
    "
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   430
!
191b37534643 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   431
456
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   432
rightMargin
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   433
    "return the rightMargin (in inches). Here, no margin is supported,
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   434
     but its redefined in some printer classes"
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   435
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   436
    ^ 0
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   437
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   438
    "Modified: 5.9.1996 / 21:39:55 / cg"
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   439
    "Created: 6.11.1996 / 15:40:12 / cg"
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   440
!
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   441
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   442
topMargin
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   443
    "return the topMargin (in inches). Here, no margin is supported,
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   444
     but its redefined in some printer classes"
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   445
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   446
    ^ 0
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   447
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   448
    "Created: 5.9.1996 / 21:40:13 / cg"
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   449
! !
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   450
456
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   451
!PrinterStream class methodsFor:'queries'!
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   452
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   453
printerTypeName
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   454
    "return a descriptive name"
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   455
442
dcc6bcb69eba oops - linux has lpr, but is not bsd-like
dq
parents: 437
diff changeset
   456
    ^ 'dumb printer (or print filter)'
235
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   457
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   458
    "Modified: 18.4.1996 / 20:04:12 / cg"
139
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   459
!
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   460
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   461
supportsColor
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   462
    "return true if this is a color printer"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   463
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   464
    ^ false
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   465
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   466
    "Created: 3.6.1996 / 18:00:36 / cg"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   467
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   468
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   469
supportsMargins
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   470
    "return true if this printer supports margin settings (in inches)
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   471
     if not, it supports at least a leftMargin to be specified in columns."
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   472
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   473
    ^ false
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   474
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   475
    "Created: 3.6.1996 / 10:47:54 / cg"
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   476
    "Modified: 3.6.1996 / 18:24:20 / cg"
378
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   477
!
91abcf70e0c3 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 373
diff changeset
   478
368
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   479
supportsPageSizes
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   480
    "return true if this printer supports different page sizes"
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   481
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   482
    ^ false
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   483
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   484
    "Created: 31.5.1996 / 22:35:26 / cg"
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   485
!
423cf3f4e522 added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   486
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   487
supportsPostscript
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   488
    "return true if this is a postscript printer"
139
Claus Gittinger <cg@exept.de>
parents: 126
diff changeset
   489
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   490
    ^ false
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   491
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   492
    "Created: 10.2.1996 / 16:23:07 / cg"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   493
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   494
879
e69bf56dc758 category change
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   495
!PrinterStream methodsFor:'access-writing'!
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   496
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   497
next:count put:aCharacter
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   498
    "send some character multiple times to the printer - translate as needed.
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   499
     Redefined to allow individual character translation in subclasses"
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   500
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   501
    count timesRepeat:[
1109
3dd9d0a420a1 Default entry for pdf file generation.
Stefan Vogel <sv@exept.de>
parents: 1107
diff changeset
   502
        self nextPut:aCharacter
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   503
    ]
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   504
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   505
    "Created: 10.4.1996 / 13:08:13 / cg"
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   506
    "Modified: 10.4.1996 / 13:09:06 / cg"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   507
!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   508
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   509
nextPutAll:aCollection
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   510
    "send some characters to the printer - translate as needed.
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   511
     The argument, aCollection can be a Text (i.e. include emphasis)"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   512
381
9afd4993bc24 avoid #emphasis: messages if there is no change
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   513
    |lastE|
9afd4993bc24 avoid #emphasis: messages if there is no change
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   514
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   515
    native == true ifTrue:[
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   516
        ^ super nextPutAll:aCollection.
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   517
    ].
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   518
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   519
    aCollection hasChangeOfEmphasis ifTrue:[
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   520
        aCollection keysAndValuesDo:[:idx :aChar |
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   521
            |e|
381
9afd4993bc24 avoid #emphasis: messages if there is no change
Claus Gittinger <cg@exept.de>
parents: 379
diff changeset
   522
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   523
            e := aCollection emphasisAt:idx.
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   524
            (idx == 1
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   525
            or:[lastE ~~ e]) ifTrue:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   526
                self emphasis:e.
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   527
                lastE := e.
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   528
            ].
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   529
            self nextPut:aChar.
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   530
        ].
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   531
        self emphasis:nil.
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   532
    ] ifFalse:[
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   533
        aCollection do:[:aChar |
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   534
            self nextPut:aChar
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   535
        ]
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   536
    ]
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   537
1076
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   538
    "Modified: 3.6.1996 / 17:12:31 / cg"
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   539
!
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   540
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   541
nextPutAll:aCollection startingAt:first to:last
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   542
    "append the elements with index from first to last
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   543
     of the argument, aCollection onto the receiver.
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   544
     This is only allowed, if the receiver supports writing."
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   545
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   546
    aCollection from:first to:last do:[:element |
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   547
        self nextPut:element
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   548
    ].
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   549
    ^ aCollection
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   550
!
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   551
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   552
nextPutAllUntranslated:aCollection
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   553
    "send some raw characters to the printer - even if not in native mode"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   554
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   555
    super nextPutAll:aCollection
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   556
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   557
    "Modified: 10.4.1996 / 13:08:35 / cg"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   558
!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   559
468
7f0c61edae54 must also catch nextPutLine:
Claus Gittinger <cg@exept.de>
parents: 456
diff changeset
   560
nextPutLine:aCollection
7f0c61edae54 must also catch nextPutLine:
Claus Gittinger <cg@exept.de>
parents: 456
diff changeset
   561
    self nextPutAll:aCollection.
7f0c61edae54 must also catch nextPutLine:
Claus Gittinger <cg@exept.de>
parents: 456
diff changeset
   562
    self cr
7f0c61edae54 must also catch nextPutLine:
Claus Gittinger <cg@exept.de>
parents: 456
diff changeset
   563
7f0c61edae54 must also catch nextPutLine:
Claus Gittinger <cg@exept.de>
parents: 456
diff changeset
   564
    "Created: 3.1.1997 / 19:43:56 / cg"
7f0c61edae54 must also catch nextPutLine:
Claus Gittinger <cg@exept.de>
parents: 456
diff changeset
   565
!
7f0c61edae54 must also catch nextPutLine:
Claus Gittinger <cg@exept.de>
parents: 456
diff changeset
   566
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   567
nextPutUntranslated:aCharacter
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   568
    "send a raw character to the printer - even if not in native mode"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   569
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   570
    super nextPut:aCharacter
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   571
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   572
    "Modified: 10.4.1996 / 13:08:28 / cg"
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   573
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   574
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   575
!PrinterStream methodsFor:'emphasis change'!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   576
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   577
bold
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   578
    "set emphasis to bold
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   579
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   580
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   581
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   582
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   583
    "Modified: 18.5.1996 / 08:55:10 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   584
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   585
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   586
boldItalic
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   587
    "set emphasis to boldItalic
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   588
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   589
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   590
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   591
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   592
    "Created: 14.5.1996 / 18:53:43 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   593
    "Modified: 18.5.1996 / 08:55:14 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   594
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   595
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   596
emphasis:anEmphasis
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   597
    "change the emphasis"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   598
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   599
    |b i|
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   600
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   601
    (Text emphasis:anEmphasis includes:#underline) ifTrue:[
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   602
        underline ifFalse:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   603
            self underline
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   604
        ]
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   605
    ] ifFalse:[
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   606
        underline ifTrue:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   607
            self noUnderline
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   608
        ]
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   609
    ].
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   610
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   611
    (Text emphasis:anEmphasis includes:#strikeout) ifTrue:[
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   612
        strikeout ifFalse:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   613
            self strikeout
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   614
        ]
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   615
    ] ifFalse:[
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   616
        strikeout ifTrue:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   617
            self noStrikeout
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   618
        ]
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   619
    ].
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   620
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   621
    b := (Text emphasis:anEmphasis includes:#bold).
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   622
    i := (Text emphasis:anEmphasis includes:#italic).
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   623
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   624
    b ifTrue:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   625
        i ifTrue:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   626
            ^ self boldItalic
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   627
        ] ifFalse:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   628
            ^ self bold
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   629
        ]
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   630
    ] ifFalse:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   631
        i ifTrue:[
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   632
            ^ self italic
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   633
        ]
349
e2806ca1c634 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 348
diff changeset
   634
    ].
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   635
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   636
    ^ self normal
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   637
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   638
    "Modified: 8.6.1996 / 08:15:00 / cg"
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   639
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   640
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   641
italic
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   642
    "set emphasis to italic
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   643
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   644
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   645
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   646
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   647
    "Modified: 18.5.1996 / 08:55:18 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   648
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   649
392
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   650
noStrikeout
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   651
    "set emphasis to no strikeout
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   652
     - ignore here, since this class does not know anything about the printer"
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   653
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   654
    ^ self
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   655
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   656
    "Modified: 18.5.1996 / 08:55:10 / cg"
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   657
    "Created: 8.6.1996 / 08:15:20 / cg"
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   658
!
bf31405a1f65 bold & italic & strikeout
ca
parents: 390
diff changeset
   659
390
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   660
noUnderline
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   661
    "set emphasis to no underline
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   662
     - ignore here, since this class does not know anything about the printer"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   663
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   664
    ^ self
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   665
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   666
    "Modified: 18.5.1996 / 08:55:10 / cg"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   667
    "Created: 8.6.1996 / 08:15:12 / cg"
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   668
!
3f22865fa873 fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents: 386
diff changeset
   669
348
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   670
normal
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   671
    "set emphasis to normal (non-bold, non-italic)
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   672
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   673
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   674
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   675
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   676
    "Modified: 18.5.1996 / 08:55:21 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   677
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   678
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   679
strikeout
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   680
    "set emphasis to strikeout
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   681
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   682
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   683
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   684
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   685
    "Modified: 18.5.1996 / 08:55:10 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   686
    "Created: 18.5.1996 / 08:56:13 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   687
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   688
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   689
underline
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   690
    "set emphasis to underline
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   691
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   692
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   693
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   694
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   695
    "Modified: 18.5.1996 / 08:55:10 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   696
    "Created: 18.5.1996 / 08:56:24 / cg"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   697
! !
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   698
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   699
!PrinterStream methodsFor:'font change'!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   700
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   701
courier
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   702
    "set font to courier 
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   703
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   704
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   705
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   706
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   707
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   708
helvetica
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   709
    "set font to helvetic
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   710
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   711
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   712
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   713
!
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   714
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   715
times
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   716
    "set font to times 
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   717
     - ignore here, since this class does not know anything about the printer"
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   718
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   719
    ^ self
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   720
! !
e4790af5d077 comments & category rename
Claus Gittinger <cg@exept.de>
parents: 341
diff changeset
   721
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   722
!PrinterStream methodsFor:'helpers writing'!
6
claus
parents: 4
diff changeset
   723
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   724
escape:aCharacter
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   725
    "since its so common, this method sends escape followed by aCharacter"
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   726
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   727
    super nextPut:(Character escape); nextPut:aCharacter
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   728
!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   729
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   730
escapeAll:aString
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   731
    "since its so common, this method sends escape followed by aString"
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   732
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   733
    super nextPut:(Character escape); nextPutAll:aString
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   734
! !
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   735
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   736
!PrinterStream methodsFor:'initialization'!
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   737
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   738
initialize
914
7db1f3375ac9 Use startPrint from superclass.
Stefan Vogel <sv@exept.de>
parents: 913
diff changeset
   739
    pageFormat := DefaultPageFormat.
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   740
1076
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   741
    "Created: 31.5.1996 / 20:14:36 / cg"
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   742
! !
367
647af479888f added stuff for pageFormat
Claus Gittinger <cg@exept.de>
parents: 362
diff changeset
   743
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   744
!PrinterStream methodsFor:'open/close'!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   745
160
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   746
basicClose
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   747
    super close
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   748
!
879568e66211 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   749
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   750
close
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   751
    self endPrint.
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   752
    super close
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   753
!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   754
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   755
endPrint
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   756
    ^ self
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   757
!
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   758
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   759
setNative
913
99228537653d Speed up native printing: #nextPutAll
Stefan Vogel <sv@exept.de>
parents: 879
diff changeset
   760
    self setNative:true
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   761
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   762
!
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   763
362
94d228545422 allow reset of nativeMode
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   764
setNative:aBoolean
94d228545422 allow reset of nativeMode
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   765
    native := aBoolean
94d228545422 allow reset of nativeMode
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   766
94d228545422 allow reset of nativeMode
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   767
    "Created: 30.5.1996 / 17:49:09 / cg"
94d228545422 allow reset of nativeMode
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   768
!
94d228545422 allow reset of nativeMode
Claus Gittinger <cg@exept.de>
parents: 349
diff changeset
   769
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   770
startPrint
751
5f8d228a48fd fix for new pipe-protocol
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   771
    self 
5f8d228a48fd fix for new pipe-protocol
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   772
        openPipeFor:(self class printCommand) 
5f8d228a48fd fix for new pipe-protocol
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   773
        withMode:'w' 
5f8d228a48fd fix for new pipe-protocol
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   774
        errorDisposition:#stderr 
914
7db1f3375ac9 Use startPrint from superclass.
Stefan Vogel <sv@exept.de>
parents: 913
diff changeset
   775
        inDirectory:nil.
370
705453f00711 keep per-printer defaults
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   776
1076
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   777
    "Modified: / 26.5.1999 / 16:14:57 / cg"
4bb0e9411317 Define #nextPutAll:startingAt:to: to fix Text>>printOn:aPrinterStream
Stefan Vogel <sv@exept.de>
parents: 914
diff changeset
   778
! !
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   779
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   780
!PrinterStream methodsFor:'queries'!
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   781
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   782
bottomMargin
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   783
    ^ self class bottomMargin
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   784
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   785
    "Modified: 3.6.1996 / 10:27:45 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   786
    "Created: 5.9.1996 / 21:37:26 / cg"
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   787
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   788
379
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   789
isPrinterStream
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   790
    "return true, if this is a printerStream.
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   791
     Always true here."
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   792
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   793
    ^ true
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   794
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   795
    "Created: 3.6.1996 / 12:06:21 / cg"
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   796
!
ae282a246159 added #isPrinterStream
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   797
627
8003af47744a add landscape
ca
parents: 571
diff changeset
   798
landscape
8003af47744a add landscape
ca
parents: 571
diff changeset
   799
    ^ self class landscape
8003af47744a add landscape
ca
parents: 571
diff changeset
   800
8003af47744a add landscape
ca
parents: 571
diff changeset
   801
    "Modified: 3.6.1996 / 10:27:45 / cg"
8003af47744a add landscape
ca
parents: 571
diff changeset
   802
    "Created: 5.9.1996 / 21:38:23 / cg"
8003af47744a add landscape
ca
parents: 571
diff changeset
   803
!
8003af47744a add landscape
ca
parents: 571
diff changeset
   804
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   805
leftMargin
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   806
    ^ self class leftMargin
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   807
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   808
    "Modified: 3.6.1996 / 10:27:45 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   809
    "Created: 5.9.1996 / 21:38:23 / cg"
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   810
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   811
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   812
lineLength
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   813
    "the printer pages width (in characters)"
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   814
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   815
    ^ 80
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   816
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   817
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   818
pageFormat
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   819
    ^ self class pageFormat
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   820
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   821
    "Modified: 3.6.1996 / 10:27:45 / cg"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   822
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   823
437
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   824
rightMargin
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   825
    ^ self class rightMargin
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   826
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   827
    "Modified: 3.6.1996 / 10:27:45 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   828
    "Created: 5.9.1996 / 21:38:23 / cg"
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   829
!
59142d78f87d rightMargin
ca
parents: 436
diff changeset
   830
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   831
supportsColor
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   832
    "return true if this is a color printer"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   833
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   834
    ^ self class supportsColor
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   835
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   836
    "Created: 3.6.1996 / 18:00:27 / cg"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   837
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   838
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   839
supportsMargins
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   840
    "return true if this printer supports margin settings (in inches)
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   841
     if not, it supports at least a leftMargin to be specified in columns."
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   842
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   843
    ^ self class supportsMargins
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   844
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   845
    "Created: 3.6.1996 / 17:59:35 / cg"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   846
    "Modified: 3.6.1996 / 18:24:04 / cg"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   847
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   848
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   849
supportsPostscript
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   850
    "return true if this is a postscript printer"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   851
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   852
    ^ self class supportsPostscript
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   853
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   854
    "Created: 3.6.1996 / 17:59:58 / cg"
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   855
!
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   856
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   857
topMargin
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   858
    ^ self class topMargin
383
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   859
d5bb2a7cf2ff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 381
diff changeset
   860
    "Modified: 3.6.1996 / 10:27:45 / cg"
433
2b5b9df0981c renamed *Inset to *Margin; cleanup.
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   861
    "Created: 5.9.1996 / 21:40:32 / cg"
221
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   862
! !
7bc2c2d89ede added native setting (suppress trailer in PS-subclass)
Claus Gittinger <cg@exept.de>
parents: 211
diff changeset
   863
456
37b86d48d290 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 443
diff changeset
   864
!PrinterStream class methodsFor:'documentation'!
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   865
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   866
version
1220
33fa58c0596d category
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   867
    ^ '$Header: /cvs/stx/stx/libbasic2/PrinterStream.st,v 1.58 2003-05-19 09:44:22 cg Exp $'
186
bc1b056b097c added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents: 179
diff changeset
   868
! !
1107
8ea38fa19bd6 ghostview -> gv
ca
parents: 1076
diff changeset
   869
126
fca9404da9d4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   870
PrinterStream initialize!