ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > ART Component API Reference > ART Component Functions Reference > Edit Undo Functions > ART_edit_undo_record

This function enables or disables the recording of every action.


Copy Code
AT_ERRCOUNT ART_edit_undo_record(
        HIGEAR hIGear, 
        BOOL fRecord


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 for C and C++.


Copy Code
HIGEAR hIGear; /* HIGEAR handle of image */
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 
/* 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, 


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.

Is this page helpful?
Yes No
Thanks for your feedback.