Undo.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. //
  19. //
  20. // QERadiant Multilevel Undo/Redo
  21. //
  22. //
  23. //start operation
  24. void Undo_Start(char *operation);
  25. //end operation
  26. void Undo_End(void);
  27. //add brush to the undo
  28. void Undo_AddBrush(brush_t *pBrush);
  29. //add a list with brushes to the undo
  30. void Undo_AddBrushList(brush_t *brushlist);
  31. //end a brush after the operation is performed
  32. void Undo_EndBrush(brush_t *pBrush);
  33. //end a list with brushes after the operation is performed
  34. void Undo_EndBrushList(brush_t *brushlist);
  35. //add entity to undo
  36. void Undo_AddEntity(entity_t *entity);
  37. //end an entity after the operation is performed
  38. void Undo_EndEntity(entity_t *entity);
  39. //undo last operation
  40. void Undo_Undo(void);
  41. //redo last undone operation
  42. void Undo_Redo(void);
  43. //returns true if there is something to be undone available
  44. int Undo_UndoAvailable(void);
  45. //returns true if there is something to redo available
  46. int Undo_RedoAvailable(void);
  47. //clear the undo buffer
  48. void Undo_Clear(void);
  49. //set maximum undo size (default 64)
  50. void Undo_SetMaxSize(int size);
  51. //get maximum undo size
  52. int Undo_GetMaxSize(void);
  53. //set maximum undo memory in bytes (default 2 MB)
  54. void Undo_SetMaxMemorySize(int size);
  55. //get maximum undo memory in bytes
  56. int Undo_GetMaxMemorySize(void);
  57. //returns the amount of memory used by undo
  58. int Undo_MemorySize(void);