00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __DEMOPAJA_EFFECTI_H__
00016 #define __DEMOPAJA_EFFECTI_H__
00017
00018
00019 namespace Composition {
00020 class EffectI;
00021 };
00022
00023 #include "PajaTypes.h"
00024 #include "DataBlockI.h"
00025 #include "EditableI.h"
00026 #include "UndoC.h"
00027 #include "GizmoI.h"
00028 #include "TimeSegmentC.h"
00029 #include "ClassIdC.h"
00030 #include "FileIO.h"
00031 #include "ImportableI.h"
00032 #include "DeviceContextC.h"
00033 #include "BBox2C.h"
00034 #include "Matrix2C.h"
00035 #include "TimeContextC.h"
00036 #include "FileHandleC.h"
00037 #include "LayerC.h"
00038 #include <string>
00039 #include <vector>
00040
00041
00042 namespace PluginClass {
00044
00045 const PluginClass::SuperClassIdC SUPERCLASS_EFFECT = PluginClass::SuperClassIdC( 0x1000000 );
00046 };
00047
00048 namespace Composition {
00049
00050
00052
00053 enum DefaultParamE {
00054 DEFAULT_PARAM_POSITION = 1,
00055 DEFAULT_PARAM_ROTATION = 2,
00056 DEFAULT_PARAM_SCALE = 3,
00057 DEFAULT_PARAM_PIVOT = 4,
00058 };
00059
00061
00084 class EffectI : public Edit::EditableI
00085 {
00086 public:
00088
00101 virtual void copy( Edit::EditableI* pEditable );
00103
00116 virtual void restore( Edit::EditableI* pEditable );
00117
00119
00120 virtual void set_name( const char* szName );
00122
00123 virtual const char* get_name() const;
00124
00126 virtual PajaTypes::int32 get_gizmo_count() = 0;
00128 virtual GizmoI* get_gizmo( PajaTypes::int32 i32Index ) = 0;
00129
00131
00135 virtual void set_flags( PajaTypes::int32 i32Flags );
00137
00138 virtual void add_flags( PajaTypes::int32 i32Flags );
00140
00141 virtual void del_flags( PajaTypes::int32 i32Flags );
00143
00144 virtual void toggle_flags( PajaTypes::int32 i32Flags );
00146
00147 virtual PajaTypes::int32 get_flags();
00148
00150 void set_parent( LayerC* pLayer );
00152 LayerC* get_parent() const;
00153
00155
00156 virtual TimeSegmentC* get_timesegment();
00157
00159 virtual PluginClass::SuperClassIdC get_super_class_id();
00161 virtual PluginClass::ClassIdC get_class_id() = 0;
00163 virtual const char* get_class_name() = 0;
00164
00166
00172 virtual void set_default_file( PajaTypes::int32 i32Time, Import::FileHandleC* pHandle ) = 0;
00173
00175
00191 virtual ParamI* get_default_param( PajaTypes::int32 i32Param ) = 0;
00192
00194
00206 virtual PajaTypes::uint32 update_notify( PajaTypes::uint32 ui32GizmoId, PajaTypes::uint32 ui32ParamId, PajaTypes::int32 i32Time );
00207
00209
00228 virtual bool hit_test( const PajaTypes::Vector2C& rPoint ) = 0;
00229
00231
00255 virtual void initialize( PajaTypes::uint32 ui32Reason, PajaSystem::DeviceContextC* pContext, PajaSystem::TimeContextC* pTimeContext ) = 0;
00256
00258
00330 virtual void eval_state( PajaTypes::int32 i32Time, PajaSystem::DeviceContextC* pContext, PajaSystem::TimeContextC* pTimeContext ) = 0;
00331
00333 virtual PajaTypes::BBox2C get_bbox() = 0;
00334
00336 virtual const PajaTypes::Matrix2C& get_transform_matrix() const = 0;
00337
00339
00356 virtual PajaTypes::uint32 save( FileIO::SaveC* pSave );
00358
00384 virtual PajaTypes::uint32 load( FileIO::LoadC* pLoad );
00385
00386
00387 protected:
00389 EffectI();
00391 EffectI( Edit::EditableI* pOriginal );
00393 virtual ~EffectI();
00394
00395 private:
00396 std::string m_sName;
00397 PajaTypes::int32 m_i32Flags;
00398 TimeSegmentC* m_pTimeSegment;
00399 LayerC* m_pParent;
00400 };
00401
00402 };
00403
00404 #endif // __DEMOPAJA_EFFECTI_H__