Ejemplo n.º 1
0
/*************
* input 還未變形前的位置
**************/
void AddRedoUndoPaintInfo::AddModifySizeInfo(int ID,POINT posBeg,POINT posEnd)
{
	RecordObj *data = new RecordObj();
	::SecureZeroMemory(data, sizeof(RecordObj));

	gMyList.visitID_Node(ID);
	gMyList.CurrDataToRecordData( data );

	if( data->nObjType != IDM_WORD_REC )
	{
		data->Command = COMMAND_FIX_GRAPH;

	}
	else
	{

		data->Command = COMMAND_CHANGE_WORD_REC;
		SgWordDataModelControler::Instance()->SaveAllWordnThisWordRecToRecordObj( gMyList.GetCurrentNo() , data); 
		gPaintInfo.SetAction(TRUE);
	}


	data->ptBeg = posBeg;
	data->ptEnd = posEnd;
	gOriginator->SetRecordObj(data);
	gRedoUndoController->Record();
	data = NULL;


}
Ejemplo n.º 2
0
void AddRedoUndoPaintInfo::AddModifyPenColorInfo(int penColor)
{
	RecordObj *data = new RecordObj();
	::SecureZeroMemory(data, sizeof(RecordObj));

	gMyList.CurrDataToRecordData( data );

if( data->nObjType != IDM_WORD_REC )
	{
		data->Command = COMMAND_FIX_GRAPH;
		gOriginator->SetRecordObj(data);
	}
	else
	{
		data->Command = COMMAND_FIX_COLOR_WORD;
	
	}

	data->iNewPenColor = penColor;
	gOriginator->SetRecordObj(data);
	gRedoUndoController->Record();
	data = NULL;

	gPaintInfo.SetAction(TRUE);
}
Ejemplo n.º 3
0
void AddRedoUndoPaintInfo::AddNewNodeInfo(int ID)
{
	//儲存Log
	RecordObj *data = new RecordObj();
	::SecureZeroMemory(data, sizeof(RecordObj));

	gMyList.visitID_Node(ID);
	gMyList.CurrDataToRecordData( data );

	if( data->nObjType != IDM_WORD_REC )
	{
		data->Command = COMMAND_DRAW_NEW_GRAPH;
	}
	else
	{
		data->Command = COMMAND_ADD_WORD;
		
		SgWordDataModelControler::Instance()->SaveAllWordnThisWordRecToRecordObj( gMyList.GetCurrentNo() , data); 
	}
	gOriginator->SetRecordObj(data);
	gRedoUndoController->Record();
	data = NULL;

	gPaintInfo.SetAction(TRUE);
}
Ejemplo n.º 4
0
void AddRedoUndoPaintInfo::AddModifyPenWidthInfo(int penWidth)
{
	RecordObj *data = new RecordObj();
	::SecureZeroMemory(data, sizeof(RecordObj));

	gMyList.CurrDataToRecordData( data );

	data->Command = COMMAND_FIX_GRAPH;

	data->iNewPenWidth = penWidth;

	gOriginator->SetRecordObj(data);
	gRedoUndoController->Record();
	data = NULL;

	gPaintInfo.SetAction(TRUE);
}