add `xschem set hilight_color` command

This commit is contained in:
stefan schippers 2023-12-09 02:09:36 +01:00
parent eb471528f9
commit b21ac67cc4
2 changed files with 9 additions and 1 deletions

View File

@ -538,6 +538,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
<li><kbd> abort_operation</kbd></li><pre>
@ -1227,6 +1228,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
<li><kbd> format </kbd> set name of custom format attribute used for netlisting </li>
<li><kbd> header_text </kbd> set header metadata (used for license info) </li>
<li><kbd> hide_symbols </kbd> set to 0,1,2 for various hiding level of symbols </li>
<li><kbd> hilight_color </kbd> set hilight color for next hilight </li>
<li><kbd> infowindow_text </kbd> ERC messages </li>
<li><kbd> netlist_name </kbd> set custom netlist name </li>
<li><kbd> netlist_type </kbd> set netlisting mode (spice, verilog, vhdl, tedax, symbol) </li>
@ -1449,7 +1451,6 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
</ul>

View File

@ -4155,6 +4155,13 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
xctx->hide_symbols=atoi(argv[3]);
}
else if(!strcmp(argv[2], "hilight_color")) { /* set hilight color for next hilight */
int c = atoi(argv[3]);
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
if(c >= cadlayers) c = 4;
xctx->hilight_color= c;
}
else if(!strcmp(argv[2], "infowindow_text")) { /* ERC messages */
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
my_strdup(_ALLOC_ID_, &xctx->infowindow_text, argv[3]);