ImageGear Professional for Linux
ART_edit_undo_record

This function enables or disables the recording of every action.

Declaration:

 
Copy Code
AT_ERRCOUNT ART_edit_undo_record(
        HIGEAR hIGear, 
        BOOL fRecord
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
fRecord BOOL A flag of type BOOL that enables or disables the recording of every action, so that the actions can later be undone. If TRUE, every action is recorded. Set to FALSE when you want recording to stop.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Example:

 
Copy Code
HIGEAR hIGear; /* HIGEAR handle of image */
case ID_EDIT_SELECTALL:
ART_mark_select_count(hIGear, &dwSelectCount);
ART_mark_count(hIGear, &dwMarkCount);
/* if the number of marks equals the number of  */
/* selected marks, then we don't need to do this */
if (dwMarkCount != dwSelectCount)
{
ART_edit_undo_record(hIGear, TRUE);
ART_mark_first(hIGear, &hMarkIndex, NULL);
while (hMarkIndex != ART_INVALID_ID)
{
/* check to see if the mark is already */
/* selected */
ART_mark_is_selected(hIGear, hMarkIndex 
&fSelected);
/* if not, then select it  */
if (!fSelected)
{
  ART_mark_select(hIGear, hMarkIndex, TRUE);
  ART_mark_next(hIGear, &hMarkIndex, NULL);
}
}
ART_edit_undo_record(hIGear, FALSE);
ART_GUI_mark_paint(hIGear, IG_GRP_DEFAULT, 
ART_INVALID_ID, hWnd, TRUE);
}
break;

Remarks:

If you call ART_edit_undo_record(), with fRecord set to TRUE, every action is recorded until this function is called again with fRecord set to FALSE. The next time ART_edit_undo() is called, all previously recorded actions become undone.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback