tahoma2d/toonz/sources/include/ext/InterfaceStatus.h

81 lines
2 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef INTERFACESTATUS_H
#define INTERFACESTATUS_H
/*****************************************************************************\
* *
* Author Fabrizio Morciano *
* *
\*****************************************************************************/
#include "tcommon.h"
#include "ext/CompositeStatus.h"
#undef DVAPI
#undef DVVAR
#ifdef TNZEXT_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
2016-06-15 18:43:10 +12:00
namespace ToonzExt {
class DVAPI InterfaceStatus : public CompositeStatus {
// From Client information
TPointD curr_, // current position of pointer
prev_, // previous position of pointer (drag)
down_; // position of mouse click
// how much curve to move
double lengthOfAction_;
// how much curve to move
double deformerSensibility_;
// pixel size
double pixelSize_;
// degree of an angle to be a corner
int cornerSize_;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
InterfaceStatus();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
InterfaceStatus(const TPointD &curr, const TPointD &prev, const TPointD &down,
double lengthOfAction, double deformerSensibility,
double pixelSize, int cornerSize);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
virtual ~InterfaceStatus();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void init();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
const TPointD &curr() const { return curr_; }
TPointD &curr() { return curr_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
const TPointD &prev() const { return prev_; }
TPointD &prev() { return prev_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
const TPointD &down() const { return down_; }
TPointD &down() { return down_; }
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double getDeformationLength() const;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setDeformationLength(double val);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double getSensibility() const;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setSensibility(double val);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
double getPixelSize() const;
void setPixelSize(double val);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
int getCornerSize() const;
void setCornerSize(int val);
2016-03-19 06:57:51 +13:00
};
//---------------------------------------------------------------------------
}
#endif /* INTERFACESTATUS_H */