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

 

LOffscreenView



Overview:

LOffscreenView is a PowerPlant class that is used for offscreen drawing. It creates a temporary GWorld everytime you draw.

Methods :

The methods in this class are:

 

LOffscreenView()  
~LOffscreenView()  
Draw()  
DrawOffscreen()  
EstablishPort()  
SubImageChanged()  

Data Members:

The data members in this class are:

 

mOffscreenWorld  
mDrawingSelf  

Operation:

If you want a view or panes within the view to use a GWorld that lasts for more than one update, use LGWorld instead.

Source files:

(Pane Classes)

LOffscreenView.h

LOffscreenView.cp

Ancestors:

LAttachable

LPane

LView

LOffscreenView()

Purpose:

The constructors create objects from the passed-in parameters.

Access:

Public

Prototype:

LOffscreenView();

LOffscreenView(
const SPaneInfo &inPaneInfo,
const SViewInfo &inViewInfo );

LOffscreenView( LStream *inStream );
Parameters:

The parameters for these constructors are:

 

const SPaneInfo&  
inPaneInfo  
The Superpane info.  
const SViewInfo&  
inViewInfo  
The Superview info.  
LStream*  
inStream  
The stream to read from.  

~LOffscreenView()

Purpose:

The destructor destroys the object.

Access:

Virtual, Public

Prototype:

virtual ~LOffscreenView();

Draw()

Purpose:

Draw contents of View offscreen and then copy them onscreen. First, we try to draw offscreen using temporary memory. If that fails, we try to draw offscreen using application memory. If all else fails, we call the inherited version to draw directly to the screen. This is an override of Draw() in LPane.

DrawOffscreen()

Purpose:

Draw contents of View to an Offscreen World, then copy bits all at once to the normal port.

Use the given flags when creating the offscreen GWorld.

Access:

Virtual, Protected

Prototype:

virtual void DrawOffscreen( 
RgnHandle inSuperDrawRgnH,
GWorldFlags inFlags );
Parameters:

This method has the following parameter:

 

RgnHandle  
inSuperDrawRgnH  
The region handle.  
GWorldFlags  
inFlags  
The flags for the GWorld creation.  

Return:

None

EstablishPort()

Purpose:

Set current port to the OffscreenView.

If this View is being drawn, the current port should be the Offscreen GWorld. Otherwise, some subpane is trying to draw itself directly (not in response to an update event) so we call the inherited function to do the normal thing.

Access:

Virtual, Public

Prototype:

virtual Boolean EstablishPort();
Parameters:

None

Return:

None

SubImageChanged()

Purpose:

Notification that the Image of some SubView changed size, location, or scroll units. In this override, we pass the notification up the chain. This is because the LOffscreenView isn't really the logical superview of its subpanes; it's just in the hierarchy to draw offscreen. So, we pass the notification up to the logical superview of its subpanes.

Access:

Virtual, Public

Prototype:

virtual void SubImageChanged( LView* inSubView );
Parameters:

This method has the following parameter:

 

LView*  
inSubView  
The pointer to the view.  

Return:

None

mOffscreenWorld

Purpose:

The GWorld pointer.

Access:

Protected

Prototype:

GWorldPtr mOffscreenWorld;

mDrawingSelf

Purpose:

Storage for the information about self drawing.

Access:

Protected

Prototype:

Boolean mDrawingSelf;

 


[ 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