home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / src / MacSource / UndoRedoSystem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-04  |  1.4 KB  |  68 lines  |  [TEXT/CWIE]

  1. /*
  2.     This file contains function prototypes and structure definitions
  3.     to support undo and redo actions for a single text editor (window).
  4.  
  5.  
  6.     This file is for POV-Ray 3.0.1!
  7.     The POV-Ray-Team is allowed to use this source code as they like
  8.     to use it.
  9.  
  10.     Created by Thorsten Froehlich, 1997.
  11.  
  12.     See UndoRedoSystem.c for more information!
  13. */
  14.  
  15. #ifndef __UndoRedoSystem__
  16. #define __UndoRedoSystem__
  17.  
  18. #include <Types.h>
  19.  
  20.  
  21. typedef struct
  22. {
  23.     long selStart;
  24.     long selEnd;
  25.     Handle text;
  26.     Boolean mergeable;
  27.     char command[20];
  28. } My_UndoBuffer_Typedef;
  29.  
  30. typedef My_UndoBuffer_Typedef My_RedoBuffer_Typedef;
  31.  
  32.  
  33. /* Set the maximum undo / redo buffer size here */
  34.  
  35. #define kMaxUndoRedo 40
  36.  
  37.  
  38. extern int gUndoBufferCount;
  39. extern Boolean gUndoMaking;
  40.  
  41. extern int gRedoBufferCount;
  42. extern Boolean gRedoMaking;
  43.  
  44. void Init_UndoRedoSystem(void);
  45. void Dispose_UndoRedoSystem(void);
  46.  
  47. Boolean Check_CanUndo(void);
  48. Boolean Check_CanUndo(void);
  49. void Get_UndoCommand(char *str);
  50. void Get_RedoCommand(char *str);
  51.  
  52. void Begin_UndoRedo_Monitoring(void);
  53. void End_UndoRedo_Monitoring(Boolean change_undo,Boolean change_redo);
  54.  
  55. Boolean Begin_Make_Undoable(char *command,Boolean merge);
  56. Boolean End_Make_Undoable(void);
  57.  
  58. Boolean Begin_Make_Redoable(char *command,Boolean merge);
  59. Boolean End_Make_Redoable(void);
  60.  
  61. void Clear_UndoBuffer(void);
  62. void Clear_RedoBuffer(void);
  63.  
  64. Boolean My_DoUndo(void);
  65. Boolean My_DoRedo(void);
  66.  
  67. #endif
  68.