Public Member Functions | Public Attributes

Wrangler Class Reference

Search for all occurrences

#include <wrangler.h>

Inheritance diagram for Wrangler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  DeleteThis ()
  Deletes an instance of this class.
int  NumRefs ()
  Returns the total number of references this ReferenceMaker can hold.
virtual void  AddPod (INode *node, int pos=TVNODE_APPEND)
virtual int  FindPod (INode *pod)
virtual void  RemovePod (INode *pod)
virtual void  RemovePod (int i)
void  AddNode (ITrackViewNode *node, MCHAR *name, Class_ID cid, int pos=TVNODE_APPEND)
void  AddController (Control *c, MCHAR *name, Class_ID cid, int pos=TVNODE_APPEND)
int  FindItem (Class_ID cid)
void  RemoveItem (int i)
void  RemoveItem (Class_ID cid)
Control GetController (int i)
Control GetController (Class_ID cid)
ITrackViewNode GetNode (int i)
ITrackViewNode GetNode (Class_ID cid)
int  NumItems ()
virtual void  SwapPositions (int i1, int i2)
MCHAR *  GetName (int i)
virtual void  SetName (int i, MCHAR *name)
virtual void  RegisterTVNodeNotify (TVNodeNotify *notify)
virtual void  UnRegisterTVNodeNotify (TVNodeNotify *notify)
virtual PodObj GetPodByNumber (int num)
virtual void  MergeGroups (int oldg, int newg)
virtual IOResult  Load (ILoad *iload)=0
  Called for loading data.
virtual IOResult  Save (ISave *isave)=0
  Called for saving data.
virtual void  HideChildren (BOOL chide)

Public Attributes

Tab< INode * >  podlist
int  podmax
int  groupmax
Tab< TVNodeNotify * >  notifyCBs
IParamBlock2 pblock

Member Function Documentation

virtual void DeleteThis ( ) [inline, virtual]

Deletes an instance of this class.

3ds Max calls this method when it needs to delete a plugin object (an instance of a class derived from Animatable). Similarly, plugins that need to delete instances of an Animatable or a class directly derived from it via an Animatable pointer, should call this method instead of calling directly operator delete. Following these rules will ensure that the same memory manager is used to allocate and deallocate the object. The default implementation of this method deletes the object. Plugin instances that never need to be deleted from the heap can overwrite this method to do nothing.

Note:
See the method ClassDesc::Create() for details on how Max allocates plugin objects.
See ReferenceMaker::DeleteMe() and ReferenceTarget::MaybeAutoDelete() for information on how plugin instances are deleted by the system.
Remarks:
See Memory Allocation.

See also:
Plugin DLL Functions, Class ClassDesc.

Reimplemented from Animatable.

{};
int NumRefs ( ) [inline, virtual]

Returns the total number of references this ReferenceMaker can hold.

The plugin implements this method to indicate the total number of of references it can make. This includes all references whether they are NULL (inactive) or non-NULL (active) at the time when this method is called. A plugin can hold a variable number of references, thus the return value of this method is not to be cached and reused by client code.

Returns:
The total number of references this plugin can hold. The default implementation is return 0.

Reimplemented from ReferenceMaker.

{ return BASER + podlist.Count();}
virtual void AddPod ( INode node,
int  pos = TVNODE_APPEND 
) [inline, virtual]
virtual int FindPod ( INode pod ) [inline, virtual]
virtual void RemovePod ( INode pod ) [inline, virtual]
virtual void RemovePod ( int  i ) [inline, virtual]
void AddNode ( ITrackViewNode node,
MCHAR *  name,
Class_ID  cid,
int  pos = TVNODE_APPEND 
) [inline, virtual]
Remarks:
This method is used to add a track view node. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
ITrackViewNode *node

Points to the Track View Node to add.

MCHAR *name

The name for the node that appears in Track View.

Class_ID cid

The Class_ID which identifies the plug-in that added the node.

int pos=TVNODE_APPEND

The position in the list of nodes where this one is added. If this defaults to TVNODE_APPEND the node is added at the end of the list.

Implements ITrackViewNode.

{};
void AddController ( Control c,
MCHAR *  name,
Class_ID  cid,
int  pos = TVNODE_APPEND 
) [inline, virtual]
Remarks:
This method is used to add a track view controller. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
Control *c

Points to the controller to add.

MCHAR *name

The name that will appear in Track View.

Class_ID cid

The Class_ID of the plug-in that adds the controller.

int pos=TVNODE_APPEND

The position in the list where the controller is added. If this defaults to TVNODE_APPEND the controller is added at the end of the list.

Implements ITrackViewNode.

{};
int FindItem ( Class_ID  cid ) [inline, virtual]
Remarks:
A Track View Node maintains a table that contains the sub-nodes and sub-controllers. This method returns the index into the table of the node or controller whose Class_ID is passed. If the Class_ID could not be found then -1 is returned.
Parameters:
Class_ID cid

The Class_ID to find.

Implements ITrackViewNode.

