Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef CONTEXTSTATUS_H
Toshihiro Shimizu 890ddd
#define CONTEXTSTATUS_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/**
Toshihiro Shimizu 890ddd
 * @author  Fabrizio Morciano <fabrizio.morciano@gmail.com></fabrizio.morciano@gmail.com>
Toshihiro Shimizu 890ddd
 */
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tcommon.h"
Toshihiro Shimizu 890ddd
//#include "tvectorimage.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tstroke.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "ext/Types.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TNZEXT_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
Shinya Kitaoka 120a6e
namespace ToonzExt {
Toshihiro Shimizu 890ddd
class StrokeParametricDeformer;
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/**
Toshihiro Shimizu 890ddd
   * @brief This class maintains data required from manipulator.
Toshihiro Shimizu 890ddd
   */
Shinya Kitaoka 120a6e
struct DVAPI ContextStatus {
Shinya Kitaoka 120a6e
  // useful for special key status
Shinya Kitaoka 120a6e
  enum { CTRL = 0x0001, ALT = 0x0002, SHIFT = 0x0004, NONE = 0x0000 };
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // cached information
Shinya Kitaoka 120a6e
  TStroke *stroke2change_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // parameter of selected stroke
Shinya Kitaoka 120a6e
  double w_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  //  how much curve to move
Shinya Kitaoka 120a6e
  double lengthOfAction_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  //  how much curve to move
Campbell Barton f49389
  double deformerSensitivity_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // pixel size
Shinya Kitaoka 120a6e
  double pixelSize_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // degree of an angle to be a corner
Shinya Kitaoka 120a6e
  int cornerSize_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  int key_event_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  StrokeParametricDeformer *deformer_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /*
Shinya Kitaoka 120a6e
ToonzExt::Intervals*
Shinya Kitaoka 120a6e
spireCorners_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
ToonzExt::Intervals*
Shinya Kitaoka 120a6e
straightCorners_;
Shinya Kitaoka 120a6e
*/
Shinya Kitaoka 120a6e
  // select between manual or automatic mode
Shinya Kitaoka 120a6e
  bool isManual_;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  ContextStatus();
Shinya Kitaoka 120a6e
  ~ContextStatus();
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // not a deep copy is performed!!!
Shinya Kitaoka 120a6e
  ContextStatus(const ContextStatus &);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  // not a deep copy is performed!!!
Shinya Kitaoka 120a6e
  ContextStatus &operator=(const ContextStatus &);
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  void init();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
#endif /* CONTEXTSTATUS_H */
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
//  End Of File
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------