1 #pragma once 2 3 #ifndef TPARAMCHANGE_INCLUDED 4 #define TPARAMCHANGE_INCLUDED 5 6 // TnzCore includes 7 #include "tcommon.h" 8 9 #undef DVAPI 10 #undef DVVAR 11 #ifdef TPARAM_EXPORTS 12 #define DVAPI DV_EXPORT_API 13 #define DVVAR DV_EXPORT_VAR 14 #else 15 #define DVAPI DV_IMPORT_API 16 #define DVVAR DV_IMPORT_VAR 17 #endif 18 19 //=========================================================== 20 21 // Forward declarations 22 23 class TParam; 24 25 //=========================================================== 26 27 //***************************************************************************************** 28 // TParamChange declaration 29 //***************************************************************************************** 30 31 class DVAPI TParamChange { 32 public: 33 TParam *m_param; //!< (not owned) The parameter being changed 34 35 double m_firstAffectedFrame, 36 m_lastAffectedFrame; //!< First and last frames affected by the change 37 38 bool 39 m_keyframeChanged; //!< Whether a keyframe has been altered by the change 40 bool m_dragging; //!< Whether the change is about a mouse being dragged 41 bool m_undoing; //!< Whether the change is happening within an undo operation 42 43 static double m_minFrame; 44 static double m_maxFrame; 45 46 public: 47 TParamChange(TParam *param, double firstAffectedFrame, 48 double lastAffectedFrame, bool keyframeChanged, bool dragging, 49 bool undoing); 50 ~TParamChange()51 virtual ~TParamChange() {} 52 }; 53 54 //***************************************************************************************** 55 // TParamObserver definition 56 //***************************************************************************************** 57 58 class DVAPI TParamObserver { 59 public: ~TParamObserver()60 virtual ~TParamObserver() {} 61 62 virtual void onChange(const TParamChange &) = 0; 63 }; 64 65 #endif // TPARAMCHANGE_INCLUDED 66