Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

Composition::ParamI Class Reference

Parameter class. More...

#include <ParamI.h>

Inheritance diagram for Composition::ParamI:

Edit::EditableI Edit::DataBlockI Composition::ParamColorC Composition::ParamFileC Composition::ParamFloatC Composition::ParamIntC Composition::ParamTextC Composition::ParamVector2C Composition::ParamVector3C List of all members.

Public Methods

Protected Methods

Friends


Detailed Description

Parameter class.

Parameter class defines a parameter which can be edited and animated in Demopaja GUI. ParamI implements a base class for all parameters.

An ID is attached to each parameter. When a parameter is changed on a gizmo, the parameter send a notify to the gizmo via the update_notify() method, the update notify is relayed to the effect via effects update_notify method. When handling a notify message each parameter and gizmo can be identified from the ID. The ID of a parameter is specified in the create method or it can be changed with the set_id() method.

If the value range of a animated parameter is changed no range checking is done to the keyframes in the controller. The plugin has to either clanp the keys, or handle the parameters out of the range.

The content of the parameter (including name, range, etc) can be changed at any time, and the change is shown next time the GUI is updated. A common place to change a parameter is on update_notify() method of a gizmo or an effect. Parameters are ment to be created at the constructor of a gizmo. Hence, the some of the properties of the parameter namely, the name of the parameter, the style and the ID are not serialized to the stream.

Demopaja does not currently support overridden parameters.

All the parameters classes are implemented by the system.

See also:
Composition::GizmoI


Constructor & Destructor Documentation

ParamI ( ) [protected]
 

Default constructor.

ParamI ( Edit::EditableI * pOriginal ) [protected]
 

Constructor with reference to the original.

ParamI ( GizmoI * pParent,
const char * name,
PajaTypes::uint32 id,
PajaTypes::uint32 style = 0,
bool animatable = true ) [protected]
 

Constructor.

~ParamI ( ) [protected, virtual]
 

Default destructor.


Member Function Documentation

void add_flags ( PajaTypes::int32 i32Flags ) [virtual]
 

Sets only specified flags.

void copy ( Edit::DataBlockI * pBlock ) [virtual]
 

Deep copy from a data block, see Edit::DataBlockI::copy().

Reimplemented from Edit::EditableI.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void del_flags ( PajaTypes::int32 i32Flags ) [virtual]
 

Removes only specified flags.

ControllerC * get_controller ( ) [pure virtual]
 

Returns the conroller attached to the parameter.

NULL is returned if the parameter cannot be animated.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

PajaTypes::int32 get_expanded_height ( ) [virtual]
 

Returns the expanded height of the parameter (used by the GUI).

PajaTypes::int32 get_flags ( ) [virtual]
 

Returns gizmo flags.

PajaTypes::uint32 get_id ( ) const [pure virtual]
 

Returns the ID of the parameter.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

PajaTypes::float32 get_increment ( ) const [pure virtual]
 

Returns the spinner increment.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

bool get_min_max ( PajaTypes::float32 * pMin,
PajaTypes::float32 * pMax ) [pure virtual]
 

Returns the range of the parameter.

Parameters:
pMin   pointer to a array of maximum of KEY_MAXCHANNEL floats.
pMax   pointer to a array of maximum of KEY_MAXCHANNEL floats.

If the type of the parameter id not know use arrays of KEY_MAXCHANNEL floats.

Returns:
true if the range is valid, false if the range is not used.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

const char * get_name ( ) [virtual]
 

Returns the name of the parameter.

GizmoI * get_parent ( ) [virtual]
 

Sets the parent gizmo of the parameter.

PajaTypes::uint32 get_style ( ) const [pure virtual]
 

Returns the style of the parameter.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

PajaTypes::uint32 get_type ( ) const [pure virtual]
 

Returns the type of the parameter.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void get_val ( PajaTypes::int32 t,
PajaTypes::float32 * val ) [pure virtual]
 

Returns the value of the parameter.

Parameters:
pVal   pointer to a array of maximum of KEY_MAXCHANNEL floats. If the type of the parameter id not know use arrays of KEY_MAXCHANNEL floats. If The parameter is animated, interpolated value is returned.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

PajaTypes::uint32 load ( FileIO::LoadC * pLoad ) [virtual]
 

Serialize the parameter from a Demopaja input stream.

Reimplemented from Edit::EditableI.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void restore ( Edit::EditableI * pBlock ) [virtual]
 

Shallow copy from a editable, see Edit::EditableI::restore().

Reimplemented from Edit::EditableI.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

PajaTypes::uint32 save ( FileIO::SaveC * pSave ) [virtual]
 

Serialize the parameter to a Demopaja output stream.

Reimplemented from Edit::EditableI.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void set_controller ( ControllerC * cnt ) [pure virtual]
 

Sets the controller of the parameter.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void set_expanded_height ( PajaTypes::int32 i32Height ) [virtual]
 

Sets the expanded height of the parameter (used by the GUI).

void set_flags ( PajaTypes::int32 i32Flags ) [virtual]
 

Sets the parameter flags.

void set_id ( PajaTypes::uint32 id ) [pure virtual]
 

Sets the ID of the parmeter.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void set_increment ( PajaTypes::float32 inc ) [pure virtual]
 

Sets the spinner increment of the parameter.

The spinner increment is the smallest value the parameter is meant to control. For 1/10th accuracy use spinner increment of 0.1. The spinner increment is used in the spinners of the type-ins and also to draw the values in the GUI.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void set_name ( const char * name ) [virtual]
 

Sets the name of the parameter.

void set_parent ( GizmoI * pParent ) [virtual]
 

Returns the parent gizmo of the parameter.

void set_style ( PajaTypes::uint32 style ) [pure virtual]
 

Sets the style of the parameter.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void set_val ( PajaTypes::int32 t,
PajaTypes::float32 * val ) [pure virtual]
 

Sets the value of the parameter.

Parameters:
pVal   pointer to a array of maximum of KEY_MAXCHANNEL floats. If the type of the parameter id not know use arrays of KEY_MAXCHANNEL floats. If the parameter is animated a new keyframe is created or existing is updated.

Reimplemented in Composition::ParamIntC, Composition::ParamFloatC, Composition::ParamVector2C, Composition::ParamVector3C, Composition::ParamColorC, Composition::ParamTextC, and Composition::ParamFileC.

void toggle_flags ( PajaTypes::int32 i32Flags ) [virtual]
 

Toggles only specified flags.


The documentation for this class was generated from the following file:
Moppi Demopaja SDK Documentation -- Copyright © 2000 Moppi Productions