All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

PrintBase Class CATPrintForm

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATPrintForm
 

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


public class CATPrintForm

Class to describe a form (paper format).

Role: A form is described by its name, its width & height, its unit (in which width & height are usually expressed), and its orientation ( portrait/landscape ). Notes that sizes are stored in mm.


Constructor and Destructor Index


o CATPrintForm()
Constructs a CATPrintForm.
o CATPrintForm(CATPrintForm&)
Copy constructor.
o CATPrintForm(char*,float,float,CATPrintUnit,CATPrintOrientation)
Constructs a CATPrintForm.
o ~CATPrintForm()

Method Index


o GetCode(void)
Returns the code of the form.
o GetDefaultForm(void)
Returns the default format name.
o GetHeight(CATPrintUnit)
Returns the height of the form.
o GetName(void)
Returns the name of the form.
o GetOrientation(void)
Returns the orientation of the form.
o GetSize(float&,float&,CATPrintUnit)
Retrieves the size of the form expressed in certain unit.
o GetStandardCode(int)
Returns the standard format code from its index.
o GetStandardCount(void)
Returns the standard count.
o GetStandardForms(void)
Returns the list of standard format.
o GetStandardName(int)
Returns the standard format name from its index.
o GetUnicodeDescription(void)
Returns the description of the form.
o GetUnicodeName(void)
Returns the unicode name of the form.
o GetUnit(void)
Returns the unit of the form.
o GetWidth(CATPrintUnit)
Returns the width of the form.
o IsARoll(void)
Returns the roll status of the form.
o IsAnEnvelope(void)
Returns the envelope status of the form.
o SetCode(int)
Defines the code of the form.
o SetHeight(float,CATPrintUnit)
Defines the height of the form.
o SetName(CATString&)
Defines the name of the form.
o SetOrientation(CATPrintOrientation)
Defines the orientation of the form.
o SetSize(float,float,CATPrintUnit)
Defines the size of the form expressed in certain unit.
o SetUnicodeName(CATUnicodeString&)
Defines the unicode name of the form.
o SetUnit(CATPrintUnit)
Defines the unit of the form.
o SetWidth(float,CATPrintUnit)
Defines the width of the form.

Constructor and Destructor


o CATPrintForm
public CATPrintForm()
Constructs a CATPrintForm.
o CATPrintForm
public CATPrintForm( const CATPrintForm& form)
Copy constructor. param iForm The form to be copied.
o CATPrintForm
public CATPrintForm( const char* iName,
float iWidth= 0.0,
float iHeight= 0.0,
CATPrintUnit iUnit= CATPRINTUNIT_MM,
CATPrintOrientation iOrientation= CATPRINTORIENTATION_PORTRAIT )
Constructs a CATPrintForm.
Parameters:
iName
The name of the form.
iWidth
The width of the form expressed in the param iUnit unit.
Legal values: The default is 0.
iHeight
The height of the form expressed in the param iUnit unit.
Legal values: The default is 0.
iUnit
The unit for the width and the height of the form.
Legal values: The default is mm.
iOrientation
The orientation of the form.
Legal values: The default is CATPRINTORIENTATION_PORTRAIT.
o ~CATPrintForm
public virtual ~CATPrintForm()

Methods


