1 /*! 2 * \file src/undo.h 3 * 4 * \brief Prototypes for undo routines. 5 * 6 * <hr> 7 * 8 * <h1><b>Copyright.</b></h1>\n 9 * 10 * PCB, interactive printed circuit board design 11 * 12 * Copyright (C) 1994,1995,1996 Thomas Nau 13 * 14 * This program is free software; you can redistribute it and/or modify 15 * it under the terms of the GNU General Public License as published by 16 * the Free Software Foundation; either version 2 of the License, or 17 * (at your option) any later version. 18 * 19 * This program is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU General Public License for more details. 23 * 24 * You should have received a copy of the GNU General Public License along 25 * with this program; if not, write to the Free Software Foundation, Inc., 26 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 27 * 28 * Contact addresses for paper mail and Email: 29 * 30 * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany 31 * 32 * Thomas.Nau@rz.uni-ulm.de 33 */ 34 35 #ifndef PCB_UNDO_H 36 #define PCB_UNDO_H 37 38 #include "global.h" 39 40 #define DRAW_FLAGS (RATFLAG | SELECTEDFLAG | SQUAREFLAG | \ 41 HIDENAMEFLAG | HOLEFLAG | OCTAGONFLAG | \ 42 CONNECTEDFLAG | FOUNDFLAG | CLEARLINEFLAG) 43 44 /* different layers */ 45 46 int Undo (bool); 47 int Redo (bool); 48 int IncrementUndoSerialNumber (void); 49 int SaveUndoSerialNumber (void); 50 int RestoreUndoSerialNumber (void); 51 int MergeUndoSerialRange (int, int); 52 void ClearUndoList (bool); 53 void MoveObjectToRemoveUndoList (int, void *, void *, void *); 54 void AddObjectToRemovePointUndoList (int, void *, void *, Cardinal); 55 void AddObjectToInsertPointUndoList (int, void *, void *, void *); 56 void AddObjectToRemoveContourUndoList (int, LayerType *, PolygonType *); 57 void AddObjectToInsertContourUndoList (int, LayerType *, PolygonType *); 58 void AddObjectToMoveUndoList (int, void *, void *, void *, 59 Coord, Coord); 60 void AddObjectToChangeNameUndoList (int, void *, void *, void *, char *); 61 void AddObjectToRotateUndoList (int, void *, void *, void *, 62 Coord, Coord, BYTE); 63 void AddObjectToCreateUndoList (int, void *, void *, void *); 64 void AddObjectToMirrorUndoList (int, void *, void *, void *, Coord); 65 void AddObjectToMoveToLayerUndoList (int, void *, void *, void *); 66 void AddObjectToFlagUndoList (int, void *, void *, void *); 67 void AddObjectToSizeUndoList (int, void *, void *, void *); 68 void AddObjectTo2ndSizeUndoList (int, void *, void *, void *); 69 void AddObjectToClearSizeUndoList (int, void *, void *, void *); 70 void AddObjectToMaskSizeUndoList (int, void *, void *, void *); 71 void AddObjectToChangeAnglesUndoList (int, void *, void *, void *); 72 void AddObjectToClearPolyUndoList (int, void *, void *, void *, bool); 73 void AddObjectToSetViaLayersUndoList (void *ptr1, void *ptr2, void *ptr3); 74 void AddLayerChangeToUndoList (int, int); 75 void AddNetlistLibToUndoList (LibraryType *); 76 void LockUndo (void); 77 void UnlockUndo (void); 78 bool Undoing (void); 79 80 #endif 81