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

 

UReanimator



Overview:

UReanimator provides functions for creating objects using data from PPob resources.

Methods :

The methods in this class are:

 

CreateView()  
LinkListenerToBroadcasters()  
LinkListenerToControls()  
ObjectsFromStream()  
ReadObjects()  
 

Data Members:

There are no data members in this class.

Operation:

This class consists of a few static methods that can be called from anywhere in your code. There are no constructors or destructors for this class.

Source files:

(Utility Classes)

UReanimator.h

UReanimator.cp

Ancestors:

None

See Also:

LListener

LCommander

LView

CreateView()

Purpose :

Return a newly created View object initialized from a PPob resource.

Access:

Static, Public

Prototype:

static LView* CreateView(
  ResIDT inViewID,
  LView* inSuperView,
  LCommander* inSuperCommander);
Parameters:

 

ResIDT  
inViewID  
Resource ID of view to create  
LView*  
inSuperView  
Pointer to object's super-view  
LCommander*  
inSuperCommander  
Pointer to object's super-commander  

Returns:

Pointer to the created view.

LinkListenerToBroadcasters()

Purpose:

Associate a Listener with one or more Broadcasters specified as a list of Pane ID's stored in a resource.

Access:

Static, Public

Prototype:

static void LinkListenerToBroadcasters(
  LListener* inListener,
  LView* inControlContainer,
  ResIDT inResListID);
Parameters:

 

LListener*  
inListener  
Pointer to the listener  
LView*  
inControlContainer  
Pointer to the view containing the listener  
ResIDT  
inResListID  
Resource ID of the broadcaster list  

Returns:

None

Remarks:

Only Panes that are also Broadcasters are linked to the Listener. Panes that are not Broadcasters are ignored.

LinkListenerToControls()

Purpose:

Associate a Listener with Controls specified as a list of Pane IDs sotred in a `RidL' resoruce.

Access:

Static, Public

Prototype:

static void LinkListenerToControls(
  LListener* inListener,
  LView* inControlContainer,
  ResIDT inResListID)
Parameters:

 

LListener*  
inListener  
Pointer to the listener  
LView*  
inControlContainer  
Pointer to the view containing the listener  
ResIDT  
inResListID  
`RidL' resource ID  

Return:

None

Remarks:

You should probably use LinkListenerToBroadcasters() instead of this function. LinkListenerToBroadcasters() is more general since it handles all panes that are also Broadcasters rather than just Controls.

ObjectsFromStream()

Purpose:

Create new objects from the data in a Stream and return a pointer to the first object created. As it encounters PPob class IDs in the stream, it calls URegistrar::CreateObject() to create those classes from data in the stream.

Access:

Static, Public

Prototype:

static void* ObjectsFromStream(
  LStream* inStream )
Parameters:

 

LStream*  
inStream  
Pointer to the data steram  

Return:

Pointer to first created object.

Remarks:

This function is primarily for use by the ReadObjects() function, which first loads the PPob resource into memory, then calls this function to read thememory as a stream.

ReadObjects()

Purpose:

Create new objects from data in a PPob resource and return a pointer to the first object created.

Signals an exception if the version number of teh PPob resource does not match the version number expected by the library.

Access:

Static, Public

Prototype:

static void* ReadObjects(
  OSType inResType,
  ResIDT inResID )
Parameters:

 

OSType  
inResType  
Resource type  
ResIDT  
inResID  
ID of PPob resource  

Return:

A pointer to the first created object.

Remarks:

Before calling, be sure to properly set the default Commander, View, and Attachable.

 


[ 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