PrintBase CATPrinter

Usage: you must use this class as is. You should never derive it.


public class CATPrinter

Class to describe a printer and its attributes.

Role: The printer is defined by the user description, its language and its default and largest format sizes. A query on allows to obtain the list of system printers.

See also:


Constructor and Destructor Index


o CATPrinter()
Constructs a CATPrinter.
o CATPrinter(CATPrinter&)
Copy constructor.
o ~CATPrinter()

Method Index


o GetDefaultForm(void)
Returns the default format.
o GetDefaultMargins(float&,float&,float&,float&)
Retrieves the default margins of the device.
o GetDescription(void)
Returns the description of the device.
o GetDeviceName(void)
Returns the name of the device.
o GetFormsList(void)
Returns the list of formats supported by the printer.
o GetIconName(void)
Gets the name of the icon that will appear in the printer list dialog.
o GetLanguage(void)
Returns the language of the device.
o GetMaxForm(void)
Returns the largest format.
o GetPhysicalMargins(float&,float&,float&,float&)
Retrieves the physical margins of the device.
o IsLocal(void)
Checks wether the printer is local or connected on a network.
o SaveDescription()
Saves the description of the device
o SetDefaultForm(CATPrintForm&)
Sets the default format.
o SetDefaultMargins(float,float,float,float)
Defines the default margins of the device.
o SetDescription(CATUnicodeString&)
Defines the description of the device.
o SetDeviceName(CATUnicodeString&)
Defines the name of the device.
o SetLanguage(CATUnicodeString&)
Defines the language of the device.
o SetMaxForm(CATPrintForm&)
Defines the largest format.

Data Member Index


o _pDevMode
Data on the print device.

Constructor and Destructor


o CATPrinter
public CATPrinter()
Constructs a CATPrinter.
o CATPrinter
public CATPrinter( const iPrinter)
Copy constructor.
Parameters:
iPrinter
The printer to be copied.
o ~CATPrinter
public virtual ~CATPrinter()

Methods


o GetDefaultForm
public GetDefaultForm( )
Returns the default format.
Returns:
The default format.
o GetDefaultMargins
public GetDefaultMargins( oLeft,
oRight,
oTop,
oBottom)
Retrieves the default margins of the device.
Parameters:
oLeft
The left margin.
oRight
The right margin.
oTop
The top margin.
oBottom
The bottom margin.
o GetDescription
public GetDescription( )
Returns the description of the device.
Returns:
The description of the device.
o GetDeviceName
public GetDeviceName( )
Returns the name of the device.
Returns:
The name of the device.
o GetFormsList
public GetFormsList( )
Returns the list of formats supported by the printer.
Returns:
The list of supported formats.
o GetIconName
public virtual GetIconName( )
Gets the name of the icon that will appear in the printer list dialog.
Returns:
The name of the icon.
o GetLanguage
public GetLanguage( )
Returns the language of the device.
Returns:
The language of the device.
o GetMaxForm
public GetMaxForm( )
Returns the largest format.
Returns:
The largest format.
o GetPhysicalMargins
public GetPhysicalMargins( oLeft,
oRight,
oTop,
oBottom)
Retrieves the physical margins of the device.
Parameters:
oLeft
The left margin.
oRight
The right margin.
oTop
The top margin.
oBottom
The bottom margin.
o IsLocal
public IsLocal( )
Checks wether the printer is local or connected on a network.
Returns:

Legal values: 1 = true, 0 = false.
o SaveDescription
public SaveDescription()
Saves the description of the device
o SetDefaultForm
public SetDefaultForm( const iForm)
Sets the default format.
Parameters:
iForm
The default format.
o SetDefaultMargins
public SetDefaultMargins( iLeft,
iRight,
iTop,
iBottom)
Defines the default margins of the device.
Parameters:
iLeft
The left margin.
iRight
The right margin.
iTop
The top margin.
iBottom
The bottom margin.
o SetDescription
public SetDescription( const iDescription)
Defines the description of the device.
Parameters:
iDescription
The description of the device.
o SetDeviceName
public SetDeviceName( const iName)
Defines the name of the device.
Parameters:
iName
The name of the device.
o SetLanguage
public SetLanguage( const iLanguage)
Defines the language of the device.
Parameters:
iLanguage
The language of the device.
o SetMaxForm
public SetMaxForm( const iForm)
Defines the largest format.
Parameters:
iForm
The largest format.

Data Members


o _pDevMode
  public DEVMODE *_pDevMode
Data on the print device. The DEVMODE data structure contains information about the device initialization and environment of a printer.

This object is included in the file: CATPrinter.h
If needed, your Imakefile.mk should include the module: CATPrintBase

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.