select.c: Remove Draw() call from SelectConnection
[geda-pcb/leaky.git] / src / crosshair.h
blob82997785ca17f02af5b50732e41de65bb577f758
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 for crosshair routines
31 #ifndef __CROSSHAIR_INCLUDED__
32 #define __CROSSHAIR_INCLUDED__
34 #include "global.h"
36 /* ---------------------------------------------------------------------------
37 * fits screen coordinates into grid
39 #define GRIDFIT_X(x,g) (int)(0.5 + ((int)(((x) -PCB->GridOffsetX + g/2) /(g)) *(g)) +PCB->GridOffsetX)
40 #define GRIDFIT_Y(y,g) (int)(0.5 + ((int)(((y) -PCB->GridOffsetY + g/2) /(g)) *(g)) +PCB->GridOffsetY)
42 /* ---------------------------------------------------------------------------
43 * all possible states of an attached object
45 #define STATE_FIRST 0 /* initial state */
46 #define STATE_SECOND 1
47 #define STATE_THIRD 2
50 void CrosshairOn (bool);
51 void CrosshairOff (bool);
52 void HideCrosshair (bool);
53 void RestoreCrosshair (bool);
54 void MoveCrosshairRelative (LocationType, LocationType);
55 bool MoveCrosshairAbsolute (LocationType, LocationType);
56 void SetCrosshairRange (LocationType, LocationType, LocationType,
57 LocationType);
58 void InitCrosshair (void);
59 void DestroyCrosshair (void);
60 void DrawMark (bool);
61 void FitCrosshairIntoGrid (LocationType, LocationType);
63 #endif