Model Railroad System
2.2.1
|
Derived class for printing on Postscript printers. More...
#include <PostScriptPrinter.h>
Public Member Functions | |
PostScriptPrinterDevice (const string filename="", const string title_="", PageSize pageSize=Letter, char **outmessage=NULL) | |
Constructor. More... | |
virtual bool | OpenPrinter (const string filename, PageSize pageSize=Letter, char **outmessage=NULL) |
Member function to open the printer. More... | |
virtual bool | ClosePrinter (char **outmessage) |
Close the printer. More... | |
virtual bool | SetTypeSpacing (TypeSpacing spacing) |
Set the the spacing. More... | |
virtual bool | SetTypeWeight (TypeWeight weight) |
Set the type weight. More... | |
virtual bool | SetTypeSlant (TypeSlant slant) |
Set the type slant. More... | |
virtual bool | NewPage (const string heading="") |
Perform a page feed and print a heading. More... | |
virtual bool | PutLine (const string line="") |
Print out a string and follow it with a new line sequence. More... | |
virtual bool | Put (const string text) |
Print a string of text. More... | |
virtual bool | Tab (int column) |
Tab over to the specified column. More... | |
virtual | ~PostScriptPrinterDevice () |
Destructor. More... | |
![]() | |
PrinterDevice (const string filename="", const string title="", PageSize pageSize_=Letter, char **outmessage=NULL) | |
Constructor. More... | |
bool | IsOpenP () const |
Is the printer open? More... | |
PageSize | PrinterPageSize () const |
Return the page size. More... | |
virtual bool | Put (int number) |
Print an integer. More... | |
virtual bool | Put (double number) |
Print a double. More... | |
virtual | ~PrinterDevice () |
Destructor. More... | |
Private Member Functions | |
bool | PutPageHeader () |
Function to put the page header. More... | |
const string | PSQuote (const string s) const |
Function to PostScript quote a string. More... | |
Private Attributes | |
ofstream | printerStream |
Output stream. More... | |
string | title |
The document title. More... | |
int | pages |
The page count. More... | |
int | lines |
The line count. More... | |
int | maxLines |
The maximum number of lines per page. More... | |
bool | partline |
Partial line flag. More... | |
bool | needPageHeader |
Flag to let us know if we need a page header,. More... | |
Additional Inherited Members | |
![]() | |
enum | PageSize { Letter, A4 } |
Page size selection, for those printers that support different page sizes. More... | |
enum | TypeSpacing { One, Half, Double } |
Horizontal type spacing. More... | |
enum | TypeWeight { Normal, Bold } |
Type weight. More... | |
enum | TypeSlant { Roman, Italic } |
Type slant. More... | |
![]() | |
bool | isOpenP |
Is open flag. More... | |
PageSize | pageSize |
Document page size. More... | |
Derived class for printing on Postscript printers.
Uses a standard 12pt Courier family of fonts and simulates an impact printer.
FCFSupport::PostScriptPrinterDevice::PostScriptPrinterDevice | ( | const string | filename = "" , |
const string | title_ = "" , |
||
PageSize | pageSize = Letter , |
||
char ** | outmessage = NULL |
||
) |
Constructor.
Create a new printer device instance from a set of parameters, all of which have default values, so this also doubles as the default base constructor.
filename | Output filename. |
title | An internal document title string. |
pageSize | The page size to use. |
outmessage | Pointer to a pointer to receive any error messages for any errors that might occur. This parameter is hidden from the Tcl interface. |
|
virtual |
Destructor.
Close the printer.
|
virtual |
Close the printer.
outmessage | Pointer to a pointer to receive any error messages for any errors that might occur. This parameter is hidden from the Tcl interface. |
Reimplemented from FCFSupport::PrinterDevice.
|
virtual |
Perform a page feed and print a heading.
heading | The heading string. |
Reimplemented from FCFSupport::PrinterDevice.
|
virtual |
Member function to open the printer.
filename | Output filename. |
pageSize | The page size to use. |
outmessage | Pointer to a pointer to receive any error messages for any errors that might occur. This parameter is hidden from the Tcl interface. |
Reimplemented from FCFSupport::PrinterDevice.
|
private |
Function to PostScript quote a string.
s | The string to quote. |
|
virtual |
Print a string of text.
Don't include a newline.
text | The string to print. |
Reimplemented from FCFSupport::PrinterDevice.
|
virtual |
Print out a string and follow it with a new line sequence.
line | The line to print. |
Reimplemented from FCFSupport::PrinterDevice.
|
private |
Function to put the page header.
|
virtual |
Set the type slant.
slant | The new type slant. |
Reimplemented from FCFSupport::PrinterDevice.
|
virtual |
Set the the spacing.
spacing | The new type spacing. |
Reimplemented from FCFSupport::PrinterDevice.
|
virtual |
Set the type weight.
weight | The new type weight. |
Reimplemented from FCFSupport::PrinterDevice.
|
virtual |
Tab over to the specified column.
column | The desired tab column. |
Reimplemented from FCFSupport::PrinterDevice.
|
private |
The line count.
|
private |
The maximum number of lines per page.
|
private |
Flag to let us know if we need a page header,.
|
private |
The page count.
|
private |
Partial line flag.
|
private |
Output stream.
|
private |
The document title.