Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TPARAMCHANGE_INCLUDED
Toshihiro Shimizu 890ddd
#define TPARAMCHANGE_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// TnzCore includes
Toshihiro Shimizu 890ddd
#include "tcommon.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TPARAM_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//===========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//    Forward declarations
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TParam;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//===========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//*****************************************************************************************
Toshihiro Shimizu 890ddd
//    TParamChange  declaration
Toshihiro Shimizu 890ddd
//*****************************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI TParamChange {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TParam *m_param;  //!< (not owned) The parameter being changed
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  double m_firstAffectedFrame,
Shinya Kitaoka 120a6e
      m_lastAffectedFrame;  //!< First and last frames affected by the change
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  bool
Shinya Kitaoka 120a6e
      m_keyframeChanged;  //!< Whether a keyframe has been altered by the change
Shinya Kitaoka 120a6e
  bool m_dragging;        //!< Whether the change is about a mouse being dragged
Shinya Kitaoka 120a6e
  bool m_undoing;  //!< Whether the change is happening within an undo operation
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  static double m_minFrame;
Shinya Kitaoka 120a6e
  static double m_maxFrame;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TParamChange(TParam *param, double firstAffectedFrame,
Shinya Kitaoka 120a6e
               double lastAffectedFrame, bool keyframeChanged, bool dragging,
Shinya Kitaoka 120a6e
               bool undoing);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual ~TParamChange() {}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//*****************************************************************************************
Toshihiro Shimizu 890ddd
//    TParamObserver  definition
Toshihiro Shimizu 890ddd
//*****************************************************************************************
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class DVAPI TParamObserver {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  virtual ~TParamObserver() {}
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual void onChange(const TParamChange &) = 0;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // TPARAMCHANGE_INCLUDED