(no commit message)
[geda-pcb/pcjc2.git] / src / change.h
blobf42842aafca6b18d47a580204bfbe0a6d548914a
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
27 /* prototypes to change object properties
30 #ifndef PCB_CHANGE_H
31 #define PCB_CHANGE_H
33 #include "global.h"
35 /* ---------------------------------------------------------------------------
36 * some defines
38 #define CHANGENAME_TYPES \
39 (VIA_TYPE | PIN_TYPE | PAD_TYPE | TEXT_TYPE | ELEMENT_TYPE | ELEMENTNAME_TYPE | LINE_TYPE)
41 #define CHANGESIZE_TYPES \
42 (POLYGON_TYPE | VIA_TYPE | PIN_TYPE | PAD_TYPE | LINE_TYPE | \
43 ARC_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ELEMENT_TYPE)
45 #define CHANGE2NDSIZE_TYPES \
46 (VIA_TYPE | PIN_TYPE | ELEMENT_TYPE)
48 /* We include polygons here only to inform the user not to do it that way. */
49 #define CHANGECLEARSIZE_TYPES \
50 (PIN_TYPE | PAD_TYPE | VIA_TYPE | LINE_TYPE | ARC_TYPE | POLYGON_TYPE)
52 #define CHANGESQUARE_TYPES \
53 (ELEMENT_TYPE | PIN_TYPE | PAD_TYPE)
55 #define CHANGEOCTAGON_TYPES \
56 (ELEMENT_TYPE | PIN_TYPE | VIA_TYPE)
58 #define CHANGEJOIN_TYPES \
59 (ARC_TYPE | LINE_TYPE | TEXT_TYPE)
61 #define CHANGETHERMAL_TYPES \
62 (PIN_TYPE | VIA_TYPE)
64 #define CHANGEMASKSIZE_TYPES \
65 (PIN_TYPE | VIA_TYPE | PAD_TYPE)
67 bool ChangeLayoutName (char *);
68 bool ChangeLayerName (LayerType *, char *);
69 bool ChangeSelectedSize (int, Coord, bool);
70 bool ChangeSelectedClearSize (int, Coord, bool);
71 bool ChangeSelected2ndSize (int, Coord, bool);
72 bool ChangeSelectedMaskSize (int, Coord, bool);
73 bool ChangeSelectedJoin (int);
74 bool SetSelectedJoin (int);
75 bool ClrSelectedJoin (int);
76 bool ChangeSelectedSquare (int);
77 bool SetSelectedSquare (int);
78 bool ClrSelectedSquare (int);
79 bool ChangeSelectedThermals (int, int);
80 bool ChangeSelectedHole (void);
81 bool ChangeSelectedPaste (void);
82 bool ChangeSelectedOctagon (int);
83 bool SetSelectedOctagon (int);
84 bool ClrSelectedOctagon (int);
85 bool ChangeSelectedElementSide (void);
86 bool ChangeElementSide (ElementType *, Coord);
87 bool ChangeHole (PinType *);
88 bool ChangePaste (PadType *);
89 bool ChangeObjectSize (int, void *, void *, void *, Coord, bool);
90 bool ChangeObjectThermal (int, void *, void *, void *, int);
91 bool ChangeObjectClearSize (int, void *, void *, void *, Coord,
92 bool);
93 bool ChangeObject2ndSize (int, void *, void *, void *, Coord,
94 bool, bool);
95 bool ChangeObjectMaskSize (int, void *, void *, void *, Coord,
96 bool);
97 bool ChangeObjectJoin (int, void *, void *, void *);
98 bool SetObjectJoin (int, void *, void *, void *);
99 bool ClrObjectJoin (int, void *, void *, void *);
100 bool ChangeObjectSquare (int, void *, void *, void *);
101 bool SetObjectSquare (int, void *, void *, void *);
102 bool ClrObjectSquare (int, void *, void *, void *);
103 bool ChangeObjectOctagon (int, void *, void *, void *);
104 bool SetObjectOctagon (int, void *, void *, void *);
105 bool ClrObjectOctagon (int, void *, void *, void *);
106 void *ChangeObjectName (int, void *, void *, void *, char *);
107 void *QueryInputAndChangeObjectName (int, void *, void *, void *);
108 void ChangePCBSize (Coord, Coord);
110 /* Change the specified text on an element, either on the board (give
111 PCB, PCB->Data) or in a buffer (give NULL, Buffer->Data). The old
112 string is returned, and must be properly freed by the caller. */
113 char *ChangeElementText (PCBType *pcb, DataType *data, ElementType *Element,
114 int which, char *new_name);
116 #endif