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. More... | |
virtual void | end () |
Ends the dump devices. More... | |
char const * | getDocName () const |
Gets the name of the printed document. More... | |
IlShort | getOrientation () const |
Gets the orientation of the paper. More... | |
char const * | getOutputFile () const |
Gets the name of the output file. More... | |
IlvDim | getPaperHeight () const |
Gets the height of the paper. More... | |
IlvDim | getPaperWidth () const |
Gets the width of the paper. More... | |
IlvWindowsPrinterDCFactory * | getPrinterDCFactory () const |
Gets the factory used to create the printer DC. More... | |
virtual IlBoolean | initDevice (const char *printer, IlvRect *clip=0) |
Initializes the dump device. More... | |
virtual IlBoolean | newPage () const |
Produces an output page and prepares for a new page. More... | |
virtual void | send (const char *) const |
Sends character strings to an output device. More... | |
void | setDocName (const char *docName) |
Sets the name of the printed document. More... | |
void | setOrientation (IlShort orientation) |
Sets the orientation of the paper. More... | |
void | setOutputFile (const char *outputFileName) |
Sets the name of the output file. More... | |
void | setPrinterDCFactory (IlvWindowsPrinterDCFactory *factory) |
Sets the factory to create the printer DC. More... | |
Public Member Functions inherited from IlvWindowsVirtualDevice | |
virtual void | clip (const IlvRect *) const |
Limits the drawing to the given rectangular area. More... | |
virtual void | clip (const IlvRegion *) const |
Limits the drawing to the given region. More... | |
virtual void | fillRectangle (const IlvPalette *palette, const IlvRect &rect) const |
Fills the given rectangle. More... | |
IlUInt | getCompatibility () const |
Gets the compatible version of the dump device. More... | |
HDC | getHDC () const |
Gets the Windows HDC (Handle Device Context). More... | |
int | getMapMode () const |
Gets the mapping mode. More... | |
virtual IlBoolean | isADevice () const |
Queries the nature of this port. More... | |
virtual IlBoolean | isBad () const |
Indicates whether this port is valid. More... | |
void | setCompatibility (IlUInt version) |
Sets compatible version of the dump device. More... | |
void | setHDC (HDC hdc) |
Sets the Windows HDC (Handle Device Context). More... | |
void | setMapMode (int mode) |
Sets the mapping mode. More... | |
virtual void | setTransformer (const IlvTransformer &) |
Applies another transformer to the coordinates provided for the drawing functions. More... | |
Public Member Functions inherited from IlvSystemPort | |
IlvSystemPort (IlvDisplay *display, IlvWindowsHandle HDC, IlvDim width=0, IlvDim height=0) | |
Windows-specific constructor. More... | |
virtual void | clearArea (const IlvRect &, IlBoolean=IlFalse) const |
Clears a rectangular area of the screen. More... | |
virtual void | clearArea (const IlvRegion &, IlBoolean=IlFalse) const |
Clears a region of the screen. More... | |
virtual IlUShort | depth () const |
Gives the depth of the port. More... | |
virtual void | drawArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const |
Draws an arc. More... | |
virtual void | drawBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const |
Draws an image. More... | |
virtual void | drawBitmap (const IlvPalette *, const IlvBitmap *, const IlvRect &, const IlvRegion *=0, IlvPosition=IlvCenter, IlBoolean=IlFalse) const |
Draws an image. More... | |
virtual void | drawIString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const |
Draws a string at the given position. More... | |
virtual void | drawLine (const IlvPalette *, const IlvPoint &, const IlvPoint &) const |
Draws a line between 2 points. More... | |
virtual void | drawPoint (const IlvPalette *, const IlvPoint &) const |
Draws a point at the given position. More... | |
virtual void | drawPoints (const IlvPalette *, IlUInt, const IlvPoint *) const |
Draws a series of points. More... | |
virtual void | drawPolyLine (const IlvPalette *, IlUInt, const IlvPoint *) const |
Draws a series of connected lines. More... | |
virtual void | drawPolyLine (const IlvPalette *, const IlvPoint &, IlUInt, const IlvDeltaPoint *) const |
Draws a series of connected lines relatively to a reference. More... | |
virtual void | drawRectangle (const IlvPalette *, const IlvRect &) const |
Draws the given rectangle. More... | |
virtual void | drawRoundRectangle (const IlvPalette *, const IlvRect &, IlUShort) const |
Draws a round rectangle. More... | |
virtual void | drawSegments (const IlvPalette *, IlUInt, const IlvPoint *, const IlvPoint *) const |
Draws a set of segments. More... | |
virtual void | drawString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const |
Draws a string at the given position. More... | |
virtual void | drawTransformedString (const IlvPalette *, const char *, int, const IlvTransformer &, const IlvRegion *=0) const |
Draws a transformed string. More... | |
virtual void | drawTransparentBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const |
Draws a transparent bitmap. More... | |
virtual void | fillArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const |
Fills the arc. More... | |
virtual void | fillPaths (const IlvPalette *, IlUInt, const IlvPointArray *) const |
Fills the shape defined by the given paths. More... | |
virtual void | fillPolyLine (const IlvPalette *, IlUInt, const IlvPoint *, IlBoolean=IlFalse) const |
Fills a polygon. More... | |
virtual void | fillPolyLine (const IlvPalette *, const IlvPoint &, IlUInt, const IlvDeltaPoint *, IlBoolean=IlFalse) const |
Fills a polygon. More... | |
virtual void | fillRoundRectangle (const IlvPalette *, const IlvRect &, IlUShort) const |
Fills a round rectangle. More... | |
IlvWindowsHandle | getDC () const |
Gets the Windows Handle Device Context. More... | |
virtual IlBoolean | isABitmap () const |
Indicates that this port is a bitmap (not a view or a dump device). More... | |
virtual IlBoolean | isASystemPort () const |
Indicates that this port is a true system port (not a dump device). More... | |
void | releaseDC () |
Releases the Windows Handle Device Context. More... | |
virtual void | stretchBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const |
Stretches a bitmap. More... | |
virtual void | stretchBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const |
Stretches a bitmap. More... | |
virtual void | stretchBitmapData (const IlvPalette *palette, const IlvBitmapData *src, const IlvRect &from, const IlvRect &to, IlBoolean opaque=IlFalse) const |
Draws a bitmap data. More... | |
virtual void | stretchTransparentBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const |
Stretches a transparent bitmap. More... | |
virtual void | stretchTransparentBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const |
Stretches a transparent bitmap. More... | |
Public Member Functions inherited from IlvPort | |
IlvPort (IlvDisplay *display=0) | |
Constructor. More... | |
void | composeAlpha (IlvIntensity alpha) |
Composes the current alpha value of the port. More... | |
virtual void | drawArrow (const IlvPalette *palette, const IlvPoint &from, const IlvPoint &to, IlFloat position) const |
Draws an arrow. More... | |
virtual void | drawBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const |
Draws a set of Bézier curves. More... | |
virtual void | drawClosedBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const |
Appends a closing curve to a set of Bézier curves. More... | |
virtual void | drawILabel (const IlvPalette *palette, const char *label, int length, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter) const |
Draws a label in a rectangle. More... | |
virtual void | drawLabel (const IlvPalette *palette, const char *label, int length, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter) const |
Draws a label in a rectangle. More... | |
virtual void | drawMarker (const IlvPalette *palette, const IlvPoint &location, IlvMarkerType type=IlvMarkerSquare, IlUShort size=IlvDefaultMarkerSize) const |
Draws a marker. More... | |
virtual void | drawMnemonicLabel (const IlvPalette *palette, const char *label, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter, IlBoolean underline=IlTrue) const |
Draws an underlined letter in a label. More... | |
virtual void | drawOutlineRectangle (const IlvPalette *outlinePalette, const IlvPalette *fillPalette, const IlvRect &rect, const IlvRegion *clip=0) const |
Draws a rectangle with border effects. More... | |
virtual void | drawPaths (const IlvPalette *palette, IlUInt count, const IlvPointArray *paths) const |
Draws an array of paths as polylines. More... | |
virtual void | drawReliefDiamond (const IlvPalette *, const IlvPalette *invertedPalette, const IlvPalette *topShade, const IlvPalette *bottomShade, const IlvRect &bbox, IlUShort thickness, const IlvRegion *clip=0) const |
Draws a diamond with depth effects. More... | |
virtual void | drawReliefRectangle (const IlvPalette *palette, const IlvPalette *invertedPalette, const IlvPalette *topShade, const IlvPalette *bottomShade, const IlvRect &bbox, IlUShort thickness, const IlvRegion *clip=0) const |
Draws a filled rectangle with depth effects. More... | |
virtual void | drawShadowRectangle (const IlvPalette *palette, const IlvPalette *invertedPalette, const IlvRect &bbox, IlUShort thickness, IlvPosition shadowPosition, const IlvRegion *clip=0) const |
Draws a filled rectangle with its shadow. More... | |
virtual void | fillBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const |
Fills an area specified by a set of Bézier curves. More... | |
IlvIntensity | getAlpha () const |
Provides the alpha value of the port. More... | |
IlvAntialiasingMode | getAntialiasingMode () const |
Provides the anti-aliasing mode of the port. More... | |
IlvDisplay * | getDisplay () const |
Returns a pointer to the IlvDisplay of this port. More... | |
IlvDim | height () const |
Provides the height of the port. More... | |
void | setAlpha (IlvIntensity alpha) |
Sets the alpha value of the port. More... | |
void | setAntialiasingMode (IlvAntialiasingMode mode) |
Sets the anti-aliasing mode of the port. More... | |
void | size (IlvDim &w, IlvDim &h) const |
Gives the dimensions of the port. More... | |
IlvDim | width () const |
Provides the width of the port. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IlvSystemPort | |
static IlvBitmapData * | GetBitmapData (IlvSystemPort *port, const IlvRect *rect=0) |
Creates an IlvBitmapData from a rectangular area in an IlvSystemPort . More... | |
Windows-specific class to predefine printer devices.
Library: xviews or winviews or mviews (mutually exclusive)
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 |
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
. 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 |
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 |
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 2015, 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.