|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include <DrawModel/Curve.h>
|
|
|
|
|
|
#include "HTrackerCommon.h"
|
|
|
|
|
|
#include "HTrackerHandleCalculator.h"
|
|
|
|
|
|
#include "HTrackerDrawer.h"
|
|
|
|
|
|
#include "HTrackerTransform.h"
|
|
|
|
|
|
#include "RubberLine.h"
|
|
|
|
|
|
#include "HTrackerSwitch.h"
|
|
|
|
|
|
#include "HTrackerBound.h"
|
|
|
|
|
|
|
|
|
|
|
|
class CSigmaDoc;
|
|
|
|
|
|
class TransformMotiveGraphDrawer;
|
|
|
|
|
|
class ScaleMotionGraphDrawer;
|
|
|
|
|
|
class PanMotionGraphDrawer;
|
|
|
|
|
|
class RotationMotionGraphDrawer;
|
|
|
|
|
|
class ShearMotionGraphDrawer;
|
|
|
|
|
|
class SelectedItemMotionGraphDrawer;
|
|
|
|
|
|
|
|
|
|
|
|
class HTracker
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
enum HTRACKER_STATUS
|
|
|
|
|
|
{
|
|
|
|
|
|
HTRACKER_STATUS_HIDE,
|
|
|
|
|
|
HTRACKER_STATUS_NOT_DRAG, //δ<><CEB4>ק״̬
|
|
|
|
|
|
HTRACKER_STATUS_DRAGING //<2F><>ק״̬
|
|
|
|
|
|
};
|
|
|
|
|
|
public:
|
|
|
|
|
|
HTracker();
|
|
|
|
|
|
~HTracker();
|
|
|
|
|
|
bool Create(CSigmaDoc * pDoc, CPositionList & selectionSet);
|
|
|
|
|
|
void LButtonDown(int mouseX, int mouseY);
|
|
|
|
|
|
void MouseMove(CDC * pDC, int mouseX, int mouseY);
|
|
|
|
|
|
void LButtonUp(int mouseX, int mouseY);
|
|
|
|
|
|
void Draw(CDC * pDC);
|
|
|
|
|
|
bool IsDraging();
|
|
|
|
|
|
void Reset();
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>Handle<6C>ϡ<EFBFBD>
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ֵ:<3A><>Handle<6C>ϣ<EFBFBD><CFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD>Handle<6C><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Handle<6C>Ϸ<EFBFBD><CFB7><EFBFBD>0<EFBFBD><30>
|
|
|
|
|
|
HTRACKER_HANDLE_KIND HitTest(int mouseX, int mouseY);
|
|
|
|
|
|
bool IsRotateAndShearState();
|
|
|
|
|
|
protected:
|
|
|
|
|
|
void CopySelectionSet(CPositionList & selectionSet);
|
|
|
|
|
|
void TranslateBoundRect(CRect & boundRectOut);
|
|
|
|
|
|
HTRACKER_TRANSFORM_KIND JudgeTransformKind(HTRACKER_HANDLE_KIND kind);
|
|
|
|
|
|
void ChangeGraphDrawer();
|
|
|
|
|
|
void ChangeHtrackerDrawerState();
|
|
|
|
|
|
private:
|
|
|
|
|
|
HTRACKER_STATUS m_status;
|
|
|
|
|
|
CPositionList m_selectionSet; //ѡ<><D1A1><EFBFBD><EFBFBD>
|
|
|
|
|
|
CRect m_boundRect; //tracker<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
HTrackerBound m_bound;
|
|
|
|
|
|
int m_HandleSize; //Handle<6C><65><EFBFBD><EFBFBD> <20><>λΪ<CEBB><CEAA><EFBFBD><EFBFBD>
|
|
|
|
|
|
HTrackerHandleCalculator m_handleCalctor;
|
|
|
|
|
|
HTrackerDrawer m_drawer;
|
|
|
|
|
|
HTrackerTransform m_trackerTransform;
|
|
|
|
|
|
CSigmaDoc * m_pDoc;
|
|
|
|
|
|
TransformMotiveGraphDrawer* m_pTMGDrawer;
|
|
|
|
|
|
ScaleMotionGraphDrawer * m_pScaleMotionGraphDrawer;
|
|
|
|
|
|
PanMotionGraphDrawer * m_pPanMotionGraphDrawer;
|
|
|
|
|
|
RotationMotionGraphDrawer * m_pRotationMotionGraphDrawer;
|
|
|
|
|
|
ShearMotionGraphDrawer * m_pShearMotionGraphDrawer;
|
|
|
|
|
|
int m_motionCount;
|
|
|
|
|
|
HTrackerSwitch m_switch;
|
|
|
|
|
|
HTRACKER_TRANSFORM_KIND m_transformKind;
|
|
|
|
|
|
SelectedItemMotionGraphDrawer * m_pSIMGDrawer;
|
|
|
|
|
|
};
|
|
|
|
|
|
|