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