You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
#include "stdafx.h"
|
|
#include "SigmaView.h"
|
|
#include "SectionDoc.h"
|
|
#include "ItemEditCurveInName.h"
|
|
//此文件指定包含圆弧、弦、扇形接口
|
|
|
|
static CItemEditCurveInName * getItemEditCurveInName(CSigmaView * pView)
|
|
{
|
|
CItem * pItem = pView->GetItem();
|
|
if (pItem == NULL)
|
|
return NULL;
|
|
|
|
CItemEditCurveInName * pItemCurve = dynamic_cast<CItemEditCurveInName *>(pItem);
|
|
|
|
return pItemCurve;
|
|
}
|
|
|
|
extern "C" __declspec(dllexport)
|
|
int EditCurve_BeginEdit(CSigmaView* pView, HDC hdc)
|
|
{
|
|
CItemEditCurveInName * item = getItemEditCurveInName(pView);
|
|
if (item == NULL)
|
|
return -1;
|
|
|
|
CDC * pDC = CDC::FromHandle(hdc);
|
|
if (pDC == 0)
|
|
return -1;
|
|
|
|
item->BeginEdit(pDC);
|
|
return 1;
|
|
}
|
|
|
|
extern "C" __declspec(dllexport)
|
|
int EditCurve_EndEdit(CSigmaView* pView, HDC hdc)
|
|
{
|
|
CItemEditCurveInName * item = getItemEditCurveInName(pView);
|
|
if (item == NULL)
|
|
return -1;
|
|
|
|
CDC * pDC = CDC::FromHandle(hdc);
|
|
if (pDC == 0)
|
|
return -1;
|
|
|
|
item->EndEdit(pDC);
|
|
return 1;
|
|
}
|
|
|
|
extern "C" __declspec(dllexport)
|
|
bool EditCurve_IsCurveNameMoved(CSigmaView* pView)
|
|
{
|
|
CItemEditCurveInName * item = getItemEditCurveInName(pView);
|
|
if (item == NULL)
|
|
return FALSE;
|
|
return item->IsMoved();
|
|
}
|