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

 

LPlaceHolder



Overview:

LPlaceHolder is a PowerPlant class that is designed to assist the printing process. The purpose of a placeholder is to allow you to print a pane at a size and/or location that is different from the pane's characteristics when displayed in a window.

Methods :

The methods in this class are:

 

LPlaceHolder()  
~LPlaceHolder()  
CountPanels()  
InstallOccupant()  
RemoveOccupant()  
ScrollToPanel()  

Data Members:

The data members in this class are:

 

mOccupant  
mOccupantSuperView  
mOccupantPlaceH  
mOccupantAlignment  

Operation:

A placeholder has two characteristics that differentiate it from other views. It has an occupant, and the occupant has an alignment. For more details on this class, refer to The PowerPlant Book.

Source files:

(Pane Classes)

LPlaceHolder.h

LPlaceHolder.cp

Ancestors:

LAttachable

LPane

LView

LPlaceHolder()

Purpose:

The constructor creates objects from the passed-in parameters.

Access:

Public

Prototype:

LPlaceHolder();

LPlaceHolder( const LPlaceHolder &inOriginal );

LPlaceHolder( const SPaneInfo &inPaneInfo,
const SViewInfo &inViewInfo,
UInt16 inOccupantAlignment );

LPlaceHolder( LStream *inStream );
Parameters:

The constructors take the following parameters:

 

const   LPlaceHolder&  
inOriginal  
The object to copy.  
const SPaneInfo&  
inPaneInfo  
The Superpane.  
const SViewInfo&  
inViewInfo  
The Superview.  
UInt16  
inOccupant-Alignment  
The alignment.  
LStream*  
inStream  
The stream to read from.  

~LPlaceHolder()

Purpose:

The destructor destroys the object.

Access:

Virtual, Public

Prototype:

virtual ~LPlaceHolder();

CountPanels()

Purpose:

Return the number of horizontal and vertical Panels. A Panel is a "frameful" of a View's Image. For an LPlaceHolder, the number of Panels is the number of Panels in its occupant Pane.

Access:

Virtual, Public

Prototype:

virutal void CountPanels( UInt32 &outHorizPanels,
UInt32 &outVertPanels);
Parameters:

This method has the following parameters:

 

UInt32&  
outHorizPanels  
The number of horizontal panels.  
UInt32&  
outVertPanels  
The number of vertical panels.  

Return:

None

InstallOccupant()

Purpose:

Install a pane inside an LPlaceHolder.

Use the Mac OS Toolbox IconAlignmentType values (in <Icons.h>) for inAlignment. If you don't specify a horizontal alignment, the Occupant width is set to the PlaceHolder width. Similarly, if you don't specify a vertical alignment, the Occupant height is set to the PlaceHolder height.

Access:

Public

Prototype:

void InstallOccupant( LPane *inOccupant,
UInt16 inAlignment );
Parameters:

This method has the following parameter:

 

LPane*  
inOccupant  
The occupant.  
UInt16  
inAlignment  
Mac OS Toolbox IconAlignmentType values (in <Icons.h>). This is an optional parameter, if not specified, the default value (of -1) means to use the alignment stored in the PlaceHolder.  

Return:

None

RemoveOccupant()

Purpose:

Remove occupant from a PlaceHolder, restoring the occupant to its original state.

Access:

Public

Prototype:

LPane* RemoveOccupant();
Parameters:

None

Return:

The pointer to the occupant.

ScrollToPanel()

Purpose:

Scroll view image to the specified panel. For a PlaceHolder, scroll occupant pane to the specified panel.

Access:

Virtual, Public

Prototype:

virutal Boolean ScrollToPanel(
const PanelSpec &inPanel );
Parameters:

This method takes the following parameters:

 

const   PanelSpec&  
inPanel  
The panel to scroll.  

Return:

None

mOccupant

Purpose:

The occupant pointer.

Access:

Protected

Prototype:

LPane *mOccupant;

mOccupantSuperView

Purpose:

The occupant superview pointer.

Access:

Protected

Prototype:

LView *mOccupantSuperView;

mOccupantPlaceH

Purpose:

The occupant handle.

Access:

Protected

Prototype:

Handle mOccupantPlaceH;

mOccupantAlignment

Purpose:

Occupant alignment parameters.

Access:

Protected

Prototype:

UInt16 mOccupantAlignment;

 


[ 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