Undo description


Planned for future versions: Array short *gl_undo_desc[ 0 .. UNDO_BUFFER_SIZE]
descriptions for last changes in editor

gl_undo_pos = aktuelle Position im Array

Current version (used to simplify handling in first stable version)
gl_undo_desc = pointer to 1 undo description
gl_redo_desc = pointer to 1 redo description
both may be NULL if undo/redo is curently not possible

If undo will be executed the description will be copied to redo_desc and if redo has been executed the description will be copied back to undo_desc. The menu entries to start undo/redo will be changed depending on this descriptions.


Description stored:


Text operation = insert/delete single character
If more than one sign will be inserted or deleted one after the other this will be stored and undo'd in one operation.
Stored as
<short> undo_type (Values see UNDO_* in defines.h)
<EDIT_UNDO_TEXT> structure describing the text contents
n byte text contents stored behind the EDIT_UNDO_TEXT structure

Block operation = insert/delete block
<short> undo type
<SOURCE_BLOCK_HEADER> describing the block
n byte data = block contents

DELETE_BLOCK

short UNDO_DELETE_BLOCK
SOURCE_BLOCK_HEADER for block
data of block contents

INSERT_BLOCK

short UNDO_DELETE_BLOCK
SOURCE_BLOCK_HEADER for block
data of block contents



Currently missing:
Undo for changes in formdesigner
Undo for Replace command
Undo for changes in Database Gui like Queries and reports (needed??)




Undo operations
global stack gl_undo_desc
position in stack (last changed) gl_undo_pos

Operation short is first value

more undo actions



AltStyle によって変換されたページ (->オリジナル) /