o GetCode
public int GetCode(void ) const
Returns the code of the form.
Returns:
The code of the form. See standard format code.
o GetDefaultForm
public static const CATString& GetDefaultForm(void )
Returns the default format name.
Returns:
The default format name.
o GetHeight
public float GetHeight(CATPrintUnit iUnit= CATPRINTUNIT_MM )const
Returns the height of the form.
Parameters:
iUnit
The unit in which the height is returned.
Legal values: The default is CATPRINTUNIT_MM.
Returns:
The height of the form.
o GetName
public const CATString& GetName(void ) const
Returns the name of the form.
Returns:
The name of the form.
o GetOrientation
public CATPrintOrientation GetOrientation(void ) const
Returns the orientation of the form.
Returns:
The orientation of the form.
o GetSize
public void GetSize(float& oWidth,
float& oHeight,
CATPrintUnit iUnit= CATPRINTUNIT_MM )const
Retrieves the size of the form expressed in certain unit.
Parameters:
oWidth
The width of the form in iUnit unit.
oHeight
The height of the form in iUnit unit.
iUnit
The unit in which the width and height will be returned.
Legal values: The default is CATPRINTUNIT_MM.
o GetStandardCode
public static int GetStandardCode(int iIndex)
Returns the standard format code from its index.
Parameters:
iIndex
The index in the standard format table.
o GetStandardCount
public static int GetStandardCount(void )
Returns the standard count.
Returns:
The standard count. It allows to retrieve standard characteristics.
o GetStandardForms
public static const CATLISTV(CATPrintForm)& GetStandardForms(void )
Returns the list of standard format.
Returns:
The list of standard format.
o GetStandardName
public static CATString GetStandardName(int iIndex)
Returns the standard format name from its index.
Parameters:
iIndex
The index in the standard format table.
o GetUnicodeDescription
public CATUnicodeString GetUnicodeDescription(void ) const
Returns the description of the form.
Returns:
The description of the form.
o GetUnicodeName
public CATUnicodeString GetUnicodeName(void ) const
Returns the unicode name of the form.
Returns:
The unicode name of the form.
o GetUnit
public CATPrintUnit GetUnit(void ) const
Returns the unit of the form.
Returns:
The unit of the form.
o GetWidth
public float GetWidth(CATPrintUnit iUnit= CATPRINTUNIT_MM )const
Returns the width of the form.
Parameters:
iUnit
The unit in which the width is returned.
Legal values: The default is CATPRINTUNIT_MM.
Returns:
The width of the form.
o IsARoll
public int IsARoll(void ) const
Returns the roll status of the form.
Returns:
The roll status of the form.
Legal values: 1 -> roll form, 0 -> no roll form.
o IsAnEnvelope
public int IsAnEnvelope(void ) const
Returns the envelope status of the form.
Returns:
The envelope status of the form. See standard format code.
o SetCode
public void SetCode(int iCode)
Defines the code of the form.
Parameters:
iCode
The code of the form. See standard format code.
o SetHeight
public void SetHeight(float iHeight,
CATPrintUnit iUnit= CATPRINTUNIT_MM )
Defines the height of the form.
Parameters:
iHeight
The height of the form.
iUnit
The unit in which the height is defined.
Legal values: The default is CATPRINTUNIT_MM.
o SetName
public void SetName( const CATString& iName)
Defines the name of the form.
Parameters:
iName
The name of the form. Giving a standard name to a form (ex: "A4 ISO") automatically resets its characterictis to standard values (ie: 210x297 mm). The only non-standard name allowed is "USER".
o SetOrientation
public void SetOrientation(CATPrintOrientation iOrientation)
Defines the orientation of the form.
Parameters:
iOrientation
The orientation of the form.
o SetSize
public void SetSize(float iWidth,
float iHeight,
CATPrintUnit iUnit= CATPRINTUNIT_MM )
Defines the size of the form expressed in certain unit.
Parameters:
iWidth
The width of the form in iUnit unit.
iHeight
The height of the form in iUnit unit.
iUnit
The unit in which the width and height are defined.
Legal values: The default is CATPRINTUNIT_MM.
o SetUnicodeName
public void SetUnicodeName( const CATUnicodeString& iName)
Defines the unicode name of the form.
Parameters:
iName
The unicode name of the form. Giving a standard name to a form (ex: "A4 ISO") automatically resets its characterictis to standard values (ie: 210x297 mm). The only non-standard name allowed is "USER".
o SetUnit
public void SetUnit(CATPrintUnit iUnit)
Defines the unit of the form.
Parameters:
iUnit
The unit of the form.
o SetWidth
public void SetWidth(float iWidth,
CATPrintUnit iUnit= CATPRINTUNIT_MM )
Defines the width of the form.
Parameters:
iWidth
The width of the form.
iUnit
The unit in which the width is defined.
Legal values: The default is CATPRINTUNIT_MM.

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

Copyright © 2003, Dassault Systèmes. All rights reserved.