1 #pragma once 2 3 #ifndef CONTEXTSTATUS_H 4 #define CONTEXTSTATUS_H 5 6 /** 7 * @author Fabrizio Morciano <fabrizio.morciano@gmail.com> 8 */ 9 10 #include "tcommon.h" 11 //#include "tvectorimage.h" 12 13 #include "tstroke.h" 14 15 #include "ext/Types.h" 16 17 #undef DVAPI 18 #undef DVVAR 19 #ifdef TNZEXT_EXPORTS 20 #define DVAPI DV_EXPORT_API 21 #define DVVAR DV_EXPORT_VAR 22 #else 23 #define DVAPI DV_IMPORT_API 24 #define DVVAR DV_IMPORT_VAR 25 #endif 26 27 namespace ToonzExt { 28 class StrokeParametricDeformer; 29 //--------------------------------------------------------------------------- 30 31 /** 32 * @brief This class maintains data required from manipulator. 33 */ 34 struct DVAPI ContextStatus { 35 // useful for special key status 36 enum { CTRL = 0x0001, ALT = 0x0002, SHIFT = 0x0004, NONE = 0x0000 }; 37 38 // cached information 39 TStroke *stroke2change_; 40 41 // parameter of selected stroke 42 double w_; 43 44 // how much curve to move 45 double lengthOfAction_; 46 47 // how much curve to move 48 double deformerSensitivity_; 49 50 // pixel size 51 double pixelSize_; 52 53 // degree of an angle to be a corner 54 int cornerSize_; 55 56 int key_event_; 57 58 StrokeParametricDeformer *deformer_; 59 60 /* 61 ToonzExt::Intervals* 62 spireCorners_; 63 64 ToonzExt::Intervals* 65 straightCorners_; 66 */ 67 // select between manual or automatic mode 68 bool isManual_; 69 70 ContextStatus(); 71 ~ContextStatus(); 72 73 // not a deep copy is performed!!! 74 ContextStatus(const ContextStatus &); 75 76 // not a deep copy is performed!!! 77 ContextStatus &operator=(const ContextStatus &); 78 79 void init(); 80 }; 81 //--------------------------------------------------------------------------- 82 } 83 #endif /* CONTEXTSTATUS_H */ 84 //----------------------------------------------------------------------------- 85 // End Of File 86 //----------------------------------------------------------------------------- 87