pcb 4.1.1
An interactive printed circuit board layout editor.

move.h File Reference

Prototypes for move routines. More...

#include "global.h"
Include dependency graph for move.h:
This graph shows which files directly or indirectly include this file:

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.

Detailed Description

Prototypes for move routines.


Copyright.


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 move.h.


Define Documentation

#define MOVE (   xs,
  ys,
  deltax,
  deltay 
)
Value:
{                                                                                                               \
                ((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 
)
Value:
{ \
                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 
)
Value:
{                                                                       \
                MOVE((b)->X1,(b)->Y1,(dx),(dy)) \
                MOVE((b)->X2,(b)->Y2,(dx),(dy)) \
        }

Definition at line 48 of file move.h.

Referenced by MoveElementLowLevel(), and MovePolygonLowLevel().

#define MOVE_LINE_LOWLEVEL (   l,
  dx,
  dy 
)
Value:
{                                                                       \
                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 
)
Value:
{                                                                       \
                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 
)
Value:
{ \
                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 
)
Value:
{                                                                                                                       \
                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
Value:
(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 
)
Value:
{ \
                MOVE((v)->X,(v)->Y,(dx),(dy)) \
                MOVE_BOX_LOWLEVEL(&((v)->BoundingBox),(dx),(dy));               \
        }

Definition at line 53 of file move.h.

Referenced by MoveVia().

#define MOVETOLAYER_TYPES   (LINE_TYPE | TEXT_TYPE | POLYGON_TYPE | RATLINE_TYPE | ARC_TYPE)

Definition at line 95 of file move.h.

Referenced by ActionMoveToCurrentLayer().


Function Documentation

int MoveLayer ( int  old_index,
int  new_index 
)
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.

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().

Here is the call graph for this function:

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.

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function: