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.
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "ActionItem.h"
|
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
|
|
|
|
namespace NAction
|
|
|
|
|
|
{
|
|
|
|
|
|
// ͼ<><CDBC>λ<EFBFBD><CEBB>
|
|
|
|
|
|
struct CLayerLocation
|
|
|
|
|
|
{
|
|
|
|
|
|
CString layer; // ͼ<>㱾<EFBFBD><E3B1BE>·<EFBFBD><C2B7><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>㼶;<3B><><EFBFBD>ﲻ<EFBFBD><EFB2BB> layerPath <20><>Ϊ<EFBFBD>˺;ɷ<CDBE><C9B7><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
|
CString prevLayer; // ǰһͼ<D2BB><CDBC><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>ͬһ<CDAC>㼶<EFBFBD>ڼ<EFBFBD><DABC><EFBFBD>Ԫ<EFBFBD>أ<EFBFBD>Ϊ<EFBFBD><CEAA>ʱ<EFBFBD><CAB1>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* ͼ<EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><EFBFBD>ͻָ<EFBFBD>
|
|
|
|
|
|
*/
|
|
|
|
|
|
class CActionLayerDragDropItem :
|
|
|
|
|
|
public CActionItem
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
CActionLayerDragDropItem();
|
|
|
|
|
|
CActionLayerDragDropItem(CSigmaDoc* ppDoc, const CLayerLocation &oldLocation, const CLayerLocation &newLocation);
|
|
|
|
|
|
|
|
|
|
|
|
std::string GetActionName() const override
|
|
|
|
|
|
{
|
|
|
|
|
|
return typeid(*this).name();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Undo() override;
|
|
|
|
|
|
void Redo() override;
|
|
|
|
|
|
|
|
|
|
|
|
void accept(CActionVisitor& visitor) override;
|
|
|
|
|
|
|
|
|
|
|
|
friend class BlobSerializer;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
// layer <20>Ӳ<EFBFBD><D3B2>е<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ա
|
|
|
|
|
|
POSITION GetFirstChildLayerPosition(CString layer);
|
|
|
|
|
|
POSITION GetLayerPosition(CString strLayer);
|
|
|
|
|
|
POSITION GetMatchPosition(CString strLayer, std::function<bool(CLayer*)> pred);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* <EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
|
|
|
|
|
|
*
|
|
|
|
|
|
* \param oldLocation <EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
|
|
|
|
|
|
* \param newLocation <EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
|
|
|
|
|
|
*/
|
|
|
|
|
|
void Move(const CLayerLocation& oldLocation, const CLayerLocation& newLocation);
|
|
|
|
|
|
|
|
|
|
|
|
CLayerLocation m_oldLocation; // ԭ<><D4AD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
|
|
|
|
|
CLayerLocation m_newLocation; // <20><><EFBFBD>϶<EFBFBD><CFB6><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|