/************* * 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; }
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); }
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); }
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); }