pcb 4.1.1
An interactive printed circuit board layout editor.
|
Prototypes to change object properties. More...
#include "global.h"
Go to the source code of this file.
Defines | |
#define | CHANGENAME_TYPES (VIA_TYPE | PIN_TYPE | PAD_TYPE | TEXT_TYPE | ELEMENT_TYPE | ELEMENTNAME_TYPE | LINE_TYPE) |
#define | CHANGESIZE_TYPES |
#define | CHANGE2NDSIZE_TYPES (VIA_TYPE | PIN_TYPE | ELEMENT_TYPE) |
#define | CHANGECLEARSIZE_TYPES (PIN_TYPE | PAD_TYPE | VIA_TYPE | LINE_TYPE | ARC_TYPE | POLYGON_TYPE) |
#define | CHANGESQUARE_TYPES (ELEMENT_TYPE | PIN_TYPE | PAD_TYPE) |
#define | CHANGEOCTAGON_TYPES (ELEMENT_TYPE | PIN_TYPE | VIA_TYPE) |
#define | CHANGEJOIN_TYPES (ARC_TYPE | LINE_TYPE | TEXT_TYPE) |
#define | CHANGETHERMAL_TYPES (PIN_TYPE | VIA_TYPE) |
#define | CHANGEMASKSIZE_TYPES (PIN_TYPE | VIA_TYPE | PAD_TYPE) |
Functions | |
bool | ChangeLayoutName (char *) |
Changes the name of a layout; memory has to be already allocated. | |
bool | ChangeLayerName (LayerType *, char *) |
Changes the name of a layer; memory has to be already allocated. | |
bool | ChangeSelectedSize (int, Coord, bool) |
Changes the size of all selected and visible object types. | |
bool | ChangeSelectedClearSize (int, Coord, bool) |
Changes the clearance size of all selected and visible objects. | |
bool | ChangeSelected2ndSize (int, Coord, bool) |
Changes the 2nd size (drilling hole) of all selected and visible objects. | |
bool | ChangeSelectedMaskSize (int, Coord, bool) |
bool | ChangeSelectedJoin (int) |
Changes the clearance flag (join) of all selected and visible lines and/or arcs. | |
bool | SetSelectedJoin (int) |
Changes the clearance flag (join) of all selected and visible lines and/or arcs. | |
bool | ClrSelectedJoin (int) |
Changes the clearance flag (join) of all selected and visible lines and/or arcs. | |
bool | ChangeSelectedSquare (int) |
Changes the square-flag of all selected and visible pins or pads. | |
bool | SetSelectedSquare (int) |
Sets the square-flag of all selected and visible pins or pads. | |
bool | ClrSelectedSquare (int) |
Clears the square-flag of all selected and visible pins or pads. | |
bool | ChangeSelectedThermals (int, int) |
Changes the thermals on all selected and visible pins and/or vias. | |
bool | ChangeSelectedViaLayers (int, int) |
Changes the thermals on all selected and visible pins and/or vias. | |
bool | ChangeSelectedHole (void) |
Changes the hole-flag of all selected and visible vias. | |
bool | ChangeSelectedPaste (void) |
Changes the no paste-flag of all selected and visible pads. | |
bool | ChangeSelectedOctagon (int) |
Changes the octagon-flag of all selected and visible pins and vias. | |
bool | SetSelectedOctagon (int) |
Sets the octagon-flag of all selected and visible pins and vias. | |
bool | ClrSelectedOctagon (int) |
Clears the octagon-flag of all selected and visible pins and vias. | |
bool | ChangeSelectedElementSide (void) |
Changes the side of all selected and visible elements. | |
bool | ChangeElementSide (ElementType *, Coord) |
Changes the side of the board an element is on. | |
bool | ChangeHole (PinType *) |
Changes the hole flag of a via. | |
bool | ChangePaste (PadType *) |
Changes the nopaste flag of a pad. | |
bool | ChangeObjectSize (int, void *, void *, void *, Coord, bool) |
Changes the size of the passed object. | |
bool | ChangeObjectThermal (int, void *, void *, void *, int) |
Changes the thermal of the passed object. | |
bool | ChangeObjectViaLayers (void *, void *, void *, int, int) |
Changes the thermal of the passed object. | |
bool | ChangeObjectClearSize (int, void *, void *, void *, Coord, bool) |
Changes the clearance size of the passed object. | |
bool | ChangeObject2ndSize (int, void *, void *, void *, Coord, bool, bool) |
Changes the 2nd size of the passed object. | |
bool | ChangeObjectMaskSize (int, void *, void *, void *, Coord, bool) |
Changes the mask size of the passed object. | |
bool | ChangeObjectJoin (int, void *, void *, void *) |
Changes the clearance-flag of the passed object. | |
bool | SetObjectJoin (int, void *, void *, void *) |
Sets the clearance-flag of the passed object. | |
bool | ClrObjectJoin (int, void *, void *, void *) |
Clears the clearance-flag of the passed object. | |
bool | ChangeObjectSquare (int, void *, void *, void *) |
Changes the square-flag of the passed object. | |
bool | SetObjectSquare (int, void *, void *, void *) |
Sets the square-flag of the passed object. | |
bool | ClrObjectSquare (int, void *, void *, void *) |
Clears the square-flag of the passed object. | |
bool | ChangeObjectOctagon (int, void *, void *, void *) |
Changes the octagon-flag of the passed object. | |
bool | SetObjectOctagon (int, void *, void *, void *) |
Sets the octagon-flag of the passed object. | |
bool | ClrObjectOctagon (int, void *, void *, void *) |
Clears the octagon-flag of the passed object. | |
void * | ChangeObjectName (int, void *, void *, void *, char *) |
Changes the name of the passed object. | |
void * | QueryInputAndChangeObjectName (int, void *, void *, void *) |
void | ChangePCBSize (Coord, Coord) |
Changes the maximum size of a layout, adjusts the scrollbars, releases the saved pixmap if necessary and adjusts the cursor confinement box. | |
char * | ChangeElementText (PCBType *pcb, DataType *data, ElementType *Element, int which, char *new_name) |
Changes the layout-name of an element. |
Prototypes to change object properties.
PCB, interactive printed circuit board design
Copyright (C) 1994,1995,1996 Thomas Nau
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Contact addresses for paper mail and Email: Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany Thomas.Nau@rz.uni-ulm.de
Definition in file change.h.
#define CHANGE2NDSIZE_TYPES (VIA_TYPE | PIN_TYPE | ELEMENT_TYPE) |
Definition at line 48 of file change.h.
Referenced by ActionChange2ndSize().
#define CHANGECLEARSIZE_TYPES (PIN_TYPE | PAD_TYPE | VIA_TYPE | LINE_TYPE | ARC_TYPE | POLYGON_TYPE) |
Definition at line 52 of file change.h.
Referenced by ActionChangeClearSize().
#define CHANGEJOIN_TYPES (ARC_TYPE | LINE_TYPE | TEXT_TYPE) |
Definition at line 61 of file change.h.
Referenced by ActionChangeJoin().
#define CHANGEMASKSIZE_TYPES (PIN_TYPE | VIA_TYPE | PAD_TYPE) |
#define CHANGENAME_TYPES (VIA_TYPE | PIN_TYPE | PAD_TYPE | TEXT_TYPE | ELEMENT_TYPE | ELEMENTNAME_TYPE | LINE_TYPE) |
Definition at line 41 of file change.h.
Referenced by ActionChangeName().
#define CHANGEOCTAGON_TYPES (ELEMENT_TYPE | PIN_TYPE | VIA_TYPE) |
Definition at line 58 of file change.h.
Referenced by ActionChangeOctagon(), ActionClearOctagon(), and ActionSetOctagon().
#define CHANGESIZE_TYPES |
(POLYGON_TYPE | VIA_TYPE | PIN_TYPE | PAD_TYPE | LINE_TYPE | \ ARC_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ELEMENT_TYPE)
Definition at line 44 of file change.h.
Referenced by ActionChangeSize(), and ChangeFlag().
#define CHANGESQUARE_TYPES (ELEMENT_TYPE | PIN_TYPE | PAD_TYPE) |
Definition at line 55 of file change.h.
Referenced by ActionChangeSquare(), ActionClearSquare(), and ActionSetSquare().
#define CHANGETHERMAL_TYPES (PIN_TYPE | VIA_TYPE) |
Definition at line 64 of file change.h.
Referenced by ActionSetThermal().
bool ChangeElementSide | ( | ElementType * | Element, |
Coord | yoff | ||
) |
Changes the side of the board an element is on.
Definition at line 1130 of file change.c.
References AddObjectToMirrorUndoList(), PCBType::Data, DrawElement(), EraseElement(), MirrorElementCoordinates(), PCB, and TEST_FLAG.
Referenced by ActionFlip(), and ChangeSelectedElementSide().
char* ChangeElementText | ( | PCBType * | pcb, |
DataType * | data, | ||
ElementType * | Element, | ||
int | which, | ||
char * | new_name | ||
) |
Changes the layout-name of an element.
Change the specified text on an element, either on the board (give PCB, PCB->Data) or in a buffer (give NULL, Buffer->Data).
Definition at line 1039 of file change.c.
References DrawElementName(), EraseElementName(), PCBType::Font, ElementType::Name, NAME_INDEX, DataType::name_tree, PCB, r_delete_entry(), r_insert_entry(), SetTextBoundingBox(), and TextType::TextString.
Referenced by ActionElementList(), and ChangeElementName().
bool ChangeHole | ( | PinType * | ) |
Changes the hole flag of a via.
Definition at line 1601 of file change.c.
References AddObjectToFlagUndoList(), AddObjectToMaskSizeUndoList(), ClearFromPolygon(), PCBType::Data, Draw(), DrawVia(), EraseVia(), PCB, r_delete_entry(), r_insert_entry(), RestoreToPolygon(), SetPinBoundingBox(), TEST_FLAG, TOGGLE_FLAG, and DataType::via_tree.
Referenced by ActionChangeHole(), and ChangeSelectedHole().
bool ChangeLayerName | ( | LayerType * | , |
char * | |||
) |
Changes the name of a layer; memory has to be already allocated.
Definition at line 1146 of file change.c.
References CURRENT, and hid_action().
Referenced by ActionChangeName().
bool ChangeLayoutName | ( | char * | ) |
Changes the name of a layout; memory has to be already allocated.
Definition at line 1116 of file change.c.
References hid_action(), PCBType::Name, and PCB.
Referenced by ActionChangeName().
bool ChangeObject2ndSize | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3, | ||
Coord | Difference, | ||
bool | fixIt, | ||
bool | incundo | ||
) |
Changes the 2nd size of the passed object.
Definition at line 2232 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionChange2ndSize(), and apply_vendor_map().
bool ChangeObjectClearSize | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3, | ||
Coord | Difference, | ||
bool | fixIt | ||
) |
Changes the clearance size of the passed object.
Definition at line 2116 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), ObjectOperation(), PCB, and TEST_FLAG.
Referenced by ActionChangeClearSize(), and ActionMinClearGap().
bool ChangeObjectJoin | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Changes the clearance-flag of the passed object.
Definition at line 2302 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionChangeJoin().
bool ChangeObjectMaskSize | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3, | ||
Coord | Difference, | ||
bool | fixIt | ||
) |
Changes the mask size of the passed object.
Definition at line 2258 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionMinMaskGap().
void* ChangeObjectName | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3, | ||
char * | Name | ||
) |
Changes the name of the passed object.
Definition at line 2286 of file change.c.
References Draw(), NewName, and ObjectOperation().
Referenced by ActionRenumber(), QueryInputAndChangeObjectName(), renumber_block(), renumber_buffer(), and UndoChangeName().
bool ChangeObjectOctagon | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Changes the octagon-flag of the passed object.
Definition at line 2405 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionChangeOctagon().
bool ChangeObjectSize | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3, | ||
Coord | Difference, | ||
bool | fixIt | ||
) |
Changes the size of the passed object.
Definition at line 2092 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionChangeSize().
bool ChangeObjectSquare | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Changes the square-flag of the passed object.
Definition at line 2353 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionChangeSquare().
bool ChangeObjectThermal | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3, | ||
int | therm_type | ||
) |
Changes the thermal of the passed object.
Definition at line 2147 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionSetThermal(), and NotifyMode().
bool ChangeObjectViaLayers | ( | void * | Ptr1, |
void * | Ptr2, | ||
void * | Ptr3, | ||
int | from, | ||
int | to | ||
) |
Changes the thermal of the passed object.
Definition at line 2171 of file change.c.
References AddObjectToSetViaLayersUndoList(), pin_st::BuriedFrom, pin_st::BuriedTo, ClearFromPolygon(), PCBType::Data, Draw(), DrawVia(), GetMaxBottomLayer(), IncrementUndoSerialNumber(), DataType::Layer, max_copper_layer, PCB, RestoreToPolygon(), SanitizeBuriedVia(), TEST_FLAG, and VIA_IS_BURIED.
Referenced by ActionSetViaLayers().
bool ChangePaste | ( | PadType * | ) |
Changes the nopaste flag of a pad.
Definition at line 1644 of file change.c.
References AddObjectToFlagUndoList(), Draw(), DrawPad(), ErasePad(), TEST_FLAG, and TOGGLE_FLAG.
Referenced by ActionChangePaste(), and ChangeSelectedPaste().
Changes the maximum size of a layout, adjusts the scrollbars, releases the saved pixmap if necessary and adjusts the cursor confinement box.
Definition at line 2524 of file change.c.
References hid_action(), PCBType::MaxHeight, PCBType::MaxWidth, and PCB.
Referenced by config_sizes_apply(), and real_load_pcb().
bool ChangeSelected2ndSize | ( | int | types, |
Coord | Difference, | ||
bool | fixIt | ||
) |
Changes the 2nd size (drilling hole) of all selected and visible objects.
Definition at line 1841 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionChange2ndSize().
bool ChangeSelectedClearSize | ( | int | types, |
Coord | Difference, | ||
bool | fixIt | ||
) |
Changes the clearance size of all selected and visible objects.
Definition at line 1815 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), PCB, SelectedOperation(), and TEST_FLAG.
Referenced by ActionChangeClearSize().
bool ChangeSelectedElementSide | ( | void | ) |
Changes the side of all selected and visible elements.
Definition at line 1678 of file change.c.
References ChangeElementSide(), PCBType::Data, Draw(), ELEMENT_LOOP, PCBType::ElementOn, END_LOOP, IncrementUndoSerialNumber(), PCB, PCBType::PinOn, and TEST_FLAG.
Referenced by ActionFlip().
bool ChangeSelectedHole | ( | void | ) |
Changes the hole-flag of all selected and visible vias.
Definition at line 2042 of file change.c.
References ChangeHole(), PCBType::Data, Draw(), END_LOOP, IncrementUndoSerialNumber(), PCB, TEST_FLAG, VIA_LOOP, and PCBType::ViaOn.
Referenced by ActionChangeHole().
bool ChangeSelectedJoin | ( | int | types | ) |
Changes the clearance flag (join) of all selected and visible lines and/or arcs.
Definition at line 1864 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionChangeJoin().
bool ChangeSelectedMaskSize | ( | int | , |
Coord | , | ||
bool | |||
) |
bool ChangeSelectedOctagon | ( | int | types | ) |
Changes the octagon-flag of all selected and visible pins and vias.
Definition at line 1983 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionChangeOctagon().
bool ChangeSelectedPaste | ( | void | ) |
Changes the no paste-flag of all selected and visible pads.
Definition at line 2067 of file change.c.
References ALLPAD_LOOP, ChangePaste(), PCBType::Data, Draw(), ENDALL_LOOP, IncrementUndoSerialNumber(), PCB, and TEST_FLAG.
Referenced by ActionChangePaste().
bool ChangeSelectedSize | ( | int | types, |
Coord | Difference, | ||
bool | fixIt | ||
) |
Changes the size of all selected and visible object types.
Definition at line 1792 of file change.c.
References Absolute, Delta, Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionChangeSize().
bool ChangeSelectedSquare | ( | int | types | ) |
Changes the square-flag of all selected and visible pins or pads.
Definition at line 1924 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionChangeSquare().
bool ChangeSelectedThermals | ( | int | types, |
int | therm_style | ||
) |
Changes the thermals on all selected and visible pins and/or vias.
Definition at line 1707 of file change.c.
References Delta, Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionSetThermal().
bool ChangeSelectedViaLayers | ( | int | from, |
int | to | ||
) |
Changes the thermals on all selected and visible pins and/or vias.
Definition at line 1729 of file change.c.
References AddObjectToSetViaLayersUndoList(), ClearFromPolygon(), PCBType::Data, Draw(), DrawVia(), END_LOOP, GetMaxBottomLayer(), IncrementUndoSerialNumber(), DataType::Layer, max_copper_layer, PCB, RestoreToPolygon(), SanitizeBuriedVia(), TEST_FLAG, VIA_IS_BURIED, and VIA_LOOP.
Referenced by ActionSetViaLayers().
bool ClrObjectJoin | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Clears the clearance-flag of the passed object.
Definition at line 2336 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ChangeFlag().
bool ClrObjectOctagon | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Clears the octagon-flag of the passed object.
Definition at line 2440 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionClearOctagon(), and ChangeFlag().
bool ClrObjectSquare | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Clears the square-flag of the passed object.
Definition at line 2388 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionClearSquare(), and ChangeFlag().
bool ClrSelectedJoin | ( | int | types | ) |
Changes the clearance flag (join) of all selected and visible lines and/or arcs.
Definition at line 1904 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ChangeFlag().
bool ClrSelectedOctagon | ( | int | types | ) |
Clears the octagon-flag of all selected and visible pins and vias.
Definition at line 2023 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionClearOctagon(), and ChangeFlag().
bool ClrSelectedSquare | ( | int | types | ) |
Clears the square-flag of all selected and visible pins or pads.
Definition at line 1963 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionClearSquare(), and ChangeFlag().
void* QueryInputAndChangeObjectName | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Queries the user for a new object name and changes it.
Definition at line 2458 of file change.c.
References _, AddObjectToChangeNameUndoList(), ChangeObjectName(), Draw(), ELEMENT_NAME, EMPTY, gui, IncrementUndoSerialNumber(), Number, PCB, and hid_st::prompt_for.
Referenced by ActionChangeName().
bool SetObjectJoin | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Sets the clearance-flag of the passed object.
Definition at line 2319 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ChangeFlag().
bool SetObjectOctagon | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Sets the octagon-flag of the passed object.
Definition at line 2423 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionSetOctagon(), and ChangeFlag().
bool SetObjectSquare | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Sets the square-flag of the passed object.
Definition at line 2371 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and ObjectOperation().
Referenced by ActionSetSquare(), and ChangeFlag().
bool SetSelectedJoin | ( | int | types | ) |
Changes the clearance flag (join) of all selected and visible lines and/or arcs.
Definition at line 1884 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ChangeFlag().
bool SetSelectedOctagon | ( | int | types | ) |
Sets the octagon-flag of all selected and visible pins and vias.
Definition at line 2003 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionSetOctagon(), and ChangeFlag().
bool SetSelectedSquare | ( | int | types | ) |
Sets the square-flag of all selected and visible pins or pads.
Definition at line 1943 of file change.c.
References Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionSetSquare(), and ChangeFlag().