rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvWindowsDevice Class Reference

Windows-specific class to predefine printer devices. More...

#include <ilviews/windows/dump.h>

Inheritance diagram for IlvWindowsDevice:
IlvWindowsVirtualDevice IlvSystemPort IlvPort

List of all members.

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.
IlvWindowsPrinterDCFactorygetPrinterDCFactory () 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.

Detailed Description

Windows-specific class to predefine printer devices.

Library: display

This class encapsulates printing devices that are specific to Windows.

See also:
IlvGetWindowsPrinter
IlvWindowsPrinter.

Constructor & Destructor Documentation

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.

Parameters:
display A pointer to the display.
factory A pointer to a factory to create the device context.

Member Function Documentation

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:

  • Call the method end() of the superclass.
  • Remove and destroy the specific data.

Reimplemented from IlvWindowsVirtualDevice.

char const * IlvWindowsDevice::getDocName (  )  const

Gets the name of the printed document.

By default, it is the string IlogViews.

Returns:
The name of the printed document.
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.

Returns:
The orientation of the paper.
const char * IlvWindowsDevice::getOutputFile (  )  const

Gets the name of the output file.

By default, it is the string NULL (that is the printer).

Returns:
The name of the output file.
IlvDim IlvWindowsDevice::getPaperHeight (  )  const

Gets the height of the paper.

Returns:
The height of the paper.
IlvDim IlvWindowsDevice::getPaperWidth (  )  const

Gets the width of the paper.

Returns:
The width of the paper (an IlvDim).
IlvWindowsPrinterDCFactory * IlvWindowsDevice::getPrinterDCFactory (  )  const

Gets the factory used to create the printer DC.

Returns:
The factory used to create the printer DC.
See also:
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.

Parameters:
printer Used to indicate the output of the dump.
clip The clipping rectangle to be used when drawing.
See also:
IlvPort::initDevice()
IlvGetWindowsPrinter
IlvWindowsPrinterDCFactory.

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.

Returns:
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.

Parameters:
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.

Parameters:
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.

Parameters:
orientation The new orientation of the paper.
void IlvWindowsDevice::setOutputFile ( const char *  outputFileName  ) 

Sets the name of the output file.

Parameters:
outputFileName The new name of the output file.
void IlvWindowsDevice::setPrinterDCFactory ( IlvWindowsPrinterDCFactory factory  ) 

Sets the factory to create the printer DC.

Parameters:
factory The new factory used to create the printer DC.
See also:
IlvWindowsPrinterDCFactory.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.