|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef INTERFACESTATUS_H
|
|
Toshihiro Shimizu |
890ddd |
#define INTERFACESTATUS_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/*****************************************************************************\
|
|
Toshihiro Shimizu |
890ddd |
* *
|
|
Toshihiro Shimizu |
890ddd |
* Author Fabrizio Morciano *
|
|
Toshihiro Shimizu |
890ddd |
* *
|
|
Toshihiro Shimizu |
890ddd |
\*****************************************************************************/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tcommon.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "ext/CompositeStatus.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 {
|
|
Shinya Kitaoka |
120a6e |
class DVAPI InterfaceStatus : public CompositeStatus {
|
|
Shinya Kitaoka |
120a6e |
// From Client information
|
|
Shinya Kitaoka |
120a6e |
TPointD curr_, // current position of pointer
|
|
Shinya Kitaoka |
120a6e |
prev_, // previous position of pointer (drag)
|
|
Shinya Kitaoka |
120a6e |
down_; // position of mouse click
|
|
Shinya Kitaoka |
120a6e |
// how much curve to move
|
|
Shinya Kitaoka |
120a6e |
double lengthOfAction_;
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
// how much curve to move
|
|
Shinya Kitaoka |
120a6e |
double deformerSensibility_;
|
|
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_;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
InterfaceStatus();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
InterfaceStatus(const TPointD &curr, const TPointD &prev, const TPointD &down,
|
|
Shinya Kitaoka |
120a6e |
double lengthOfAction, double deformerSensibility,
|
|
Shinya Kitaoka |
120a6e |
double pixelSize, int cornerSize);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
virtual ~InterfaceStatus();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void init();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
const TPointD &curr() const { return curr_; }
|
|
Shinya Kitaoka |
120a6e |
TPointD &curr() { return curr_; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
const TPointD &prev() const { return prev_; }
|
|
Shinya Kitaoka |
120a6e |
TPointD &prev() { return prev_; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
const TPointD &down() const { return down_; }
|
|
Shinya Kitaoka |
120a6e |
TPointD &down() { return down_; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
double getDeformationLength() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setDeformationLength(double val);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
double getSensibility() const;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void setSensibility(double val);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
double getPixelSize() const;
|
|
Shinya Kitaoka |
120a6e |
void setPixelSize(double val);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
int getCornerSize() const;
|
|
Shinya Kitaoka |
120a6e |
void setCornerSize(int val);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//---------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
#endif /* INTERFACESTATUS_H */
|