#include <ParamI.h>
Inheritance diagram for ParamColorC:
Public Methods | |
virtual Edit::DataBlockI * | create () |
Creates new parameter. | |
virtual Edit::DataBlockI * | create (Edit::EditableI *pOriginal) |
Creates new datablock, with reference to the original. | |
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 PajaTypes::uint32 | get_type () const |
Returns the type of the parameter. | |
virtual void | set_controller (ControllerC *cnt) |
Sets the controller of the parameter. | |
virtual ControllerC * | get_controller () |
Returns the conroller attached to the parameter. | |
virtual void | set_increment (PajaTypes::float32 inc) |
Set spinner increment (ignored for color parameter). | |
virtual PajaTypes::float32 | get_increment () const |
Returns the spinner increment. | |
virtual bool | get_min_max (PajaTypes::float32 *pMin, PajaTypes::float32 *pMax) |
Returns the range of the parameter. | |
virtual void | set_style (PajaTypes::uint32 style) |
Sets the style of the parameter. | |
virtual PajaTypes::uint32 | get_style () const |
Returns the style of the parameter. | |
virtual void | set_id (PajaTypes::uint32 id) |
Sets the ID of the parmeter. | |
virtual PajaTypes::uint32 | get_id () const |
Returns the ID of the parameter. | |
virtual PajaTypes::uint32 | set_val (PajaTypes::int32 t, const PajaTypes::ColorC &val) |
Sets the value of the parameter at specified time. | |
virtual void | get_val (PajaTypes::int32 t, PajaTypes::ColorC &val) |
Gets the value of the parameter at specified time. | |
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. | |
Static Public Methods | |
ParamColorC * | create_new (GizmoI *pParent, const char *szName, const PajaTypes::ColorC &rValue, PajaTypes::uint32 ui32ID, PajaTypes::uint32 ui32Style=PARAM_STYLE_COLORPICKER, bool bAnimatable=true) |
Creates a new color parameter. | |
Protected Methods | |
ParamColorC () | |
Default constructor. | |
ParamColorC (GizmoI *pParent, const char *name, const PajaTypes::ColorC &value, PajaTypes::uint32 id, PajaTypes::uint32 style=PARAM_STYLE_COLORPICKER, bool animatable=true) | |
Constructor. | |
ParamColorC (Edit::EditableI *pOriginal) | |
Constructor with reference to the original. | |
virtual | ~ParamColorC () |
Default destructor. |
The color parameter class can be used to control four component color variables. The components are R, G, B, A. It's up to the user how the components are threated. Colors are chosen using a color picker type-in.
The color parameter can only be used to control color values from 0 to 1. The values are shown in the GUI in range 0 to 255.
A new color parameter is created using the create_new() static method.
|
Default constructor.
|
|
Constructor.
|
|
Constructor with reference to the original.
|
|
Default destructor.
|
|
Deep copy from a data block, see Edit::DataBlockI::copy().
Reimplemented from ParamI. |
|
Creates new datablock, with reference to the original.
Implements EditableI. |
|
Creates new parameter. Following default values are used: pParent = 0, szName = 0, rValue = (0, 0, 0, 1), //RGBA ui32ID = 0, ui32Style = 0, bAnimatable = false,
Implements EditableI. |
|
Creates a new color parameter.
The range and the spinner increment are set internally. Example: This example creates new parameter. The name of the parameter is "Color", it's default value is opaque white and it's ID is ID_COLOR (constant defined by the plugin writer), the type-in style is color picker, the parameter can be animated.
m_pParamColor = ParamColorC::create_new( this, "Color", ColorC( 1, 1, 1, 1 ), ID_COLOR, PARAM_STYLE_COLORPICKER, PARAM_ANIMATABLE ); |
|
Returns the conroller attached to the parameter. NULL is returned if the parameter cannot be animated. Implements ParamI. |
|
Returns the ID of the parameter.
Implements ParamI. |
|
Returns the spinner increment.
Implements ParamI. |
|
Returns the range of the parameter.
Implements ParamI. |
|
Returns the style of the parameter.
Implements ParamI. |
|
Returns the type of the parameter.
Implements ParamI. |
|
Gets the value of the parameter at specified time.
|
|
Serialize the parameter from a Demopaja input stream.
Reimplemented from ParamI. |
|
Shallow copy from a editable, see Edit::EditableI::restore().
Reimplemented from ParamI. |
|
Serialize the parameter to a Demopaja output stream.
Reimplemented from ParamI. |
|
Sets the controller of the parameter.
Implements ParamI. |
|
Sets the ID of the parmeter.
Implements ParamI. |
|
Set spinner increment (ignored for color parameter).
Implements ParamI. |
|
Sets the style of the parameter.
Implements ParamI. |
|
Sets the value of the parameter at specified time.
|