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

# ParamI.h

    00001 //-------------------------------------------------------------------------
    00002 //
    00003 // File:        ParamI.h
    00004 // Desc:        Parameter classes.
    00005 // Author:      memon <memon@inside.org>
    00006 //
    00007 //-------------------------------------------------------------------------
    00008 //  Copyright (c) 2000-2002 Moppi Productions. All Rights Reserved.
    00009 //  This file is part of Moppi Demopaja SDK. For conditions of
    00010 //  distribution and use, see the accompanying license.txt file.
    00011 //  http://moppi.inside.org/demopaja/
    00012 //-------------------------------------------------------------------------
    00013
    00014 #ifndef __DEMOPAJA_PARAMI_H__
    00015 #define __DEMOPAJA_PARAMI_H__
    00016
    00017 namespace Composition {
    00018     class ParamI;
    00019 };
    00020
    00021 #include "PajaTypes.h"
    00022 #include "DataBlockI.h"
    00023 #include "EditableI.h"
    00024 #include "UndoC.h"
    00025 #include "ColorC.h"
    00026 #include "Vector2C.h"
    00027 #include "Vector3C.h"
    00028 #include "ControllerC.h"
    00029 #include "ClassIdC.h"
    00030 #include "FileHandleC.h"
    00031 #include "GizmoI.h"
    00032 #include "TimeContextC.h"
    00033
    00034 // STL
    00035 #include <vector>
    00036 #include <string>
    00037
    00038
    00039 //
    00040 // ParamI
    00041 //
    00042 // Interface for parameters
    00043 //
    00044
    00045
    00046 namespace Composition {
    00047
    00048
    00049     const bool      PARAM_ANIMATABLE = true;
    00050     const bool      PARAM_NOT_ANIMATABLE = false;
    00051
    00053     enum ParameterTypesE {
    00054         PARAM_TYPE_INT = 1,
    00055         PARAM_TYPE_FLOAT,
    00056         PARAM_TYPE_VECTOR2,
    00057         PARAM_TYPE_VECTOR3,
    00058         PARAM_TYPE_COLOR,
    00059         PARAM_TYPE_TEXT,
    00060         PARAM_TYPE_FILE,
    00061     };
    00062
    00064     enum ParamStyleE {
    00065         PARAM_STYLE_EDITBOX         = 0x0001,
    00066         PARAM_STYLE_COMBOBOX        = 0x0002,
    00067         PARAM_STYLE_TEXTPARAGRAPH   = 0x0004,
    00068         PARAM_STYLE_FILE            = 0x0008,
    00069         PARAM_STYLE_COLORPICKER     = 0x0010,
    00070         PARAM_STYLE_PERCENT         = 0x0020,
    00071         PARAM_STYLE_ANGLE           = 0x0040,
    00072         PARAM_STYLE_ABS_POSITION    = 0x0080,
    00073         PARAM_STYLE_REL_POSITION    = 0x0100,
    00074         PARAM_STYLE_WORLD_SPACE     = 0x0200,
    00075         PARAM_STYLE_OBJECT_SPACE    = 0x0400,
    00076     };
    00077
    00079     enum ParamSetValNotifyE {
    00080         PARAM_NOTIFY_NONE = 0,
    00081         PARAM_NOTIFY_UI_CHANGE,
    00082     };
    00083
    00084
    00086
    00113     class ParamI : public Edit::EditableI
    00114     {
    00115         friend class ParamIntC;
    00116         friend class ParamFloatC;
    00117         friend class ParamVector2C;
    00118         friend class ParamVector3C;
    00119         friend class ParamColorC;
    00120         friend class ParamTextC;
    00121         friend class ParamFileC;
    00122
    00123     public:
    00124
    00126         virtual void                copy( Edit::EditableI* pEditable );
    00128         virtual void                restore( Edit::EditableI* pEditable );
    00129
    00131         virtual void                set_flags( PajaTypes::int32 i32Flags );
    00133         virtual void                add_flags( PajaTypes::int32 i32Flags );
    00135         virtual void                del_flags( PajaTypes::int32 i32Flags );
    00137         virtual void                toggle_flags( PajaTypes::int32 i32Flags );
    00139         virtual PajaTypes::int32    get_flags();
    00140
    00142         virtual void                set_expanded_height( PajaTypes::int32 i32Height );
    00144         virtual PajaTypes::int32    get_expanded_height();
    00145
    00147         virtual PajaTypes::uint32   get_type() const = 0;
    00148
    00150         virtual void                set_name( const char* name );
    00152         virtual const char*         get_name();
    00153
    00155         virtual void                set_controller( ControllerC* cnt ) = 0;
    00157
    00158         virtual ControllerC*        get_controller() = 0;
    00159
    00161
    00166         virtual void                set_increment( PajaTypes::float32 f32Inc ) = 0;
    00168         virtual PajaTypes::float32  get_increment() const = 0;
    00170
    00177         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax ) = 0;
    00178
    00180         virtual void                set_id( PajaTypes::uint32 id ) = 0;
    00182         virtual PajaTypes::uint32   get_id() const = 0;
    00183
    00185         virtual void                set_style( PajaTypes::uint32 style ) = 0;
    00187         virtual PajaTypes::uint32   get_style() const = 0;
    00188
    00190         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    00192         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    00193
    00195         virtual void                set_parent( GizmoI* pParent );
    00197         virtual GizmoI*             get_parent();
    00198
    00199     protected:
    00201         ParamI();
    00203         ParamI( Edit::EditableI* pOriginal );
    00205         ParamI( GizmoI* pParent, const char* name, PajaTypes::uint32 id,
    00206                             PajaTypes::uint32 style = 0, bool animatable = true );
    00208         virtual ~ParamI();
    00209
    00210     private:
    00211         PajaTypes::uint32   m_ui32Id;
    00212         PajaTypes::uint32   m_ui32Style;
    00213         PajaTypes::int32    m_i32Flags;
    00214         PajaTypes::int32    m_i32Height;
    00215         ControllerC*        m_pCont;
    00216         std::string         m_sName;
    00217         GizmoI*             m_pParent;
    00218     };
    00219
    00220
    00222
    00232     class ParamIntC : public ParamI
    00233     {
    00234     public:
    00235
    00237
    00267         static ParamIntC*           create_new( GizmoI* pParent,
    00268                                                 const char* szName,
    00269                                                 PajaTypes::int32 i32Value,
    00270                                                 PajaTypes::uint32 ui32ID,
    00271                                                 PajaTypes::uint32 ui32Style = PARAM_STYLE_EDITBOX,
    00272                                                 bool bAnimatable = true,
    00273                                                 PajaTypes::int32 i32Min = 0,
    00274                                                 PajaTypes::int32 i32Max = 0,
    00275                                                 PajaTypes::int32 i32Inc = 1 );
    00277
    00292         virtual Edit::DataBlockI*   create();
    00293         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    00294         virtual void                copy( Edit::EditableI* pEditable );
    00295         virtual void                restore( Edit::EditableI* pEditable );
    00296
    00297         virtual PajaTypes::uint32   get_type() const;
    00298
    00299         virtual void                set_controller( ControllerC* cnt );
    00300         virtual ControllerC*        get_controller();
    00301
    00303         virtual void                set_min_max( PajaTypes::int32 i32Min, PajaTypes::int32 i32Max );
    00305         virtual PajaTypes::int32    get_min() const;
    00307         virtual PajaTypes::int32    get_max() const;
    00308         virtual void                set_increment( PajaTypes::float32 inc );
    00309         virtual PajaTypes::float32  get_increment() const;
    00310         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax );
    00311
    00312         virtual void                set_style( PajaTypes::uint32 style );
    00313         virtual PajaTypes::uint32   get_style() const;
    00314
    00315         virtual void                set_id( PajaTypes::uint32 id );
    00316         virtual PajaTypes::uint32   get_id() const;
    00317
    00319         virtual void                clear_labels();
    00321
    00324         virtual void                add_label( PajaTypes::int32 i32Val, const char* szName );
    00326
    00329         virtual void                add_label( PajaTypes::int32 i32Val, const std::string& sName );
    00331         virtual PajaTypes::uint32   get_label_count() const;
    00333         virtual const char*         get_label_name( PajaTypes::uint32 i );
    00335         virtual PajaTypes::int32    get_label_value( PajaTypes::uint32 i );
    00337         virtual void                remove_label( PajaTypes::int32 val );
    00338
    00340         virtual PajaTypes::uint32   set_val( PajaTypes::int32 t, const PajaTypes::int32& val );
    00342         virtual void                get_val( PajaTypes::int32 t, PajaTypes::int32& val );
    00343
    00344         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    00345         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    00346
    00347     protected:
    00349         ParamIntC();
    00351         ParamIntC( GizmoI* pParent, const char* name, PajaTypes::int32 value, PajaTypes::uint32 id,
    00352                    PajaTypes::uint32 style = PARAM_STYLE_EDITBOX, bool animatable = true,
    00353                    PajaTypes::int32 min = 0, PajaTypes::int32 max = 0, PajaTypes::int32 inc = 1 );
    00355         ParamIntC( Edit::EditableI* pOriginal );
    00357         virtual ~ParamIntC();
    00358
    00359     private:
    00360
    00361         struct LabelS {
    00362             PajaTypes::int32    m_i32Val;
    00363             std::string         m_sName;
    00364         };
    00365
    00366         PajaTypes::int32        m_i32Const;     // constant value
    00367         PajaTypes::int32        m_i32Inc;
    00368         PajaTypes::int32        m_i32Min, m_i32Max;
    00369         std::vector<LabelS>     m_rLabels;
    00370     };
    00371
    00372
    00374
    00380     class ParamFloatC : public ParamI
    00381     {
    00382     public:
    00383
    00385
    00422         static ParamFloatC*         create_new( GizmoI* pParent,
    00423                                                 const char* name,
    00424                                                 PajaTypes::float32 value,
    00425                                                 PajaTypes::uint32 id,
    00426                                                 PajaTypes::uint32 style = PARAM_STYLE_EDITBOX,
    00427                                                 bool animatable = true,
    00428                                                 PajaTypes::float32 min = 0,
    00429                                                 PajaTypes::float32 max = 0,
    00430                                                 PajaTypes::float32 inc = 0.01f );
    00432
    00447         virtual Edit::DataBlockI*   create();
    00448         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    00449         virtual void                copy( Edit::EditableI* pEditable );
    00450         virtual void                restore( Edit::EditableI* pEditable );
    00451
    00452         virtual PajaTypes::uint32   get_type() const;
    00453
    00454         virtual void                set_controller( ControllerC* cnt );
    00455         virtual ControllerC*        get_controller();
    00456
    00458         virtual void                set_min_max( PajaTypes::float32 min, PajaTypes::float32 max );
    00460         virtual PajaTypes::float32  get_min() const;
    00462         virtual PajaTypes::float32  get_max() const;
    00463         virtual void                set_increment( PajaTypes::float32 inc );
    00464         virtual PajaTypes::float32  get_increment() const;
    00465         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax );
    00466
    00467         virtual void                set_style( PajaTypes::uint32 style );
    00468         virtual PajaTypes::uint32   get_style() const;
    00469
    00470         virtual void                set_id( PajaTypes::uint32 id );
    00471         virtual PajaTypes::uint32   get_id() const;
    00472
    00474         virtual PajaTypes::uint32   set_val( PajaTypes::int32 t, const PajaTypes::float32& val );
    00476         virtual void                get_val( PajaTypes::int32 t, PajaTypes::float32& val );
    00477
    00478         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    00479         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    00480
    00481     protected:
    00483         ParamFloatC();
    00485         ParamFloatC( GizmoI* pParent, const char* name, PajaTypes::float32 value, PajaTypes::uint32 id,
    00486                      PajaTypes::uint32 style = PARAM_STYLE_EDITBOX, bool animatable = true,
    00487                      PajaTypes::float32 min = 0, PajaTypes::float32 max = 0, PajaTypes::float32 inc = 0.01f );
    00489         ParamFloatC( Edit::EditableI* pOriginal );
    00491         virtual ~ParamFloatC();
    00492
    00493     private:
    00494         PajaTypes::float32  m_f32Const;
    00495         PajaTypes::float32  m_f32Min, m_f32Max;
    00496         PajaTypes::float32  m_f32Inc;
    00497     };
    00498
    00499
    00501
    00509     class ParamVector2C : public ParamI
    00510     {
    00511     public:
    00512
    00514
    00572         static ParamVector2C*       create_new( GizmoI* pParent,
    00573                                                 const char* name,
    00574                                                 const PajaTypes::Vector2C& value,
    00575                                                 PajaTypes::uint32 id,
    00576                                                 PajaTypes::uint32 style = PARAM_STYLE_EDITBOX,
    00577                                                 bool animatable = true,
    00578                                                 const PajaTypes::Vector2C& min = PajaTypes::Vector2C(),
    00579                                                 const PajaTypes::Vector2C& max = PajaTypes::Vector2C(),
    00580                                                 PajaTypes::float32 inc = 0.1f );
    00582
    00597         virtual Edit::DataBlockI*   create();
    00598         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    00599         virtual void                copy( Edit::EditableI* pEditable );
    00600         virtual void                restore( Edit::EditableI* pEditable );
    00601
    00602         virtual PajaTypes::uint32   get_type() const;
    00603
    00604         virtual void                set_controller( ControllerC* cnt );
    00605         virtual ControllerC*        get_controller();
    00606
    00608         virtual void                set_min_max( const PajaTypes::Vector2C& min, const PajaTypes::Vector2C& max );
    00610         virtual const PajaTypes::Vector2C&  get_min() const;
    00612         virtual const PajaTypes::Vector2C&  get_max() const;
    00613         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax );
    00614
    00615         virtual void                set_increment( PajaTypes::float32 inc );
    00616         virtual PajaTypes::float32  get_increment() const;
    00617
    00618         virtual void                set_style( PajaTypes::uint32 style );
    00619         virtual PajaTypes::uint32   get_style() const;
    00620
    00621         virtual void                set_id( PajaTypes::uint32 id );
    00622         virtual PajaTypes::uint32   get_id() const;
    00623
    00625         virtual PajaTypes::uint32   set_val( PajaTypes::int32 t, const PajaTypes::Vector2C& val );
    00627         virtual void                get_val( PajaTypes::int32 t, PajaTypes::Vector2C& val );
    00628
    00629         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    00630         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    00631
    00632     protected:
    00634         ParamVector2C();
    00636         ParamVector2C( GizmoI* pParent, const char* name, const PajaTypes::Vector2C& value, PajaTypes::uint32 id,
    00637                        PajaTypes::uint32 style = PARAM_STYLE_EDITBOX, bool animatable = true,
    00638                        const PajaTypes::Vector2C& min = PajaTypes::Vector2C(),
    00639                        const PajaTypes::Vector2C& max = PajaTypes::Vector2C(), PajaTypes::float32 inc = 0.1f );
    00641         ParamVector2C( Edit::EditableI* pOriginal );
    00643         virtual ~ParamVector2C();
    00644
    00645     private:
    00646         PajaTypes::Vector2C m_rConst;
    00647         PajaTypes::Vector2C m_rMin, m_rMax;
    00648         PajaTypes::float32  m_f32Inc;
    00649     };
    00650
    00651
    00653
    00659     class ParamVector3C : public ParamI
    00660     {
    00661     public:
    00662
    00664
    00699         static ParamVector3C*       create_new( GizmoI* pParent,
    00700                                                 const char* szName,
    00701                                                 const PajaTypes::Vector3C& rValue,
    00702                                                 PajaTypes::uint32 ui32ID,
    00703                                                 PajaTypes::uint32 ui32Style = PARAM_STYLE_EDITBOX,
    00704                                                 bool bAnimatable = true,
    00705                                                 const PajaTypes::Vector3C& rMin = PajaTypes::Vector3C(),
    00706                                                 const PajaTypes::Vector3C& rMax = PajaTypes::Vector3C(),
    00707                                                 PajaTypes::float32 f32Inc = 0.1f );
    00709
    00724         virtual Edit::DataBlockI*   create();
    00725         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    00726         virtual void                copy( Edit::EditableI* pEditable );
    00727         virtual void                restore( Edit::EditableI* pEditable );
    00728
    00729         virtual PajaTypes::uint32   get_type() const;
    00730
    00731         virtual void                set_controller( ControllerC* cnt );
    00732         virtual ControllerC*        get_controller();
    00733
    00735         virtual void                set_min_max( const PajaTypes::Vector3C& min, const PajaTypes::Vector3C& max );
    00737         virtual const PajaTypes::Vector3C&  get_min() const;
    00739         virtual const PajaTypes::Vector3C&  get_max() const;
    00740
    00741         virtual void                set_increment( PajaTypes::float32 inc );
    00742         virtual PajaTypes::float32  get_increment() const;
    00743         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax );
    00744
    00745         virtual void                set_style( PajaTypes::uint32 style );
    00746         virtual PajaTypes::uint32   get_style() const;
    00747
    00748         virtual void                set_id( PajaTypes::uint32 id );
    00749         virtual PajaTypes::uint32   get_id() const;
    00750
    00752         virtual PajaTypes::uint32   set_val( PajaTypes::int32 t, const PajaTypes::Vector3C& val );
    00754         virtual void                get_val( PajaTypes::int32 t, PajaTypes::Vector3C& val );
    00755
    00756         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    00757         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    00758
    00759     protected:
    00761         ParamVector3C();
    00763         ParamVector3C( GizmoI* pParent, const char* name, const PajaTypes::Vector3C& value, PajaTypes::uint32 id,
    00764                        PajaTypes::uint32 style = PARAM_STYLE_EDITBOX, bool animatable = true,
    00765                        const PajaTypes::Vector3C& min = PajaTypes::Vector3C(),
    00766                        const PajaTypes::Vector3C& max = PajaTypes::Vector3C(), PajaTypes::float32 inc = 0.1f );
    00768         ParamVector3C( Edit::EditableI* pOriginal );
    00770         virtual ~ParamVector3C();
    00771
    00772     private:
    00773         PajaTypes::Vector3C m_rConst;
    00774         PajaTypes::Vector3C m_rMin, m_rMax;
    00775         PajaTypes::float32  m_f32Inc;
    00776     };
    00777
    00779
    00788     class ParamColorC : public ParamI
    00789     {
    00790     public:
    00791
    00793
    00816         static ParamColorC*         create_new( GizmoI* pParent,
    00817                                                 const char* szName,
    00818                                                 const PajaTypes::ColorC& rValue,
    00819                                                 PajaTypes::uint32 ui32ID,
    00820                                                 PajaTypes::uint32 ui32Style = PARAM_STYLE_COLORPICKER,
    00821                                                 bool bAnimatable = true );
    00823
    00835         virtual Edit::DataBlockI*   create();
    00836         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    00837         virtual void                copy( Edit::EditableI* pEditable );
    00838         virtual void                restore( Edit::EditableI* pEditable );
    00839
    00840         virtual PajaTypes::uint32   get_type() const;
    00841
    00842         virtual void                set_controller( ControllerC* cnt );
    00843         virtual ControllerC*        get_controller();
    00844
    00846         virtual void                set_increment( PajaTypes::float32 inc );
    00847         virtual PajaTypes::float32  get_increment() const;
    00848         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax );
    00849
    00850         virtual void                set_style( PajaTypes::uint32 style );
    00851         virtual PajaTypes::uint32   get_style() const;
    00852
    00853         virtual void                set_id( PajaTypes::uint32 id );
    00854         virtual PajaTypes::uint32   get_id() const;
    00855
    00857         virtual PajaTypes::uint32   set_val( PajaTypes::int32 t, const PajaTypes::ColorC& val );
    00859         virtual void                get_val( PajaTypes::int32 t, PajaTypes::ColorC& val );
    00860
    00861         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    00862         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    00863
    00864     protected:
    00866         ParamColorC();
    00868         ParamColorC( GizmoI* pParent, const char* name, const PajaTypes::ColorC& value, PajaTypes::uint32 id,
    00869                      PajaTypes::uint32 style = PARAM_STYLE_COLORPICKER, bool animatable = true );
    00871         ParamColorC( Edit::EditableI* pOriginal );
    00873         virtual ~ParamColorC();
    00874
    00875     private:
    00876         PajaTypes::ColorC   m_rConst;
    00877     };
    00878
    00879
    00881
    00888     class ParamTextC : public ParamI
    00889     {
    00890     public:
    00891
    00893
    00911         static ParamTextC*          create_new( GizmoI* pParent,
    00912                                                 const char* szName,
    00913                                                 const char* szText,
    00914                                                 PajaTypes::uint32 id,
    00915                                                 PajaTypes::uint32 style = PARAM_STYLE_EDITBOX );
    00916
    00918
    00929         virtual Edit::DataBlockI*   create();
    00930         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    00931         virtual void                copy( Edit::EditableI* pEditable );
    00932         virtual void                restore( Edit::EditableI* pEditable );
    00933
    00934         virtual PajaTypes::uint32   get_type() const;
    00935
    00936         virtual void                set_controller( ControllerC* cnt );
    00937         virtual ControllerC*        get_controller();
    00938
    00939         virtual void                set_style( PajaTypes::uint32 style );
    00940         virtual PajaTypes::uint32   get_style() const;
    00941
    00942         virtual void                set_id( PajaTypes::uint32 id );
    00943         virtual PajaTypes::uint32   get_id() const;
    00944
    00945         virtual void                set_increment( PajaTypes::float32 inc );
    00946         virtual PajaTypes::float32  get_increment() const;
    00947         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax );
    00948
    00950         virtual PajaTypes::uint32   set_val( PajaTypes::int32 i32Time, const char* szVal );
    00952
    00957         virtual const char*         get_val( PajaTypes::int32 i32Time, char* szVal = 0, PajaTypes::int32 i32Size = 0 );
    00958
    00959         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    00960         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    00961
    00962     protected:
    00964         ParamTextC();
    00966         ParamTextC( GizmoI* pParent, const char* name, const char* text, PajaTypes::uint32 id,
    00967                     PajaTypes::uint32 style = PARAM_STYLE_EDITBOX );
    00969         ParamTextC( Edit::EditableI* pOriginal );
    00971         virtual ~ParamTextC();
    00972
    00973     private:
    00974         std::string     m_sText;
    00975     };
    00976
    00977
    00979
    00986     class ParamFileC : public ParamI
    00987     {
    00988     public:
    00989
    00991
    01027         static ParamFileC*          create_new( GizmoI* pParent, const char* szName,
    01028                                                 PluginClass::SuperClassIdC rSuperClassFilter,
    01029                                                 PluginClass::ClassIdC rClassFilter,
    01030                                                 PajaTypes::uint32 ui32ID,
    01031                                                 PajaTypes::uint32 ui32Style = PARAM_STYLE_FILE,
    01032                                                 bool bAnimatable = false );
    01034
    01046         virtual Edit::DataBlockI*   create();
    01047         virtual Edit::DataBlockI*   create( Edit::EditableI* pOriginal );
    01048         virtual void                copy( Edit::EditableI* pEditable );
    01049         virtual void                restore( Edit::EditableI* pEditable );
    01050
    01051         virtual PajaTypes::uint32   get_type() const;
    01052
    01053         virtual void                set_controller( ControllerC* cnt );
    01054         virtual ControllerC*        get_controller();
    01055
    01056         virtual void                set_style( PajaTypes::uint32 style );
    01057         virtual PajaTypes::uint32   get_style() const;
    01058
    01059         virtual void                set_id( PajaTypes::uint32 id );
    01060         virtual PajaTypes::uint32   get_id() const;
    01061
    01062         virtual void                set_increment( PajaTypes::float32 inc );
    01063         virtual PajaTypes::float32  get_increment() const;
    01064         virtual bool                get_min_max( PajaTypes::float32* pMin, PajaTypes::float32* pMax );
    01065
    01067         virtual PajaTypes::uint32           set_file( PajaTypes::int32 t, Import::FileHandleC* pHandle );
    01069         virtual Import::FileHandleC*        get_file( PajaTypes::int32 t );
    01071         virtual void                        get_file( PajaTypes::int32 t, Import::FileHandleC*& pHandle, PajaTypes::int32& i32FileTime );
    01072
    01074         virtual PluginClass::SuperClassIdC  get_super_class_filter();
    01076         virtual PluginClass::ClassIdC       get_class_filter();
    01077
    01079         virtual void                set_super_class_filter( PluginClass::SuperClassIdC rSuperClassId );
    01081         virtual void                set_class_filter( PluginClass::ClassIdC rClassId );
    01082
    01084
    01087         virtual PajaTypes::uint32           set_time_offset( PajaTypes::int32 t, PajaTypes::int32 i32TimeOffset );
    01089
    01092         virtual PajaTypes::uint32           set_time_scale( PajaTypes::int32 t, PajaTypes::float32 f32TimeScale );
    01093
    01095         virtual PajaTypes::int32    get_time_offset( PajaTypes::int32 t );
    01097         virtual PajaTypes::float32  get_time_scale( PajaTypes::int32 t );
    01098
    01099         // return negative value the duration can't be specified (the file is still).
    01100
    01102
    01110         virtual PajaTypes::int32    get_duration( PajaTypes::int32 t, PajaSystem::TimeContextC* pTimeContext );
    01112         virtual PajaTypes::float32  get_start_label( PajaTypes::int32 t, PajaSystem::TimeContextC* pTimeContext );
    01114         virtual PajaTypes::float32  get_end_label( PajaTypes::int32 t, PajaSystem::TimeContextC* pTimeContext );
    01115
    01117         virtual PajaTypes::uint32   update_file_handles( Import::FileHandleC* pNewHandle );
    01119         virtual void                update_file_references();
    01120
    01121         virtual PajaTypes::uint32   save( FileIO::SaveC* pSave );
    01122         virtual PajaTypes::uint32   load( FileIO::LoadC* pLoad );
    01123
    01124     protected:
    01126         ParamFileC();
    01128         ParamFileC( GizmoI* pParent, const char* name, PluginClass::SuperClassIdC rSuperClassFilter,
    01129                     PluginClass::ClassIdC rClassFilter, PajaTypes::uint32 id,
    01130                     PajaTypes::uint32 style = PARAM_STYLE_EDITBOX, bool bAnimatable = true );
    01132         ParamFileC( Edit::EditableI* pOriginal );
    01134         virtual ~ParamFileC();
    01135
    01136     private:
    01137         Import::FileHandleC*        m_pHandle;
    01138         PluginClass::SuperClassIdC  m_rSuperClassFilter;
    01139         PluginClass::ClassIdC       m_rClassFilter;
    01140         PajaTypes::int32            m_i32TimeOffset;
    01141         PajaTypes::float32          m_f32TimeScale;
    01142     };
    01143
    01144 };  // namespace
    01145
    01146 #endif