Index: Makefile =================================================================== --- Makefile (nonexistent) +++ Makefile (revision 33485) @@ -0,0 +1,6 @@ +all: + cd ../../src && $(MAKE) mod_show_netnames + +clean: + rm *.o *.so 2>/dev/null ; true + Index: Plug.tmpasm =================================================================== --- Plug.tmpasm (nonexistent) +++ Plug.tmpasm (revision 33485) @@ -0,0 +1,12 @@ +put /local/pcb/mod {show_netnames} +put /local/pcb/mod/MENUFILE {show_netnames-menu.lht} +put /local/pcb/mod/MENUVAR {show_netnames_menu} +append /local/pcb/mod/OBJS [@ + $(PLUGDIR)/show_netnames/show_netnames.o +@] + +switch /local/pcb/show_netnames/controls + case {buildin} include /local/pcb/tmpasm/buildin; end; + case {plugin} include /local/pcb/tmpasm/plugin; end; + case {disable} include /local/pcb/tmpasm/disable; end; +end Index: show_netnames-menu.lht =================================================================== --- show_netnames-menu.lht (nonexistent) +++ show_netnames-menu.lht (revision 33485) @@ -0,0 +1,9 @@ +ha:rnd-menu-v1 { + li:anchored { + ha:@feature_plugins { + li:submenu { + ha:Show netnames when zoomed in = { action=show_netnames() } + } + } + } +} Index: show_netnames.c =================================================================== --- show_netnames.c (nonexistent) +++ show_netnames.c (revision 33485) @@ -0,0 +1,62 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * Copyright (C) 2020 Tibor 'Igor2' Palinkas + * + * 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: + * Project page: http://repo.hu/projects/pcb-rnd + * lead developer: http://repo.hu/projects/pcb-rnd/contact.html + * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") + */ + +#include "config.h" + +#include +#include +#include + +#include "board.h" +#include +#include "menu_internal.c" + +const char *pcb_show_netnames_cookie = "show_netnames plugin"; + +static void show_netnames_brd_chg(rnd_hidlib_t *hidlib, void *user_data, int argc, rnd_event_arg_t argv[]) +{ + rnd_trace("show_netnames!"); +} + +int pplg_check_ver_show_netnames(int ver_needed) { return 0; } + +void pplg_uninit_show_netnames(void) +{ + rnd_hid_menu_unload(rnd_gui, pcb_show_netnames_cookie); + rnd_event_unbind_allcookie(pcb_show_netnames_cookie); + rnd_remove_actions_by_cookie(pcb_show_netnames_cookie); +} + +int pplg_init_show_netnames(void) +{ + RND_API_CHK_VER; + + rnd_event_bind(RND_EVENT_BOARD_META_CHANGED, show_netnames_brd_chg, NULL, pcb_show_netnames_cookie); + rnd_event_bind(RND_EVENT_BOARD_CHANGED, show_netnames_brd_chg, NULL, pcb_show_netnames_cookie); + + rnd_hid_menu_load(rnd_gui, NULL, pcb_show_netnames_cookie, 150, NULL, 0, show_netnames_menu, "plugin: show_netnames"); + return 0; +} Index: show_netnames.pup =================================================================== --- show_netnames.pup (nonexistent) +++ show_netnames.pup (revision 33485) @@ -0,0 +1,7 @@ +$class feature +$short display network names over tracks +$long display network names as overlay when zoomed in enough +$state works +$package (core) +default buildin +autoload 1