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

# Composition::ParamFileC Class Reference

File parameter class. More...

`#include <ParamI.h>`

Inheritance diagram for Composition::ParamFileC:

List of all members.

## Public Methods

- virtual Edit::DataBlockI* create ()
- virtual Edit::DataBlockI* create ( Edit::EditableI* pOriginal )
- virtual void copy ( Edit::DataBlockI* pBlock )
- virtual void restore ( Edit::EditableI* pBlock )
- virtual PajaTypes::uint32 get_type () const
- virtual void set_controller ( ControllerC* cnt )
- virtual ControllerC* get_controller ()
- virtual void set_style ( PajaTypes::uint32 style )
- virtual PajaTypes::uint32 get_style () const
- virtual void set_id ( PajaTypes::uint32 id )
- virtual PajaTypes::uint32 get_id () const
- virtual void set_increment ( PajaTypes::float32 inc )
- virtual PajaTypes::float32 get_increment () const
- virtual bool get_min_max ( PajaTypes::float32* pMin, PajaTypes::float32* pMax )
- virtual void set_val ( PajaTypes::int32 t, PajaTypes::float32* val )
- virtual void get_val ( PajaTypes::int32 t, PajaTypes::float32* val )
- virtual void set_file ( Import::FileHandleC* pHandle )
- virtual Import::FileHandleC* get_file ()
- virtual PluginClass::SuperClassIdC get_super_class_filter ()
- virtual PluginClass::ClassIdC get_class_filter ()
- virtual void set_super_class_filter ( PluginClass::SuperClassIdC rSuperClassId )
- virtual void set_class_filter ( PluginClass::ClassIdC rClassId )
- virtual void set_time_offset ( PajaTypes::int32 i32TimeOffset )
- virtual void set_time_scale ( PajaTypes::float32 f32TimeScale )
- virtual PajaTypes::int32 get_time_offset ()
- virtual PajaTypes::float32 get_time_scale ()
- virtual PajaTypes::int32 get_duration ( PajaSystem::TimeContextC* pTimeContext )
- virtual PajaTypes::float32 get_start_label ( PajaSystem::TimeContextC* pTimeContext )
- virtual PajaTypes::float32 get_end_label ( PajaSystem::TimeContextC* pTimeContext )
- virtual PajaTypes::uint32 save ( FileIO::SaveC* pSave )
- virtual PajaTypes::uint32 load ( FileIO::LoadC* pLoad )

## Static Public Methods

- ParamFileC* create_new ( GizmoI* pParent, const char* szName, PluginClass::SuperClassIdC rSuperClassFilter, PluginClass::ClassIdC rClassFilter, PajaTypes::uint32 ui32ID, PajaTypes::uint32 ui32Style = PARAM_STYLE_FILE )

## Protected Methods

- ParamFileC ()
- ParamFileC ( GizmoI* pParent, const char* name, PluginClass::SuperClassIdC rSuperClassFilter, PluginClass::ClassIdC rClassFilter, PajaTypes::uint32 id, PajaTypes::uint32 style = PARAM_STYLE_EDITBOX )
- ParamFileC ( Edit::EditableI* pOriginal )
- virtual ~ParamFileC ()

## Detailed Description

File parameter class.

The file parameter provodes access to the imported files in the Demopaja system for the effect plugins.

Range and spinner increment are not used.

A new file parameter is created using the create_new() static method.

## Constructor & Destructor Documentation

ParamFileC ( | )`[protected]`

| Default constructor.

ParamFileC ( | GizmoI * pParent,
| const char * name,
| PluginClass::SuperClassIdC rSuperClassFilter,
| PluginClass::ClassIdC rClassFilter,
| PajaTypes::uint32 id,
| PajaTypes::uint32 style = PARAM_STYLE_EDITBOX )`[protected]`

| Constructor.

ParamFileC ( | Edit::EditableI * pOriginal )`[protected]`

| Constructor with reference to the original.

~ParamFileC ( | )`[protected, virtual]`

| Default destructor.

## Member Function Documentation

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

| Deep copy from a data block, see Edit::DataBlockI::copy(). Reimplemented from Composition::ParamI.

virtual Edit::DataBlockI* create ( | Edit::EditableI * pOriginal )`[virtual]`

  | Creates new datablock, with reference to the original. Parameters:
  pOriginal | Pointer to the original editable. This method is used by the undo system to create a copy of the editable while keeping reference to the original.
The method restore() is used to restore the data from the original copy. Reimplemented from Edit::EditableI.

Edit::DataBlockI * create ( | )`[virtual]`

| Creates new parameter. Following default values are used:
                pParent = 0,
                rSuperClassFilter = NULL_SUPERCLASSID,
                rClassFilter = NULL_CLASSID,
                ui32ID = 0,
                ui32Style = 0,
See also: create_new Reimplemented from Edit::EditableI.

ParamFileC * create_new ( | GizmoI * pParent,
| const char * szName,
| PluginClass::SuperClassIdC rSuperClassFilter,
| PluginClass::ClassIdC rClassFilter,
| PajaTypes::uint32 ui32ID,
| PajaTypes::uint32 ui32Style = PARAM_STYLE_FILE )`[static]`

  | Creates a new file parameter. Parameters:
  pParent | Pointer to the parent gizmo.
  rSuperClassFilter | Specifies super class filter.
  rClassFilter | Specifies class filter.
  ui32ID | ID of the parameter.
  ui32Style | The style of the parameter. Must be PARAM_STYLE_FILE. Default PARAM_STYLE_FILE.
