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.
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "CommandJion.h"
|
|
|
|
|
#include "Layer.h"
|
|
|
|
|
#include "GlobalFunction.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CCommandJion::CCommandJion(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CCommandJion::~CCommandJion(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>Ǻϲ<C7BA><CFB2><EFBFBD><EFBFBD><EFBFBD>obj
|
|
|
|
|
void CCommandJion::ExcuteExt()
|
|
|
|
|
{
|
|
|
|
|
CLayer &layer = gLayer;
|
|
|
|
|
vector<Sptr<CObjBase>> &vec = m_ObjContainer.GetObjVec();
|
|
|
|
|
vector<Sptr<CObjBase>>::iterator iter = vec.begin();
|
|
|
|
|
vector<Sptr<CObjBase>>::iterator iter_end = vec.end();
|
|
|
|
|
for(;iter!=iter_end;iter++)
|
|
|
|
|
{
|
|
|
|
|
if((*iter).IsNull()==false)
|
|
|
|
|
{
|
|
|
|
|
(*iter)->SetSelected(true);
|
|
|
|
|
if((*iter).IsNull()==false)
|
|
|
|
|
{
|
|
|
|
|
if(iter == vec.end()-1)
|
|
|
|
|
{
|
|
|
|
|
layer.AddObject((*iter));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
layer.DelObj((*iter));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CCommandJion::UndoExt()
|
|
|
|
|
{
|
|
|
|
|
CLayer &layer = gLayer;
|
|
|
|
|
vector<Sptr<CObjBase>> &vec = m_ObjContainer.GetObjVec();
|
|
|
|
|
vector<Sptr<CObjBase>>::iterator iter = vec.begin();
|
|
|
|
|
vector<Sptr<CObjBase>>::iterator iter_end = vec.end();
|
|
|
|
|
for(;iter!=iter_end;iter++)
|
|
|
|
|
{
|
|
|
|
|
if((*iter).IsNull()==false)
|
|
|
|
|
{
|
|
|
|
|
(*iter)->SetSelected(true);
|
|
|
|
|
if(iter == vec.end()-1)
|
|
|
|
|
{
|
|
|
|
|
layer.DelObj((*iter));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
layer.AddObject((*iter));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
CString CCommandJion::GetStr()
|
|
|
|
|
{
|
|
|
|
|
CString str = "_jion <20>ϲ<EFBFBD>-----";
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
|