| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
#ifndef _IUNDO_H_ |
|---|
| 23 |
#define _IUNDO_H_ |
|---|
| 24 |
|
|---|
| 25 |
#define UNDO_MAJOR "undo" |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
typedef void (*PFN_UNDOSTART) (const char *operation); |
|---|
| 29 |
|
|---|
| 30 |
typedef void (*PFN_UNDOEND) (void); |
|---|
| 31 |
|
|---|
| 32 |
typedef void (*PFN_UNDOADDBRUSH) (brush_t *pBrush); |
|---|
| 33 |
|
|---|
| 34 |
typedef void (*PFN_UNDOENDBRUSH) (brush_t *pBrush); |
|---|
| 35 |
|
|---|
| 36 |
typedef void (*PFN_UNDOADDBRUSHLIST) (brush_t *brushlist); |
|---|
| 37 |
|
|---|
| 38 |
typedef void (*PFN_UNDOENDBRUSHLIST) (brush_t *brushlist); |
|---|
| 39 |
|
|---|
| 40 |
typedef void (*PFN_UNDOADDENTITY) (entity_t *entity); |
|---|
| 41 |
|
|---|
| 42 |
typedef void (*PFN_UNDOENDENTITY) (entity_t *entity); |
|---|
| 43 |
|
|---|
| 44 |
typedef void (*PFN_UNDO) (unsigned char bSilent); |
|---|
| 45 |
|
|---|
| 46 |
typedef void (*PFN_REDO) (void); |
|---|
| 47 |
|
|---|
| 48 |
typedef int (*PFN_GETUNDOID) (void); |
|---|
| 49 |
|
|---|
| 50 |
typedef int (*PFN_UNDOAVAILABLE) (void); |
|---|
| 51 |
|
|---|
| 52 |
typedef int (*PFN_REDOAVAILABLE) (void); |
|---|
| 53 |
|
|---|
| 54 |
struct _QERUndoTable |
|---|
| 55 |
{ |
|---|
| 56 |
int m_nSize; |
|---|
| 57 |
PFN_UNDOSTART m_pfnUndo_Start; |
|---|
| 58 |
PFN_UNDOEND m_pfnUndo_End; |
|---|
| 59 |
PFN_UNDOADDBRUSH m_pfnUndo_AddBrush; |
|---|
| 60 |
PFN_UNDOENDBRUSH m_pfnUndo_EndBrush; |
|---|
| 61 |
PFN_UNDOADDBRUSHLIST m_pfnUndo_AddBrushList; |
|---|
| 62 |
PFN_UNDOENDBRUSHLIST m_pfnUndo_EndBrushList; |
|---|
| 63 |
PFN_UNDOADDENTITY m_pfnUndo_AddEntity; |
|---|
| 64 |
PFN_UNDOENDENTITY m_pfnUndo_EndEntity; |
|---|
| 65 |
PFN_UNDO m_pfnUndo_Undo; |
|---|
| 66 |
PFN_REDO m_pfnUndo_Redo; |
|---|
| 67 |
PFN_GETUNDOID m_pfnUndo_GetUndoId; |
|---|
| 68 |
PFN_UNDOAVAILABLE m_pfnUndo_UndoAvailable; |
|---|
| 69 |
PFN_REDOAVAILABLE m_pfnUndo_RedoAvailable; |
|---|
| 70 |
}; |
|---|
| 71 |
|
|---|
| 72 |
#ifdef USE_UNDOTABLE_DEFINE |
|---|
| 73 |
#ifndef __UNDOTABLENAME |
|---|
| 74 |
#define __UNDOTABLENAME g_UndoTable |
|---|
| 75 |
#endif |
|---|
| 76 |
#define Undo_Start __UNDOTABLENAME.m_pfnUndo_Start |
|---|
| 77 |
#define Undo_End __UNDOTABLENAME.m_pfnUndo_End |
|---|
| 78 |
#define Undo_AddBrush __UNDOTABLENAME.m_pfnUndo_AddBrush |
|---|
| 79 |
#define Undo_EndBrush __UNDOTABLENAME.m_pfnUndo_EndBrush |
|---|
| 80 |
#define Undo_AddBrushList __UNDOTABLENAME.m_pfnUndo_AddBrushList |
|---|
| 81 |
#define Undo_EndBrushList __UNDOTABLENAME.m_pfnUndo_EndBrushList |
|---|
| 82 |
#define Undo_AddEntity __UNDOTABLENAME.m_pfnUndo_AddEntity |
|---|
| 83 |
#define Undo_EndEntity __UNDOTABLENAME.m_pfnUndo_EndEntity |
|---|
| 84 |
#endif |
|---|
| 85 |
|
|---|
| 86 |
#endif // _IUNDO_H_ |
|---|
| 87 |
|
|---|