Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Windows-specific class to predefine printer devices. More...
#include <ilviews/windows/dump.h>
Public Member Functions | |
IlvWindowsDevice (IlvDisplay *display, IlvWindowsPrinterDCFactory *factory=0) | |
Constructor. | |
virtual void | end () |
Ends the dump devices. | |
char const * | getDocName () const |
Gets the name of the printed document. | |
IlShort | getOrientation () const |
Gets the orientation of the paper. | |
char const * | getOutputFile () const |
Gets the name of the output file. | |
IlvDim | getPaperHeight () const |
Gets the height of the paper. | |
IlvDim | getPaperWidth () const |
Gets the width of the paper. | |
IlvWindowsPrinterDCFactory * | getPrinterDCFactory () const |
Gets the factory used to create the printer DC. | |
virtual IlBoolean | initDevice (const char *printer, IlvRect *clip=0) |
Initializes the dump device. | |
virtual IlBoolean | newPage () const |
Produces an output page and prepares for a new page. | |
virtual void | send (const char *) const |
Sends character strings to an output device. | |
void | setDocName (const char *docName) |
Sets the name of the printed document. | |
void | setOrientation (IlShort orientation) |
Sets the orientation of the paper. | |
void | setOutputFile (const char *outputFileName) |
Sets the name of the output file. | |
void | setPrinterDCFactory (IlvWindowsPrinterDCFactory *factory) |
Sets the factory to create the printer DC. |
Windows-specific class to predefine printer devices.
Library: display
This class encapsulates printing devices that are specific to Windows.
IlvGetWindowsPrinter
IlvWindowsPrinter
. IlvWindowsDevice::IlvWindowsDevice | ( | IlvDisplay * | display, | |
IlvWindowsPrinterDCFactory * | factory = 0 | |||
) |
Constructor.
The pointer to an IlvWindowsPrinterDCFactory
is used in the initDevice()
function, when its first parameter is null
. It actually creates the device context for the printer.
If this pointer is null
then the previous mechanism is used.
display | A pointer to the display. | |
factory | A pointer to a factory to create the device context. |
virtual void IlvWindowsDevice::end | ( | ) | [virtual] |
Ends the dump devices.
This member function closes the dump devices and does all the necessary cleaning operations. If you redefine this function in subclasses, do the following:
end()
of the superclass. Reimplemented from IlvWindowsVirtualDevice.
char const * IlvWindowsDevice::getDocName | ( | ) | const |
Gets the name of the printed document.
By default, it is the string IlogViews
.
IlShort IlvWindowsDevice::getOrientation | ( | ) | const |
Gets the orientation of the paper.
The values are the same as the ones specified in the member dmOrientation
of the Windows structure DEVMODE
.
const char * IlvWindowsDevice::getOutputFile | ( | ) | const |
Gets the name of the output file.
By default, it is the string NULL
(that is the printer).
IlvDim IlvWindowsDevice::getPaperHeight | ( | ) | const |
Gets the height of the paper.
IlvDim IlvWindowsDevice::getPaperWidth | ( | ) | const |
Gets the width of the paper.
IlvDim
). IlvWindowsPrinterDCFactory * IlvWindowsDevice::getPrinterDCFactory | ( | ) | const |
Gets the factory used to create the printer DC.
IlvWindowsPrinterDCFactory
. virtual IlBoolean IlvWindowsDevice::initDevice | ( | const char * | printer, | |
IlvRect * | clip = 0 | |||
) | [virtual] |
Initializes the dump device.
See IlvPort::initDevice()
for a general explanation of this method. In this class, the parameter printer may be either a string returned by the function IlvGetWindowsPrinter()
or a string that is the name of a printer available for Windows. If this parameter is null
, then the registered IlvWindowsPrinterDCFactory
is called to actually initialize the printer.
printer | Used to indicate the output of the dump. | |
clip | The clipping rectangle to be used when drawing. |
Reimplemented from IlvWindowsVirtualDevice.
virtual IlBoolean IlvWindowsDevice::newPage | ( | ) | const [virtual] |
Produces an output page and prepares for a new page.
Produces an output page and prepares the dump device for a new page. If there has been an error, you should stop producing output data.
IlFalse
if there has been an error. Reimplemented from IlvWindowsVirtualDevice.
virtual void IlvWindowsDevice::send | ( | const char * | string | ) | const [virtual] |
Sends character strings to an output device.
Sends any character string to an output device to send information to the device.
string | The string sent to the device. It is the responsibility of the device to interpret this string and perform the proper job. |
Reimplemented from IlvSystemPort.
void IlvWindowsDevice::setDocName | ( | const char * | docName | ) |
Sets the name of the printed document.
docName | The new name of the printed document. |
void IlvWindowsDevice::setOrientation | ( | IlShort | orientation | ) |
Sets the orientation of the paper.
This function should be called before invoking the initDevice()
method. If you want to change the paper orientation once the device has been initialized, you must close the device, call setOrientation()
, and then invoke initDevice()
once again.
The values are the same as the ones specified in the member dmOrientation
of the Windows structure DEVMODE
.
orientation | The new orientation of the paper. |
void IlvWindowsDevice::setOutputFile | ( | const char * | outputFileName | ) |
Sets the name of the output file.
outputFileName | The new name of the output file. |
void IlvWindowsDevice::setPrinterDCFactory | ( | IlvWindowsPrinterDCFactory * | factory | ) |
Sets the factory to create the printer DC.
factory | The new factory used to create the printer DC. |
IlvWindowsPrinterDCFactory
. © Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.