{return -1;}
void RemoveItem ( int  i ) [inline, virtual]
Remarks:
A Track View Node maintains a table that contains the sub-nodes and sub-controllers. This method removes the 'i-th' sub-node or sub-controller of the table. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
int i

The zero based index into the table of the item to remove.

Implements ITrackViewNode.

{};
void RemoveItem ( Class_ID  cid ) [inline, virtual]
Remarks:
A Track View Node maintains a table that contains the sub-nodes and sub-controllers. This method removes the sub-node or sub-controller whose Class_ID is passed from the table. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
Class_ID cid

The Class_ID used when the node or controller was added.

Implements ITrackViewNode.

{};
Control* GetController ( int  i ) [inline, virtual]
Remarks:
This method returns a pointer to the 'I-th' sub-controller.
Parameters:
int i

The zero based index of the sub-controller.

Implements ITrackViewNode.

{return NULL;}
Control* GetController ( Class_ID  cid ) [inline, virtual]
Remarks:
This method returns a pointer to the sub-controller whose Class_ID is passed.
Parameters:
Class_ID cid

The Class_ID used when the controller was added.

Implements ITrackViewNode.

{return GetController(FindItem(cid));}
ITrackViewNode* GetNode ( int  i ) [inline, virtual]
Remarks:
This method returns a pointer to the 'i-th' sub-node.
Parameters:
int i

The zero based index of the sub-node.

Implements ITrackViewNode.

{return (ITrackViewNode*)podlist[i];}
ITrackViewNode* GetNode ( Class_ID  cid ) [inline, virtual]
Remarks:
This method returns a pointer to the sub-node whose Class_ID is passed.
Parameters:
Class_ID cid

The Class_ID used when the controller was added.

Implements ITrackViewNode.

{ return NULL;}
int NumItems ( ) [inline, virtual]
Remarks:
This method returns the total number of sub-nodes and/or sub-controllers in the table.

Implements ITrackViewNode.

{return podlist.Count();}
virtual void SwapPositions ( int  i1,
int  i2 
) [inline, virtual]
Remarks:
This method is used to rearrange the elements in the table so item i1 is where i2 was and i2 is where i1 was. Note: Modifying the track view node list both from a context in which the undo system is On (holding) and Off (not holding) is unsafe. Since 3ds Max can turn on or off the undo system as needed, adding or removing track view nodes should be considered safe only when the undo system is Off.
Parameters:
int i1

The zero based index into the table of one of the items to swap.

int i2

The zero based index into the table of the other item to swap.

Implements ITrackViewNode.

{};
MCHAR* GetName ( int  i ) [inline, virtual]
Remarks:
Returns the name of the 'i-th' sub-node or sub-controller.
Parameters:
int i

The zero based index into the table of the item whose name to return.

Implements ITrackViewNode.

{return podlist[i]->GetName();}
virtual void SetName ( int  i,
MCHAR *  name 
) [inline, virtual]
Remarks:
Sets the name of the 'i-th' sub-node or sub-controller to the name passed.
Parameters:
int i

The zero based index into the table of the item whose name to set.

MCHAR *name

The new name for the sub-node or sub-controller.

Implements ITrackViewNode.

{};
virtual void RegisterTVNodeNotify ( TVNodeNotify notify ) [inline, virtual]
Remarks:
Registers the track view notify callback object so it recieves reference messages.
Parameters:
TVNodeNotify *notify

Points to the callback object to register.

Implements ITrackViewNode.

{};
virtual void UnRegisterTVNodeNotify ( TVNodeNotify notify ) [inline, virtual]
Remarks:
Un-Registers the track view notify callback object.
Parameters:
TVNodeNotify *notify

Points to the callback object to register.

Implements ITrackViewNode.

{};
virtual PodObj* GetPodByNumber ( int  num ) [inline, virtual]
virtual void MergeGroups ( int  oldg,
int  newg 
) [inline, virtual]
virtual IOResult Load ( ILoad iload ) [pure virtual]

Called for loading data.

Called by the system to allow the plug-in to load its data. See the section on Loading and Saving for an overview of the load - save process.

Parameters:
iload - This interface pointer may be used to call methods to read data from disk.
Returns:
The default implementation is return IO_OK.
  • IO_OK means the result was acceptable, with no errors.
  • IO_ERROR This should be returned if an error occurred.

Reimplemented from ReferenceMaker.

virtual IOResult Save ( ISave isave ) [pure virtual]

Called for saving data.

Called by the system to allow the plugin to save its data.

Parameters:
isave - This pointer may be used to call methods to write data to disk. See the section on Loading and Saving for an overview of the load/save process.
Returns:
The default implementation is return IO_OK.
  • IO_OK means the result was acceptable, with no errors.
  • IO_ERROR This should be returned if an error occurred.

Reimplemented from ReferenceMaker.

virtual void HideChildren ( BOOL  chide ) [inline, virtual]
Remarks:
This method is available in release 4.0 and later only.

This may be used to prevent child nodes from showing up in Track View.
Parameters:
BOOL chide

Pass TRUE to have children hidden; FALSE to have them visible.

Implements ITrackViewNode.

{}

Member Data Documentation

int podmax
int groupmax

Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler
Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler Wrangler