Introduce POLYGONHOLE_MODE for creating holes in polygons
[geda-pcb/gde.git] / src / change.h
blob7bae706e129f85364596063ad3df4c4bf5ff25d3
1 /*
2 * COPYRIGHT
4 * PCB, interactive printed circuit board design
5 * Copyright (C) 1994,1995,1996 Thomas Nau
7 * This program 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 * This program 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 this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * Contact addresses for paper mail and Email:
22 * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
23 * Thomas.Nau@rz.uni-ulm.de
25 * RCS: $Id$
28 /* prototypes to change object properties
31 #ifndef __CHANGE_INCLUDED__
32 #define __CHANGE_INCLUDED__
34 #include "global.h"
36 /* ---------------------------------------------------------------------------
37 * some defines
39 #define CHANGENAME_TYPES \
40 (VIA_TYPE | PIN_TYPE | PAD_TYPE | TEXT_TYPE | ELEMENT_TYPE | ELEMENTNAME_TYPE | LINE_TYPE)
42 #define CHANGESIZE_TYPES \
43 (POLYGON_TYPE | VIA_TYPE | PIN_TYPE | PAD_TYPE | LINE_TYPE | \
44 ARC_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ELEMENT_TYPE)
46 #define CHANGE2NDSIZE_TYPES \
47 (VIA_TYPE | PIN_TYPE | ELEMENT_TYPE)
49 /* We include polygons here only to inform the user not to do it that way. */
50 #define CHANGECLEARSIZE_TYPES \
51 (PIN_TYPE | PAD_TYPE | VIA_TYPE | LINE_TYPE | ARC_TYPE | POLYGON_TYPE)
53 #define CHANGESQUARE_TYPES \
54 (ELEMENT_TYPE | PIN_TYPE | PAD_TYPE)
56 #define CHANGEOCTAGON_TYPES \
57 (ELEMENT_TYPE | PIN_TYPE | VIA_TYPE)
59 #define CHANGEJOIN_TYPES \
60 (ARC_TYPE | LINE_TYPE | TEXT_TYPE)
62 #define CHANGETHERMAL_TYPES \
63 (PIN_TYPE | VIA_TYPE)
65 #define CHANGEMASKSIZE_TYPES \
66 (PIN_TYPE | VIA_TYPE | PAD_TYPE)
68 bool ChangeLayoutName (char *);
69 bool ChangeLayerName (LayerTypePtr, char *);
70 bool ChangeSelectedSize (int, LocationType, bool);
71 bool ChangeSelectedClearSize (int, LocationType, bool);
72 bool ChangeSelected2ndSize (int, LocationType, bool);
73 bool ChangeSelectedMaskSize (int, LocationType, bool);
74 bool ChangeSelectedJoin (int);
75 bool SetSelectedJoin (int);
76 bool ClrSelectedJoin (int);
77 bool ChangeSelectedSquare (int);
78 bool SetSelectedSquare (int);
79 bool ClrSelectedSquare (int);
80 bool ChangeSelectedThermals (int, int);
81 bool ChangeSelectedHole (void);
82 bool ChangeSelectedPaste (void);
83 bool ChangeSelectedOctagon (int);
84 bool SetSelectedOctagon (int);
85 bool ClrSelectedOctagon (int);
86 bool ChangeSelectedElementSide (void);
87 bool ChangeElementSide (ElementTypePtr, LocationType);
88 bool ChangeHole (PinTypePtr);
89 bool ChangePaste (PadTypePtr);
90 bool ChangeObjectSize (int, void *, void *, void *, LocationType, bool);
91 bool ChangeObjectThermal (int, void *, void *, void *, int);
92 bool ChangeObjectClearSize (int, void *, void *, void *, LocationType,
93 bool);
94 bool ChangeObject2ndSize (int, void *, void *, void *, LocationType,
95 bool, bool);
96 bool ChangeObjectMaskSize (int, void *, void *, void *, LocationType,
97 bool);
98 bool ChangeObjectJoin (int, void *, void *, void *);
99 bool SetObjectJoin (int, void *, void *, void *);
100 bool ClrObjectJoin (int, void *, void *, void *);
101 bool ChangeObjectSquare (int, void *, void *, void *);
102 bool SetObjectSquare (int, void *, void *, void *);
103 bool ClrObjectSquare (int, void *, void *, void *);
104 bool ChangeObjectOctagon (int, void *, void *, void *);
105 bool SetObjectOctagon (int, void *, void *, void *);
106 bool ClrObjectOctagon (int, void *, void *, void *);
107 void *ChangeObjectName (int, void *, void *, void *, char *);
108 void *QueryInputAndChangeObjectName (int, void *, void *, void *);
109 void ChangePCBSize (BDimension, BDimension);
111 /* Change the specified text on an element, either on the board (give
112 PCB, PCB->Data) or in a buffer (give NULL, Buffer->Data). The old
113 string is returned, and must be properly freed by the caller. */
114 char *ChangeElementText (PCBType *pcb, DataType *data, ElementTypePtr Element,
115 int which, char *new_name);
117 #endif