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

ParamI Class Reference

Parameter class. More...

#include <ParamI.h>

Inheritance diagram for ParamI:

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

Public Methods

virtual void copy (Edit::EditableI *pEditable)
 Deep copy from a data block, see Edit::DataBlockI::copy().

virtual void restore (Edit::EditableI *pEditable)
 Shallow copy from a editable, see Edit::EditableI::restore().

virtual void set_flags (PajaTypes::int32 i32Flags)
 Sets the parameter flags.

virtual void add_flags (PajaTypes::int32 i32Flags)
 Sets only specified flags.

virtual void del_flags (PajaTypes::int32 i32Flags)
 Removes only specified flags.

virtual void toggle_flags (PajaTypes::int32 i32Flags)
 Toggles only specified flags.

virtual PajaTypes::int32 get_flags ()
 Returns gizmo flags.

virtual void set_expanded_height (PajaTypes::int32 i32Height)
 Sets the expanded height of the parameter (used by the GUI).

virtual PajaTypes::int32 get_expanded_height ()
 Returns the expanded height of the parameter (used by the GUI).

virtual PajaTypes::uint32 get_type () const=0
 Returns the type of the parameter.

virtual void set_name (const char *name)
 Sets the name of the parameter.

virtual const char * get_name ()
 Returns the name of the parameter.

virtual void set_controller (ControllerC *cnt)=0
 Sets the controller of the parameter.

virtual ControllerCget_controller ()=0
 Returns the conroller attached to the parameter.

virtual void set_increment (PajaTypes::float32 f32Inc)=0
 Sets the spinner increment of the parameter.

virtual PajaTypes::float32 get_increment () const=0
 Returns the spinner increment.

virtual bool get_min_max (PajaTypes::float32 *pMin, PajaTypes::float32 *pMax)=0
 Returns the range of the parameter.

virtual void set_id (PajaTypes::uint32 id)=0
 Sets the ID of the parmeter.

virtual PajaTypes::uint32 get_id () const=0
 Returns the ID of the parameter.

virtual void set_style (PajaTypes::uint32 style)=0
 Sets the style of the parameter.

virtual PajaTypes::uint32 get_style () const=0
 Returns the style of the parameter.

virtual PajaTypes::uint32 save (FileIO::SaveC *pSave)
 Serialize the parameter to a Demopaja output stream.

virtual PajaTypes::uint32 load (FileIO::LoadC *pLoad)
 Serialize the parameter from a Demopaja input stream.

virtual void set_parent (GizmoI *pParent)
 Returns the parent gizmo of the parameter.

virtual GizmoIget_parent ()
 Sets the parent gizmo of the parameter.


Protected Methods

 ParamI ()
 Default constructor.

 ParamI (Edit::EditableI *pOriginal)
 Constructor with reference to the original.

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

virtual ~ParamI ()
 Default destructor.


Friends

class ParamIntC
class ParamFloatC
class ParamVector2C
class ParamVector3C
class ParamColorC
class ParamTextC
class ParamFileC

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.

virtual ~ParamI   [protected, virtual]
 

Default destructor.


Member Function Documentation

virtual void add_flags PajaTypes::int32    i32Flags [virtual]
 

Sets only specified flags.

virtual void copy Edit::EditableI   pEditable [virtual]
 

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

Implements EditableI.

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

virtual void del_flags PajaTypes::int32    i32Flags [virtual]
 

Removes only specified flags.

virtual ControllerC* get_controller   [pure virtual]
 

Returns the conroller attached to the parameter.

NULL is returned if the parameter cannot be animated.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual PajaTypes::int32 get_expanded_height   [virtual]
 

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

virtual PajaTypes::int32 get_flags   [virtual]
 

Returns gizmo flags.

virtual PajaTypes::uint32 get_id   const [pure virtual]
 

Returns the ID of the parameter.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual PajaTypes::float32 get_increment   const [pure virtual]
 

Returns the spinner increment.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual 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.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual const char* get_name   [virtual]
 

Returns the name of the parameter.

virtual GizmoI* get_parent   [virtual]
 

Sets the parent gizmo of the parameter.

virtual PajaTypes::uint32 get_style   const [pure virtual]
 

Returns the style of the parameter.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual PajaTypes::uint32 get_type   const [pure virtual]
 

Returns the type of the parameter.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual PajaTypes::uint32 load FileIO::LoadC   pLoad [virtual]
 

Serialize the parameter from a Demopaja input stream.

Implements EditableI.

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

virtual void restore Edit::EditableI   pEditable [virtual]
 

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

Implements EditableI.

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

virtual PajaTypes::uint32 save FileIO::SaveC   pSave [virtual]
 

Serialize the parameter to a Demopaja output stream.

Implements EditableI.

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

virtual void set_controller ControllerC   cnt [pure virtual]
 

Sets the controller of the parameter.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual void set_expanded_height PajaTypes::int32    i32Height [virtual]
 

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

virtual void set_flags PajaTypes::int32    i32Flags [virtual]
 

Sets the parameter flags.

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

Sets the ID of the parmeter.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual void set_increment PajaTypes::float32    f32Inc [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.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual void set_name const char *    name [virtual]
 

Sets the name of the parameter.

virtual void set_parent GizmoI   pParent [virtual]
 

Returns the parent gizmo of the parameter.

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

Sets the style of the parameter.

Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC.

virtual void toggle_flags PajaTypes::int32    i32Flags [virtual]
 

Toggles only specified flags.


Moppi Demopaja SDK Documentation -- Copyright © 2000-2002 Moppi Productions