PrinterStream.st
changeset 378 91abcf70e0c3
parent 373 6834d6a61ea9
child 379 ae282a246159
equal deleted inserted replaced
377:3be86dc85537 378:91abcf70e0c3
   175 
   175 
   176     ^ self basicNew initialize setNative; writingTo:(self printCommand)
   176     ^ self basicNew initialize setNative; writingTo:(self printCommand)
   177 ! !
   177 ! !
   178 
   178 
   179 !PrinterStream class methodsFor:'accessing - defaults'!
   179 !PrinterStream class methodsFor:'accessing - defaults'!
       
   180 
       
   181 bottomInset
       
   182     "return the bottomInset (in inches). Here, no bottom inset is supported,
       
   183      but its redefined in some printer classes"
       
   184 
       
   185     ^ 0
       
   186 
       
   187     "Created: 3.6.1996 / 10:43:44 / cg"
       
   188 !
   180 
   189 
   181 defaultCommands
   190 defaultCommands
   182     "return a list presented as possible commands for printed
   191     "return a list presented as possible commands for printed
   183      (in the launchers printer configuration).
   192      (in the launchers printer configuration).
   184      This list can be set from the startup script with:
   193      This list can be set from the startup script with:
   276     self reInitPage.
   285     self reInitPage.
   277 
   286 
   278     "Modified: 1.6.1996 / 00:49:22 / cg"
   287     "Modified: 1.6.1996 / 00:49:22 / cg"
   279 !
   288 !
   280 
   289 
       
   290 leftInset
       
   291     "return the leftInset (in inches). Here, no left inset is supported,
       
   292      but its redefined in some printer classes"
       
   293 
       
   294     ^ 0
       
   295 
       
   296     "Created: 3.6.1996 / 10:43:28 / cg"
       
   297 !
       
   298 
   281 leftMargin
   299 leftMargin
   282     "return the number of blanks for the left margin"
   300     "return the number of blanks for the left margin"
   283 
   301 
   284     LeftMargin isNil ifTrue:[
   302     LeftMargin isNil ifTrue:[
   285         self == PrinterStream ifFalse:[
   303         self == PrinterStream ifFalse:[
   356      PrinterStream printCommand:'rsh ibm lpr -h'
   374      PrinterStream printCommand:'rsh ibm lpr -h'
   357      PrinterStream printCommand:'gs -sDEVICE=djet500 -sOutputFile=/tmp/stx.ps -sPAPERSIZE=a4 -q -; cat /tmp/stx.ps | rsh ibm lpr -h'
   375      PrinterStream printCommand:'gs -sDEVICE=djet500 -sOutputFile=/tmp/stx.ps -sPAPERSIZE=a4 -q -; cat /tmp/stx.ps | rsh ibm lpr -h'
   358     "
   376     "
   359 
   377 
   360     "Modified: 18.5.1996 / 09:12:48 / cg"
   378     "Modified: 18.5.1996 / 09:12:48 / cg"
       
   379 !
       
   380 
       
   381 topInset
       
   382     "return the topInset (in inches). Here, no top inset is supported,
       
   383      but its redefined in some printer classes"
       
   384 
       
   385     ^ 0
       
   386 
       
   387     "Created: 3.6.1996 / 10:43:40 / cg"
   361 ! !
   388 ! !
   362 
   389 
   363 !PrinterStream class methodsFor:'queries'!
   390 !PrinterStream class methodsFor:'queries'!
   364 
   391 
   365 printerTypeName
   392 printerTypeName
   366     "return a descriptive name"
   393     "return a descriptive name"
   367 
   394 
   368     ^ 'dumb printer'
   395     ^ 'dumb printer'
   369 
   396 
   370     "Modified: 18.4.1996 / 20:04:12 / cg"
   397     "Modified: 18.4.1996 / 20:04:12 / cg"
       
   398 !
       
   399 
       
   400 supportsMargins
       
   401     "return true if this printer supports margin settings"
       
   402 
       
   403     ^ false
       
   404 
       
   405     "Created: 3.6.1996 / 10:47:54 / cg"
   371 !
   406 !
   372 
   407 
   373 supportsPageSizes
   408 supportsPageSizes
   374     "return true if this printer supports different page sizes"
   409     "return true if this printer supports different page sizes"
   375 
   410 
   455     super nextPut:aCharacter
   490     super nextPut:aCharacter
   456 
   491 
   457     "Modified: 10.4.1996 / 13:08:28 / cg"
   492     "Modified: 10.4.1996 / 13:08:28 / cg"
   458 ! !
   493 ! !
   459 
   494 
       
   495 !PrinterStream methodsFor:'accessing'!
       
   496 
       
   497 pageFormat
       
   498     ^ self class pageFormat
       
   499 
       
   500     "Modified: 3.6.1996 / 10:27:45 / cg"
       
   501 ! !
       
   502 
   460 !PrinterStream methodsFor:'emphasis change'!
   503 !PrinterStream methodsFor:'emphasis change'!
   461 
   504 
   462 bold
   505 bold
   463     "set emphasis to bold
   506     "set emphasis to bold
   464      - ignore here, since this class does not know anything about the printer"
   507      - ignore here, since this class does not know anything about the printer"
   631 ! !
   674 ! !
   632 
   675 
   633 !PrinterStream class methodsFor:'documentation'!
   676 !PrinterStream class methodsFor:'documentation'!
   634 
   677 
   635 version
   678 version
   636     ^ '$Header: /cvs/stx/stx/libbasic2/PrinterStream.st,v 1.30 1996-05-31 22:49:47 cg Exp $'
   679     ^ '$Header: /cvs/stx/stx/libbasic2/PrinterStream.st,v 1.31 1996-06-03 10:02:46 cg Exp $'
   637 ! !
   680 ! !
   638 PrinterStream initialize!
   681 PrinterStream initialize!