gCAD3D 2.40
xa_undo.c File Reference

undo-functions More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_txfil.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_os.h"
#include "../ut/ut_TX.h"
#include "../gui/gui__.h"
#include "../xa/xa.h"
#include "../xa/xa_ui.h"
#include "../xa/xa_undo.h"
#include "../xa/xa_ato.h"
#include "../xa/xa_ed_mem.h"

Data Structures

struct  undoObj


#define TRUE   1
#define FALSE   0


 typedef_MemTab (undoObj)
static MemTab (undoObj)
int UNDO_lock (int mode)
int UNDO_init1 (MemObj *parent)
int UNDO_init2 (MemObj *parent)
int UNDO_grp_add (long lNr, int grpNr)
int UNDO_grp_ck (long lNr)
int UNDO_grp_undo ()
int UNDO_grp_redo ()
int UNDO_grp_del (int ii)
int UNDO_grp_res (int ii)
int UNDO_ln_res (long lNr)
int UNDO_ln_del (long lNr)
int UNDO_chg_add (long lNr, int grpNr)
int UNDO_chg_ins (long newLnr)
int UNDO_app__ (int mode)
int UNDO_clear ()
int UNDO_upd__ ()
int UNDO_res_active ()
int UNDO_del_active ()
int UNDO_upd_bt ()
int UNDO_upd_lb ()
int UNDO_dump (char *info)


static MemObj wUndo
static MemObj btUndo
static MemObj btRedo

Detailed Description


UNDO_init1 clear undoTab
UNDO_init2 setup icons (delete=red-arroy; restore=green-arrow)
UNDO_lock enable / disable icons
UNDO_clear clear all groups
UNDO_grp_add add new group to undoTab
UNDO_chg_add save line-modified-record
UNDO_chg_ins increment all linenumbers > lNr
UNDO_app__ handle undo for plugins (no redo)
UNDO_grp_undo delete next group
UNDO_grp_redo restore next group
UNDO_grp_del delete group
UNDO_grp_res restore group
UNDO_ln_del delete sourceLine lNr
UNDO_ln_res restore line
UNDO_recNr__ get recordNr of last group in table
UNDO_grp_ck test if group already exists in undoTab
UNDO_del_active check if one of the previous groups can be deleted
UNDO_res_active check if one of the next groups can be restored
UNDO_upd_bt activate/disactivate delete/restore-buttons
UNDO_upd_lb update Label
// UNDO_grp_clr delete record and all following records
// UNDO_grpNr_recNr get groupNr from recordnr
// UNDO_recNr_grpNr get recordNr from groupNr
// UNDO_grp_upd delete all following groups after actGrp

Macro Definition Documentation

#define TRUE   1
#define FALSE   0

Function Documentation

typedef_MemTab ( undoObj  )
static MemTab ( undoObj  )
int UNDO_lock ( int  mode)
int UNDO_init1 ( MemObj parent)
int UNDO_init2 ( MemObj parent)
int UNDO_grp_add ( long  lNr,
int  grpNr 
* add sourceObj to do/undo-list
* for delete: call UNDO_grp_del() after UNDO_grp_add().
* for restore: call UNDO_grp_res() after UNDO_grp_add().
* Input:
* lNr lineNr of sourceObj
* grpNr 0 for first obj to add to list, 1 for second ..
* Output:
* retCod iRec of new group
int UNDO_grp_ck ( long  lNr)
int UNDO_grp_undo ( )

Ctrl-Z pressed or Undo-Button pressed; delete nxt group

int UNDO_grp_redo ( )

CB Redo-Button - restore next group

int UNDO_grp_del ( int  ii)
int UNDO_grp_res ( int  ii)
int UNDO_ln_res ( long  lNr)
int UNDO_ln_del ( long  lNr)
int UNDO_chg_add ( long  lNr,
int  grpNr 
int UNDO_chg_ins ( long  newLnr)
int UNDO_app__ ( int  mode)
* UNDO_app__ handle undo for plugins (no redo)
* Input
* mode
* 0 store all infos before start of appli
* 1 end of appli: create undo-record; activate undo-button
* 2 delete output of appli, remove undo-record
* 3 remove undo-record
int UNDO_clear ( )
int UNDO_upd__ ( )
int UNDO_res_active ( )
int UNDO_del_active ( )
int UNDO_upd_bt ( )

UNDO_upd_bt activate/disactivate delete/restore-buttons

int UNDO_upd_lb ( )

display Label

int UNDO_dump ( char *  info)

dump delTab

Variable Documentation

MemObj wUndo
MemObj btUndo
MemObj btRedo