This file is the Open API interface to the UNDO_UG module. The UNDO_UG
module does not own any NX data and, therefore, does not actually do any
marking or undoing of data. UNDO_UG serves as an interface between the
various NX applications and the various NX data managers. If an application
wants a mark to be set, it only needs to make a single request of the UNDO_UG
module. It is the purpose of UNDO_UG to instruct each of the NX data
managers to set a mark. In the same fashion, if an application wishes
to UNDO to a mark, it makes that single request of the UNDO_UG module. The
UNDO_UG module insures that each data manager returns to the state it was
in at the time the requested mark was set.
NOTE: There is a maximum limit of 100 undo marks that can be created in
using an Open API program.
We have added the notion of the Next Visible Mark and Miscellaneous
callbacks. For a definition of the Next Visible Mark see the documentation
for
UF_UNDO_undo_to_next_vis_mark. This was added primarily so that UNDO_UG can help manage the Edit->Undo
function on the Menubar.
Miscellaneous callbacks are fully described in the documentation for
UF_UNDO_register_misc_cb. They can perform pre/post functions when setting/undoing marks. These are
optional. These can be logged by anyone at anytime, can be flagged to be
called only for particular marks or types of marks, and can be unlogged.
Miscellaneous callbacks were added for display and Edit->Undo.
This file contains functions that enable you to:
. Set a mark.
. Undo or rollback to a particular mark.
. Undo to the last mark of specified visibility.
. Undo to the last mark of a specified visibility that occurs before a
particular mark.
. Get the visibility of a previously set mark
. Set the visibility of a mark.
. Ask if a particular mark exists.
. Inquire how many marks of visibility exist.
. Ask if any marks exist.
. Flag a specified mark for deletion.
. Delete all marks.
. Delete a range of marks from the last mark set to a specified mark
An application can set a mark with a single request to the UNDO_UG module.
UNDO_UG instructs each of the NX data managers to set a mark. Similarly, an
application can UNDO to a mark with a single request of the UNDO_UG module. The
UNDO_UG module insures that each data manager returns to the state it was in at
the time the requested mark was set. Two possible uses for UF_UNDO in your
programs are to perform error cleanup and iterative experimentation.
Error Cleanup:
For error cleanup, a program can set a mark upon entry and then if an
error occurs the program can return NX to the state it was in at entry
time by requesting a single UNDO. This is usually more efficient than
coding your program to determine what sequence of individual
operations are necessary to perform to return NX to its original state.
Iterative experimentation:
For iterative experimentation, your program can set a mark, execute a
set of operations, and then test the final results. If the results are not
as desired, the program can request an UNDO and then try an
alternate set of operations. Since the original mark still exists, the
program can experiment, check results, and UNDO any number of
times without setting a new mark. This saves both time and space.