Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 5610) +++ trunk/scconfig/Rev.h (revision 5611) @@ -1 +1 @@ -static const int myrev = 5487; +static const int myrev = 5611; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 5610) +++ trunk/scconfig/Rev.tab (revision 5611) @@ -1,4 +1,5 @@ -5487 configure layer cleanup: layer visibility ina new source file +5611 configure new feature: UI layer +5487 configure layer cleanup: layer visibility in a new source file 5472 configure draw_fab config subtree 5278 configure prepare for arc UI extension: blank arc_ui.[ch] to move arc UI logics into 5256 configure move rubberband code into a plugin Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 5610) +++ trunk/src/Makefile.dep (revision 5611) @@ -3134,8 +3134,9 @@ obj_text_list.h obj_rat_list.h obj_rat.h library.h rats_patch.h font.h \ box.h move.h misc_util.h data.h crosshair.h vtonpoint.h hid.h error.h \ drc.h buffer.h draw.h rotate.h rtree.h stub_draw_fab.h obj_all.h \ - obj_pad_draw.h obj_pinvia_draw.h obj_elem_draw.h obj_line_draw.h \ - obj_arc_draw.h obj_rat_draw.h obj_poly_draw.h obj_text_draw.h + layer_ui.h obj_pad_draw.h obj_pinvia_draw.h obj_elem_draw.h \ + obj_line_draw.h obj_arc_draw.h obj_rat_draw.h obj_poly_draw.h \ + obj_text_draw.h error.o: error.c ../config.h data.h globalconst.h global_typedefs.h \ pcb_bool.h unit.h layer.h attrib.h obj_all_list.h obj_arc_list.h \ obj_common.h ../src_3rd/liblihata/genht/hash.h \ @@ -3493,6 +3494,16 @@ ../src_3rd/liblihata/genht/htsp.h ../src_3rd/liblihata/genht/ht.h \ ../src_3rd/genvector/vtp0.h list_conf.h hid_actions.h compat_misc.h \ undo.h event.h +layer_ui.o: layer_ui.c ../config.h layer_ui.h layer.h globalconst.h \ + global_typedefs.h pcb_bool.h unit.h attrib.h obj_all_list.h \ + obj_arc_list.h obj_common.h ../src_3rd/liblihata/genht/hash.h \ + ../src_3rd/genlist/gendlist.h flag.h obj_arc.h \ + ../src_3rd/genlist/gentdlist_impl.h ../src_3rd/genlist/gendlist.h \ + ../src_3rd/genlist/gentdlist_undef.h obj_elem_list.h obj_elem.h \ + obj_line_list.h obj_line.h obj_pad_list.h obj_pad.h obj_pinvia_list.h \ + obj_pinvia.h obj_text.h ht_element.h ../src_3rd/liblihata/genht/ht.h \ + ../src_3rd/liblihata/genht/ht_inlines.h obj_poly_list.h obj_poly.h \ + polyarea.h obj_text_list.h obj_rat_list.h obj_rat.h layer_vis.o: layer_vis.c ../config.h board.h const.h macro.h \ global_typedefs.h pcb_bool.h unit.h vtroutestyle.h attrib.h \ ../src_3rd/genvector/genvector_impl.h \ Index: trunk/src/Makefile.in =================================================================== --- trunk/src/Makefile.in (revision 5610) +++ trunk/src/Makefile.in (revision 5611) @@ -68,6 +68,7 @@ insert.o intersect.o layer.o + layer_ui.o layer_vis.o library.o list_conf.o Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 5610) +++ trunk/src/draw.c (revision 5611) @@ -39,6 +39,7 @@ #include "rtree.h" #include "stub_draw_fab.h" #include "obj_all.h" +#include "layer_ui.h" #include "obj_pad_draw.h" #include "obj_pinvia_draw.h" Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 5610) +++ trunk/src/layer.c (revision 5611) @@ -75,6 +75,7 @@ { PCB_LYT_FAB, 2, "fab" }, { PCB_LYT_PDRILL, 2, "plateddrill" }, { PCB_LYT_UDRILL, 2, "unplateddrill" }, + { PCB_LYT_UI, 2, "userinterface" }, { PCB_LYT_VIRTUAL, 3, "virtual" }, { 0, 0, NULL } }; Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 5610) +++ trunk/src/layer.h (revision 5611) @@ -152,6 +152,7 @@ PCB_LYT_FAB = 0x00010000, /* (virtual) fab drawing (one, not in the stackup) */ PCB_LYT_PDRILL = 0x00020000, /* (virtual) plated drills (affects all physical layers) */ PCB_LYT_UDRILL = 0x00040000, /* (virtual) unplated drills (affects all physical layers) */ + PCB_LYT_UI = 0x00080000, /* (virtual) user interface drawings (feature plugins use this for displaying states or debug info) */ PCB_LYT_ANYTHING = 0x00FFFF00, /* MASK: layers consist anything */ /* misc properties */ Index: trunk/src/layer_ui.c =================================================================== --- trunk/src/layer_ui.c (nonexistent) +++ trunk/src/layer_ui.c (revision 5611) @@ -0,0 +1,29 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * Copyright (C) 2016 Tibor 'Igor2' Palinkas + * + * This module, layer_ui.c, was written and is Copyright (C) 2016 by + * Tibor 'Igor2' Palinkas. + * this module is also subject to the GNU GPL as described below + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +/* Virtual layers for UI and debug */ +#include "config.h" +#include "layer_ui.h" Index: trunk/src/layer_ui.h =================================================================== --- trunk/src/layer_ui.h (nonexistent) +++ trunk/src/layer_ui.h (revision 5611) @@ -0,0 +1,28 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * Copyright (C) 2016 Tibor 'Igor2' Palinkas + * + * This module, layer_ui.c, was written and is Copyright (C) 2016 by + * Tibor 'Igor2' Palinkas. + * this module is also subject to the GNU GPL as described below + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +/* Virtual layers for UI and debug */ +#include "layer.h" Index: trunk/src_plugins/export_dxf/dxf.c =================================================================== --- trunk/src_plugins/export_dxf/dxf.c (revision 5610) +++ trunk/src_plugins/export_dxf/dxf.c (revision 5611) @@ -4395,6 +4395,9 @@ char tmp_ln[PCB_PATH_MAX]; const char *name = pcb_layer_to_file_name(tmp_ln, layer, flags, PCB_FNS_fixed); + if (flags & PCB_LYT_UI) + return 0; + #if DEBUG fprintf(stderr, "[File: %s: line: %d] Entering dxf_set_layer () function.\n", __FILE__, __LINE__); #endif Index: trunk/src_plugins/export_gcode/gcode.c =================================================================== --- trunk/src_plugins/export_gcode/gcode.c (revision 5610) +++ trunk/src_plugins/export_gcode/gcode.c (revision 5611) @@ -539,6 +539,8 @@ static int gcode_set_layer_group(pcb_layergrp_id_t group, pcb_layer_id_t layer, unsigned int flags, int is_empty) { + if (flags & PCB_LYT_UI) + return 0; if (flags & PCB_LYT_INVIS) return 0; Index: trunk/src_plugins/export_gerber/gerber.c =================================================================== --- trunk/src_plugins/export_gerber/gerber.c (revision 5610) +++ trunk/src_plugins/export_gerber/gerber.c (revision 5611) @@ -564,6 +564,9 @@ char *cp; const char *group_name; + if (flags & PCB_LYT_UI) + return 0; + #if 0 printf(" Layer %s group %lx drill %d mask %d flags=%lx\n", pcb_layer_name(layer), group, is_drill, is_mask, flags); #endif Index: trunk/src_plugins/export_openscad/scad.c =================================================================== --- trunk/src_plugins/export_openscad/scad.c (revision 5610) +++ trunk/src_plugins/export_openscad/scad.c (revision 5611) @@ -733,6 +733,9 @@ outline_layer = 0; fresh_layer = 1; + if (flags & PCB_LYT_UI) + return 0; + if ((flags & PCB_LYT_INVIS) || (flags & PCB_LYT_ASSY)) return 0; Index: trunk/src_plugins/export_png/png.c =================================================================== --- trunk/src_plugins/export_png/png.c (revision 5610) +++ trunk/src_plugins/export_png/png.c (revision 5611) @@ -1003,6 +1003,9 @@ { doing_outline = 0; + if (flags & PCB_LYT_UI) + return 0; + if ((flags & PCB_LYT_ASSY) || (flags & PCB_LYT_FAB) || (flags & PCB_LYT_PASTE) || (flags & PCB_LYT_INVIS)) return 0; Index: trunk/src_plugins/export_ps/eps.c =================================================================== --- trunk/src_plugins/export_ps/eps.c (revision 5610) +++ trunk/src_plugins/export_ps/eps.c (revision 5611) @@ -349,6 +349,9 @@ char tmp_ln[PCB_PATH_MAX]; const char *name; + if (flags & PCB_LYT_UI) + return 0; + if ((flags & PCB_LYT_ASSY) || (flags & PCB_LYT_FAB) || (flags & PCB_LYT_INVIS)) return 0; @@ -355,7 +358,6 @@ if ((group >= 0) && pcb_is_layergrp_empty(group)) return 0; - is_drill = ((flags & PCB_LYT_PDRILL) || (flags & PCB_LYT_UDRILL)); is_mask = (flags & PCB_LYT_MASK); is_paste = !!(flags & PCB_LYT_PASTE); Index: trunk/src_plugins/export_ps/ps.c =================================================================== --- trunk/src_plugins/export_ps/ps.c (revision 5610) +++ trunk/src_plugins/export_ps/ps.c (revision 5611) @@ -767,6 +767,9 @@ return 0; } + if (flags & PCB_LYT_UI) + return 0; + if (is_empty) return 0; Index: trunk/src_plugins/export_svg/svg.c =================================================================== --- trunk/src_plugins/export_svg/svg.c (revision 5610) +++ trunk/src_plugins/export_svg/svg.c (revision 5611) @@ -333,6 +333,9 @@ { int opa, is_our_mask = 0, is_our_silk = 0; + if (flags & PCB_LYT_UI) + return 0; + if (flags & PCB_LYT_INVIS) return 0;