2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 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.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 // QERadiant Multilevel Undo/Redo
29 void Undo_Start( const char *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 );
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 (bSilent == true -> will not print the "undone blah blah message")
45 void Undo_Undo( boolean bSilent = false );
46 //redo last undone operation
47 void Undo_Redo( void );
48 //get the undo Id of the next undo (0 if none available)
49 int Undo_GetUndoId( void );
50 //returns true if there is something to be undone available
51 int Undo_UndoAvailable( void );
52 //returns true if there is something to redo available
53 int Undo_RedoAvailable( void );
54 //clear the undo buffer
55 void Undo_Clear( void );
56 //set maximum undo size (default 64)
57 void Undo_SetMaxSize( int size );
58 //get maximum undo size
59 int Undo_GetMaxSize( void );
60 //set maximum undo memory in bytes (default 2 MB)
61 void Undo_SetMaxMemorySize( int size );
62 //get maximum undo memory in bytes
63 int Undo_GetMaxMemorySize( void );
64 //returns the amount of memory used by undo
65 int Undo_MemorySize( void );