pcb 4.1.1
An interactive printed circuit board layout editor.
|
Prototypes for move routines. More...
#include "global.h"
Go to the source code of this file.
Defines | |
#define | MOVE(xs, ys, deltax, deltay) |
#define | MOVE_BOX_LOWLEVEL(b, dx, dy) |
#define | MOVE_VIA_LOWLEVEL(v, dx, dy) |
#define | MOVE_PIN_LOWLEVEL(p, dx, dy) |
#define | MOVE_ARC_LOWLEVEL(a, dx, dy) |
#define | MOVE_LINE_LOWLEVEL(l, dx, dy) |
#define | MOVE_PAD_LOWLEVEL(p, dx, dy) |
#define | MOVE_TEXT_LOWLEVEL(t, dx, dy) |
#define | MOVE_TYPES |
#define | MOVETOLAYER_TYPES (LINE_TYPE | TEXT_TYPE | POLYGON_TYPE | RATLINE_TYPE | ARC_TYPE) |
Functions | |
void | MovePolygonLowLevel (PolygonType *, Coord, Coord) |
Low level routine to move a polygon. | |
void | MoveElementLowLevel (DataType *, ElementType *, Coord, Coord) |
Moves a element by +-X and +-Y. | |
void * | MoveObject (int, void *, void *, void *, Coord, Coord) |
Moves the object identified by its data pointers and the type not we don't bump the undo serial number. | |
void * | MoveObjectToLayer (int, void *, void *, void *, LayerType *, bool) |
Moves the object identified by its data pointers and the type to a new layer without changing it's position. | |
void * | MoveObjectAndRubberband (int, void *, void *, void *, Coord, Coord) |
Moves the object identified by its data pointers and the type as well as all attached rubberband lines. | |
bool | MoveSelectedObjectsToLayer (LayerType *) |
Moves the selected objects to a new layer without changing their positions. | |
int | MoveLayer (int old_index, int new_index) |
Moves the selected layers to a new index in the layer list. |
Prototypes for move routines.
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
Definition in file move.h.
#define MOVE | ( | xs, | |
ys, | |||
deltax, | |||
deltay | |||
) |
{ \ ((xs) += (deltax)); \ ((ys) += (deltay)); \ }
Definition at line 43 of file move.h.
Referenced by MoveElementLowLevel(), MoveLinePoint(), MovePolygonLowLevel(), and MovePolygonPoint().
#define MOVE_ARC_LOWLEVEL | ( | a, | |
dx, | |||
dy | |||
) |
{ \ MOVE((a)->X,(a)->Y,(dx),(dy)) \ MOVE_BOX_LOWLEVEL(&((a)->BoundingBox),(dx),(dy)); \ MOVE((a)->Point1.X,(a)->Point1.Y,(dx),(dy)) \ MOVE((a)->Point2.X,(a)->Point2.Y,(dx),(dy)) \ }
Definition at line 64 of file move.h.
Referenced by MoveArc(), and MoveElementLowLevel().
#define MOVE_BOX_LOWLEVEL | ( | b, | |
dx, | |||
dy | |||
) |
Definition at line 48 of file move.h.
Referenced by MoveElementLowLevel(), and MovePolygonLowLevel().
#define MOVE_LINE_LOWLEVEL | ( | l, | |
dx, | |||
dy | |||
) |
{ \ MOVE((l)->Point1.X,(l)->Point1.Y,(dx),(dy)) \ MOVE((l)->Point2.X,(l)->Point2.Y,(dx),(dy)) \ SetLineBoundingBox ((l)); \ }
Definition at line 74 of file move.h.
Referenced by MoveElementLowLevel(), MoveLine(), and SetFontInfo().
#define MOVE_PAD_LOWLEVEL | ( | p, | |
dx, | |||
dy | |||
) |
{ \ MOVE((p)->Point1.X,(p)->Point1.Y,(dx),(dy)) \ MOVE((p)->Point2.X,(p)->Point2.Y,(dx),(dy)) \ SetPadBoundingBox ((p)); \ }
Definition at line 80 of file move.h.
Referenced by MoveElementLowLevel().
#define MOVE_PIN_LOWLEVEL | ( | p, | |
dx, | |||
dy | |||
) |
{ \ MOVE((p)->X,(p)->Y,(dx),(dy)) \ MOVE_BOX_LOWLEVEL(&((p)->BoundingBox),(dx),(dy)); \ }
Definition at line 58 of file move.h.
Referenced by MoveElementLowLevel().
#define MOVE_TEXT_LOWLEVEL | ( | t, | |
dx, | |||
dy | |||
) |
{ \ MOVE_BOX_LOWLEVEL(&((t)->BoundingBox),(dx),(dy)); \ MOVE((t)->X, (t)->Y, (dx), (dy)); \ }
Definition at line 86 of file move.h.
Referenced by MoveElementLowLevel(), MoveElementName(), and MoveText().
#define MOVE_TYPES |
(VIA_TYPE | LINE_TYPE | TEXT_TYPE | ELEMENT_TYPE | ELEMENTNAME_TYPE | \ POLYGON_TYPE | POLYGONPOINT_TYPE | LINEPOINT_TYPE | ARC_TYPE)
Definition at line 92 of file move.h.
Referenced by ActionMoveObject(), and NotifyMode().
#define MOVE_VIA_LOWLEVEL | ( | v, | |
dx, | |||
dy | |||
) |
#define MOVETOLAYER_TYPES (LINE_TYPE | TEXT_TYPE | POLYGON_TYPE | RATLINE_TYPE | ARC_TYPE) |
Definition at line 95 of file move.h.
Referenced by ActionMoveToCurrentLayer().
void MoveElementLowLevel | ( | DataType * | , |
ElementType * | , | ||
Coord | , | ||
Coord | |||
) |
Moves a element by +-X and +-Y.
Definition at line 112 of file move.c.
References ARC_LOOP, ClearFromPolygon(), PCBType::Data, DataType::element_tree, ELEMENTLINE_LOOP, ELEMENTTEXT_LOOP, END_LOOP, line, MOVE, MOVE_ARC_LOWLEVEL, MOVE_BOX_LOWLEVEL, MOVE_LINE_LOWLEVEL, MOVE_PAD_LOWLEVEL, MOVE_PIN_LOWLEVEL, MOVE_TEXT_LOWLEVEL, n, DataType::name_tree, PAD_LOOP, DataType::pad_tree, PCB, pin, PIN_LOOP, DataType::pin_tree, r_delete_entry(), r_insert_entry(), and RestoreToPolygon().
Referenced by ActionDisperseElements(), doPerturb(), MoveElement(), pinout_set_data(), place(), and relocate().
int MoveLayer | ( | int | old_index, |
int | new_index | ||
) |
Moves the selected layers to a new index in the layer list.
index is 0..MAX_ALL_LAYER-1. If old_index is -1, a new layer is inserted at that index. If new_index is -1, the specified layer is deleted.
Definition at line 943 of file move.c.
References AddLayerChangeToUndoList(), BOTTOM_SIDE, ChangeBuriedViasAfterLayerCreate(), ChangeBuriedViasAfterLayerDelete(), ChangeBuriedViasAfterLayerMove(), LayerType::Color, hid_st::confirm_dialog, PCBType::Data, LayerGroupType::Entries, gui, hid_action(), IncrementUndoSerialNumber(), hid_st::invalidate_all, LastNormalLayerInSideGroup(), DataType::Layer, SettingType::LayerColor, PCBType::LayerGroups, SettingType::LayerSelectedColor, LayerStack, MAX_ALL_LAYER, max_copper_layer, Message(), move_all_thermals(), LayerType::Name, LayerGroupType::Number, LayerType::On, PCB, LayerType::SelectedColor, Settings, SILK_LAYER, TOP_SIDE, and Undoing().
Referenced by FontEdit(), MoveLayerAction(), and UndoLayerChange().
Moves the object identified by its data pointers and the type not we don't bump the undo serial number.
Definition at line 787 of file move.c.
References AddObjectToMoveUndoList(), DeltaX, DeltaY, and ObjectOperation().
Referenced by mark_line_for_deletion(), maybe_pull_1(), move_corner(), Puller(), RemoveLinePoint(), reverse_line(), split_line(), and UndoMove().
Moves the object identified by its data pointers and the type as well as all attached rubberband lines.
Definition at line 803 of file move.c.
References AddObjectToMoveUndoList(), CrosshairType::AttachedObject, CLEAR_FLAG, Crosshair, DeltaX, DeltaY, IncrementUndoSerialNumber(), RubberbandType::Layer, RubberbandType::Line, RubberbandType::MovedPoint, MoveLinePoint(), ObjectOperation(), ptr, ptr2, AttachedObjectType::Rubberband, and AttachedObjectType::RubberbandN.
Referenced by ActionMoveObject(), NotifyMode(), and SetMode().
void* MoveObjectToLayer | ( | int | , |
void * | , | ||
void * | , | ||
void * | , | ||
LayerType * | , | ||
bool | |||
) |
Moves the object identified by its data pointers and the type to a new layer without changing it's position.
Definition at line 845 of file move.c.
References IncrementUndoSerialNumber(), MoreToCome, MoveToLayerFunctions, and ObjectOperation().
Referenced by ActionMoveToCurrentLayer(), move_line_to_layer(), and UndoMoveToLayer().
void MovePolygonLowLevel | ( | PolygonType * | , |
Coord | , | ||
Coord | |||
) |
Low level routine to move a polygon.
Definition at line 333 of file move.c.
References END_LOOP, MOVE, MOVE_BOX_LOWLEVEL, and POLYGONPOINT_LOOP.
Referenced by CopyPolygon(), and MovePolygon().
bool MoveSelectedObjectsToLayer | ( | LayerType * | ) |
Moves the selected objects to a new layer without changing their positions.
Definition at line 863 of file move.c.
References MoreToCome, MoveToLayerFunctions, and SelectedOperation().
Referenced by ActionMoveToCurrentLayer().