Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 33484) +++ trunk/scconfig/Rev.h (revision 33485) @@ -1 +1 @@ -static const int myrev = 33460; +static const int myrev = 33485; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 33484) +++ trunk/scconfig/Rev.tab (revision 33485) @@ -1,3 +1,4 @@ +33485 configure new plugin: show_netnames 33460 configure local dialogs plugin configuration 33403 distclean move script plugin to librnd 33376 distclean scripting support cleanup Index: trunk/scconfig/plugins.h =================================================================== --- trunk/scconfig/plugins.h (revision 33484) +++ trunk/scconfig/plugins.h (revision 33485) @@ -62,6 +62,7 @@ plugin_def("serpentine", "Serpentine creation", sdisable, 0, 0) plugin_def("shand_cmd", "command shorthands", sbuildin, 1, 0) plugin_def("shape", "generate regular shapes", sbuildin, 1, 0) +plugin_def("show_netnames", "display network names over tracks",sbuildin, 1, 0) plugin_def("sketch_route", "assisted semi-auto-routing", sdisable, 0, 0) plugin_def("smartdisperse", "netlist based dispenser", sbuildin, 1, 0) plugin_def("stroke", "mouse gestures", sbuildin, 1, 1) Index: trunk/src_plugins/plugins_ALL.tmpasm =================================================================== --- trunk/src_plugins/plugins_ALL.tmpasm (revision 33484) +++ trunk/src_plugins/plugins_ALL.tmpasm (revision 33485) @@ -103,6 +103,7 @@ include {../src_plugins/serpentine/Plug.tmpasm} include {../src_plugins/shand_cmd/Plug.tmpasm} include {../src_plugins/shape/Plug.tmpasm} +include {../src_plugins/show_netnames/Plug.tmpasm} include {../src_plugins/sketch_route/Plug.tmpasm} include {../src_plugins/smartdisperse/Plug.tmpasm} include {../src_plugins/teardrops/Plug.tmpasm} Index: trunk/src_plugins/show_netnames/Makefile =================================================================== --- trunk/src_plugins/show_netnames/Makefile (nonexistent) +++ trunk/src_plugins/show_netnames/Makefile (revision 33485) @@ -0,0 +1,6 @@ +all: + cd ../../src && $(MAKE) mod_show_netnames + +clean: + rm *.o *.so 2>/dev/null ; true + Index: trunk/src_plugins/show_netnames/Plug.tmpasm =================================================================== --- trunk/src_plugins/show_netnames/Plug.tmpasm (nonexistent) +++ trunk/src_plugins/show_netnames/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: trunk/src_plugins/show_netnames/show_netnames-menu.lht =================================================================== --- trunk/src_plugins/show_netnames/show_netnames-menu.lht (nonexistent) +++ trunk/src_plugins/show_netnames/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: trunk/src_plugins/show_netnames/show_netnames.c =================================================================== --- trunk/src_plugins/show_netnames/show_netnames.c (nonexistent) +++ trunk/src_plugins/show_netnames/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: trunk/src_plugins/show_netnames/show_netnames.pup =================================================================== --- trunk/src_plugins/show_netnames/show_netnames.pup (nonexistent) +++ trunk/src_plugins/show_netnames/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