The only type-in style is file selector. The super class filter and class filter enables only a defined set of files to be set via this parameter. For example if the superclass filter is SUPERCLASS_IMAGE all the files that are selected via this parameter implement the Import::ImportableImageI interface. Passing null (super) class ID disables the filtering. Example 1: This example creates new parameter. The name of the parameter is "Image", it's super class filter is set to enable only files which support the ImportableImageI interface, any sub-type can be used. Parameter's ID is ID_IMAGE (constant defined by the plugin writer), the type-in style is the default file selector.
                m_pParamFile = ParamFileC::create_new( this, "Image", SUPERCLASS_IMAGE, NULL_CLASSID, ID_IMAGE );
Example 2: This example creates new parameter. The name of the parameter is "Scene", the class filters are set to enable only specified file type to be set. Parameter's ID is ID_SCENE (constant defined by the plugin writer), the type-in style is the default file selector.
                m_pParamFile = ParamFileC::create_new( this, "Scene", NULL_SUPERCLASSID, MY_3DFILE_CLASSID, ID_3DSCENE );

PluginClass::ClassIdC get_class_filter ( | )`[virtual]`

| Returns the super filter.

virtual ControllerC* get_controller ( | )`[virtual]`

| Returns the conroller attached to the parameter. NULL is returned if the parameter cannot be animated. Reimplemented from Composition::ParamI.

PajaTypes::int32 get_duration ( | PajaSystem::TimeContextC * pTimeContext )`[virtual]`

| Returns the duration of the file. If the duration cannot be determined (for example the data is a still image) negative value is returned. This information is used by the system to draw the duration of the file. See also: set_time_scale() , set_time_offset()

PajaTypes::float32 get_end_label ( | PajaSystem::TimeContextC * pTimeContext )`[virtual]`

| Returns end label/frame.

Import::FileHandleC * get_file ( | )`[virtual]`

| Returns the file handle.

virtual PajaTypes::uint32 get_id ( | ) const`[virtual]`

| Returns the ID of the parameter. Reimplemented from Composition::ParamI.

virtual PajaTypes::float32 get_increment ( | ) const`[virtual]`

| Returns the spinner increment. Reimplemented from Composition::ParamI.

virtual bool get_min_max ( | PajaTypes::float32 * pMin,
| PajaTypes::float32 * pMax )`[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 from Composition::ParamI.

PajaTypes::float32 get_start_label ( | PajaSystem::TimeContextC * pTimeContext )`[virtual]`

| Returns start label/frame.

virtual PajaTypes::uint32 get_style ( | ) const`[virtual]`

| Returns the style of the parameter. Reimplemented from Composition::ParamI.

PluginClass::SuperClassIdC get_super_class_filter ( | )`[virtual]`

| Returns the super class filter.

PajaTypes::int32 get_time_offset ( | )`[virtual]`

| Returns the time offset\. See: set_time_offset().

PajaTypes::float32 get_time_scale ( | )`[virtual]`

| Returns the time scale factor\. See: set_time_scale().

virtual PajaTypes::uint32 get_type ( | ) const`[virtual]`

| Returns the type of the parameter. Reimplemented from Composition::ParamI.

virtual void get_val ( | PajaTypes::int32 t,
| PajaTypes::float32 * val )`[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 from Composition::ParamI.

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

| Serialize the parameter from a Demopaja input stream. Reimplemented from Composition::ParamI.

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

| Shallow copy from a editable, see Edit::EditableI::restore(). Reimplemented from Composition::ParamI.

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

| Serialize the parameter to a Demopaja output stream. Reimplemented from Composition::ParamI.

void set_class_filter ( | PluginClass::ClassIdC rClassId )`[virtual]`

| Sets the class filter.

virtual void set_controller ( | ControllerC * cnt )`[virtual]`

| Sets the controller of the parameter. Reimplemented from Composition::ParamI.

void set_file ( | Import::FileHandleC * pHandle )`[virtual]`

| Sets the file handle.

virtual void set_id ( | PajaTypes::uint32 id )`[virtual]`

| Sets the ID of the parmeter. Reimplemented from Composition::ParamI.

virtual void set_increment ( | PajaTypes::float32 inc )`[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 from Composition::ParamI.

virtual void set_style ( | PajaTypes::uint32 style )`[virtual]`

| Sets the style of the parameter. Reimplemented from Composition::ParamI.

void set_super_class_filter ( | PluginClass::SuperClassIdC rSuperClassId )`[virtual]`

| Sets the super class filter.

void set_time_offset ( | PajaTypes::int32 i32TimeOffset )`[virtual]`

| Sets the time offset which is used to display the file duration. If it is neccessary an offset can be set to the file parameter. The system uses this offset and the scale factor set by the set_time_scale() method to calculate the duration of the file. The result is then shown in the timegraph. The default offset is zero. See also: set_time_scale()

void set_time_scale ( | PajaTypes::float32 f32TimeScale )`[virtual]`

| Sets the scaling factor which is used to scale the duration got from the file. If it is neccessary a scale factor can be set to the file parameter. The system uses this scalefactor and the offset set by the set_time_offset() method to calculate the duration of the file. The result is then shown in the timegraph. The default scale factor is one. See also: set_time_offset()

virtual void set_val ( | PajaTypes::int32 t,
| PajaTypes::float32 * val )`[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 from Composition::ParamI.

The documentation for this class was generated from the following file:

- ParamI.h