findelement.c File Reference

Detailed Description

Plug-in for PCB to find the specified element.

Copyright (C) 2009 by Bert Timmerman <> with some usefull hints from DJ Delorie to finish this plug-in.
Function to look up the specified PCB element on the screen.

Compile like this:

gcc -Ipath/to/pcb/src -Ipath/to/pcb -O2 -shared findelement.c -o

The resulting file should go in $HOME/.pcb/plugins/

Be very strict in compiling this plug-in against the exact pcb sources you compiled/installed the pcb executable (i.e. src/pcb) with.
Usage: FindElement(Refdes)
Usage: FE(Refdes)
If no argument is passed, no action is carried out.

FE is a shortcut for lazy users ;-).
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.

Definition in file findelement.c.

#include <stdio.h>
#include <math.h>
#include "global.h"
#include "data.h"
#include "hid.h"
#include "misc.h"
#include "create.h"
#include "rtree.h"
#include "undo.h"
#include "set.h"
#include "error.h"

Include dependency graph for findelement.c:

Go to the source code of this file.


static int find_element (int argc, char **argv, int x, int y)
 Find the specified element.
void pcb_plugin_init ()


static HID_Action findelement_action_list []

Function Documentation

static int find_element int  argc,
char **  argv,
int  x,
int  y

Find the specified element.

Usage: FindElement(Refdes)
If no argument is passed, no action is carried out.

Definition at line 61 of file findelement.c.

References element_by_pos::element.

Variable Documentation

HID_Action findelement_action_list[] [static]

Initial value:

        {"FindElement", NULL, find_element, "Find the specified element", NULL},
        {"FE", NULL, find_element, "Find the specified element", NULL}

Definition at line 92 of file findelement.c.

Generated on Tue Aug 17 15:28:05 2010 for pcb-plugins by  doxygen 1.4.6-NO