#include <ParamI.h>
Inheritance diagram for ParamI:
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 ControllerC * | get_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 GizmoI * | get_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 |
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.
|
Default constructor.
|
|
Constructor with reference to the original.
|
|
Constructor.
|
|
Default destructor.
|
|
Sets only specified flags.
|
|
Deep copy from a data block, see Edit::DataBlockI::copy().
Implements EditableI. Reimplemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Removes only specified flags.
|
|
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. |
|
Returns the expanded height of the parameter (used by the GUI).
|
|
Returns gizmo flags.
|
|
Returns the ID of the parameter.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Returns the spinner increment.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Returns the range of the parameter.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Returns the name of the parameter.
|
|
Sets the parent gizmo of the parameter.
|
|
Returns the style of the parameter.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Returns the type of the parameter.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Serialize the parameter from a Demopaja input stream.
Implements EditableI. Reimplemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Shallow copy from a editable, see Edit::EditableI::restore().
Implements EditableI. Reimplemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Serialize the parameter to a Demopaja output stream.
Implements EditableI. Reimplemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Sets the controller of the parameter.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Sets the expanded height of the parameter (used by the GUI).
|
|
Sets the parameter flags.
|
|
Sets the ID of the parmeter.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
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. |
|
Sets the name of the parameter.
|
|
Returns the parent gizmo of the parameter.
|
|
Sets the style of the parameter.
Implemented in ParamIntC, ParamFloatC, ParamVector2C, ParamVector3C, ParamColorC, ParamTextC, and ParamFileC. |
|
Toggles only specified flags.
|