[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LPrintout



Overview:

LPrintout is a PowerPlant class that is used for support of printing in your application.

Methods :

The methods in this class are:

 

LPrintout()  
~LPrintout()  
ApplyForeAndBackColors()  
CountPanels()  
CreatePrintout()  
DoPrintJob()  
EstablishPort()  
FinishCreateSelf()  
GetMacPort()  
GetPrintJobSpecs()  
GetPrintRecord()  
HasAttribute()  
InitPrintout()  
PageToPanel()  
PrintCopiesOfPages()  
PrintPanel()  
PrintPanelRange()  
SetAttribute()  
SetForeAndBackColors()  
SetPrintRecord()  

Data Members:

The data members in this class are:

 

mAttributes  
mPrintRecordH  
mPrinterPort  
mWindowPort  
mHorizPanelCount  
mVertPanelCount  
mForeColor  
mBackColor  

Operation:

To learn more about working with LPrintout, refer to The PowerPlant Book.

Source files:

(Pane Classes)

LPrintout.h

LPrintout.cp

Ancestors:

LAttachable

LPane

LView

LPrintout()

Purpose:

The constructors create objects from the passed-in parameters.

Access:

Public

Prototype:

LPrintout();

LPrintout( THPrint inPrintRecordH );

LPrintout( LStream *inStream );
Parameters:

The parameters for these constructors are:

 

THPrint  
inPrintRecordH  
The print record handle.  
LStream*  
inStream  
The stream to read from.  

~LPrintout()

Purpose:

The destructor destroys the object.

Access:

Virtual, Public

Prototype:

virtual ~LPrintout();

ApplyForeAndBackColors()

Purpose:

Set the foreground and background colors of the current port. The Printout or one of its subpanes must already be focused. This is an override of ApplyForeAndBackColors() in LPane.

CountPanels()

Purpose:

Count the number of Panels in a Printout. This is an override of CountPanels() in LPane.

CreatePrintout()

Purpose:

Return a new Printout object (and its SubPanes) from the data in a 'PPob' resource.

Access:

Static, Public

Prototype:

static LPrintout* CreatePrintout(
ResIDT inPrintoutID );
Parameters:

The parameter for this method is:

 

ResIDT  
inPrintoutID  
The resource ID for the printout.  

Return:

The pointer to the new object.

DoPrintJob()

Purpose:

Print the job.

Access:

Virtual, Public

Prototype:

virtual void DoPrintJob();
Parameters:

None

Return:

None

EstablishPort()

Purpose:

Make Printout the current port.

Access:

Virtual, Public

Prototype:

virtual Boolean EstablishPort();
Parameters:

None

Return:

Boolean indicating whether the port was successfully set, false if not.

FinishCreateSelf()

Purpose:

This is an override of FinishCreateSelf() in LPane.

GetMacPort()

Purpose:

Return the GrafPort associated with a Printout. This is an override of GetMacPort() in LPane.

GetPrintJobSpecs()

Purpose:

Extract information about the print job from the Mac OS Toolbox PrintRecord.

Virtual, Protected

Prototype:

virtual void GetPrintJobSpecs(
PanelSpec &outFirstPanel,
PanelSpec &outLastPanel,
UInt16 &outCopyCount );
Parameters:

The parameters for this method are:

 

PanelSpec&  
outFirstPanel  
The first panel.  
PanelSpec&  
outLastPanel  
The last panel.  
UInt16&  
outCopyCount  
The number of copies.  

Return:

None

GetPrintRecord()

Purpose:

Retrieve the PrintRecord.

Access:

Public

Prototype:

THPrint GetPrintRecord() const;
Parameters:

None

Return:

A handle to the PrintRecord.

Remarks:

None

HasAttribute()

Purpose:

Return whether a Printout has the specified attribute.

Access:

Public

Prototype:

Boolean HasAttribute(
EPrintAttr inAttribute ) const;
Parameters:

The parameter for this method is:

 

EPrintAttr  
inAttribute  
The attribute to check for.  

Return:

Boolean indicating whether the attribute is present (true) or not (false).

InitPrintout()

Purpose:

Initialize data members to default values.

Access:

Private

Prototype:

void InitPrintout();
Parameters:

None

Return:

None

PageToPanel()

Purpose:

Fill in PanelSpec for a given page number.

Access:

Virtual, Protected

Prototype:

virtual void PageToPanel(
UInt32 inPageNumber,
PanelSpec &outPanel ) const;
Parameters:

The parameters for this method are:

 

UInt32  
inPageNumber  
The page number to check on.  
PanelSpec&  
outPanel  
The filled-in panelspec.  

Return:

None

PrintCopiesOfPages()

Purpose:

Print copies of the specified range of Panels. This is the main "print loop."

Access:

Virtual, Protected

Prototype:

virtual void PrintCopiesOfPages(
const PanelSpec &inFirstPanel,
const PanelSpec &inLastPanel,
UInt16 inCopyCount );
Parameters:

The parameters for this method are:

 

UInt16  
inCopyCount  
The page number to check on.  
PanelSpec&  
inFirstPanel  
The first panel.  
PanelSpec&  
inLastPanel  
The last panel.  

PrintPanel()

Purpose:

Print the specified Panel

Access:

Virtual, Public

Prototype:

virtual void PrintPanel(
const PanelSpec &inPanel,
RgnHandle inSuperPrintRgnH );
Parameters:

The parameters for this method are:

 

const   PanelSpec&  
inPanel  
The panel spec.  
RgnHandle  
inSuperPrintRgnH  
The region handle.  

PrintPanelRange()

Purpose:

Print the range of panels.

Access:

Virtual, Public

Prototype:

virtual void PrintPanelRange(
const PanelSpec &inFirstPanel,
const PanelSpec &inLastPanel,
UInt16 inCopyCount );
Parameters:

The parameters for this method are:

 

const   PanelSpec&  
inFirstPanel  
The first panel.  
const   PanelSpec&  
inLastPanel  
The last panel.  
RgnHandle  
inSuperPrintRgnH  
The region handle.  

Return:

None

SetAttribute()

Purpose:

Specify attributes for a Printout.

Access:

Public

Prototype:

void SetAttribute( EPrintAttr inAttribute );
Parameters:

The parameter for this method is:

 

EPrintAttr  
inAttribute  
The region handle.  

Return:

None

SetForeAndBackColors()

Purpose:

Sprecify the foreground and/or background colors of a Printout. Specify nil for inForeColor and/or inBackColor to leave that color trait unchanged. This is an override of SetForeAndBackColors() in LPane.

SetPrintRecord()

Purpose:

Set the Toolbox PrintRecord for a Printout.

Access:

Public

Prototype:

void SetPrintRecord(
THPrint inPrintRecordH );
Parameters:

The parameter for this method is:

 

THPrint  
inPrintRecordH  
The handle to print record.  

Return:

None

mAttributes

Purpose:

The attributes.

Access:

Protected

Prototype:

UInt32 mAttributes;

mPrintRecordH

Purpose:

The handle PrintRecord.

Access:

Protected

Prototype:

THPrint mPrintRecordH;

mPrinterPort

Purpose:

The printer port.

Access:

Protected

Prototype:

TPPrPort mPrinterPort;

mWindowPort

Purpose:

The window pointer.

Access:

Protected

Prototype:

WindowPtr mWindowPort;

mHorizPanelCount

Purpose:

 

Access:

Protected

Prototype:

UInt32 mHorizPanelCount;

mVertPanelCount

Purpose:

The vertical panel count.

Access:

Protected

Prototype:

UInt32 mVertPanelCount;

mForeColor

Purpose:

The foreground color.

Access:

Protected

Prototype:

RGBColor mForeColor;

mBackColor

Purpose:

The background color.

Access:

Protected

Prototype:

RGBColor mBackColor;

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000