diff --git a/doc/xschem_man/graphs.html b/doc/xschem_man/graphs.html
index 72f256e5..d58c1e3b 100644
--- a/doc/xschem_man/graphs.html
+++ b/doc/xschem_man/graphs.html
@@ -160,6 +160,7 @@ p{padding: 15px 30px 10px;}
/ Division
** Exponentiation
exch() Exchange top 2 operands on stack
+ ravg() Running average of over a specified time window
1 argument operators:
@@ -173,7 +174,8 @@ p{padding: 15px 30px 10px;}
- ln() Base-e logarithm
- log10() Base 10 logarithm
- avg() Moving average
- - deriv() Derivative
+ - deriv() Derivative w.r.t. graph sweep variable
+ - deriv0() Derivative w.r.t. simulation (index 0) sweep variable
- integ() Integration
- dup() Duplicate last element on stack
diff --git a/src/draw.c b/src/draw.c
index 72a6b4ed..78512a6d 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -428,7 +428,6 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
#if HAS_CAIRO==1
const char *textfont;
#endif
- int show_hidden_texts = tclgetboolvar("show_hidden_texts");
if(xctx->inst[n].ptr == -1) return;
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) return;
@@ -557,7 +556,7 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
{
text = symptr->text[j];
if(text.xscale*FONTWIDTH*xctx->mooz<1) continue;
- if(!show_hidden_texts && (symptr->text[j].flags & HIDE_TEXT)) continue;
+ if(!xctx->show_hidden_texts && (text.flags & HIDE_TEXT)) continue;
if( hide && text.txt_ptr && strcmp(text.txt_ptr, "@symname") && strcmp(text.txt_ptr, "@name") ) continue;
txtptr= translate(n, text.txt_ptr);
ROTATION(rot, flip, 0.0,0.0,text.x0,text.y0,x1,y1);
@@ -716,6 +715,7 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot
for(j=0;j< symptr->texts;j++)
{
text = symptr->text[j];
+ if(!xctx->show_hidden_texts && (text.flags & HIDE_TEXT)) continue;
if(text.xscale*FONTWIDTH*xctx->mooz<1) continue;
txtptr= translate(n, text.txt_ptr);
ROTATION(rot, flip, 0.0,0.0,text.x0,text.y0,x1,y1);
@@ -3207,7 +3207,6 @@ void draw(void)
int c, i = 0;
xSymbol *symptr;
int textlayer;
- int show_hidden_texts = tclgetboolvar("show_hidden_texts");
#if HAS_CAIRO==1
const char *textfont;
@@ -3328,7 +3327,7 @@ void draw(void)
for(i=0;itexts;i++)
{
textlayer = xctx->text[i].layer;
- if(!show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
+ if(!xctx->show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
dbg(1, "draw(): drawing string %d = %s\n",i, xctx->text[i].txt_ptr);
#if HAS_CAIRO==1
diff --git a/src/psprint.c b/src/psprint.c
index 5913cd93..f4a8b2d1 100644
--- a/src/psprint.c
+++ b/src/psprint.c
@@ -509,7 +509,6 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot,
xPoly polygon;
xSymbol *symptr;
char *textfont;
- int show_hidden_texts = tclgetboolvar("show_hidden_texts");
if(xctx->inst[n].ptr == -1) return;
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) return;
@@ -616,7 +615,7 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot,
{
text = (xctx->inst[n].ptr+ xctx->sym)->text[j];
/* if(text.xscale*FONTWIDTH* xctx->mooz<1) continue; */
- if(!show_hidden_texts && (text.flags & HIDE_TEXT)) continue;
+ if(!xctx->show_hidden_texts && (text.flags & HIDE_TEXT)) continue;
if( hide && text.txt_ptr && strcmp(text.txt_ptr, "@symname") && strcmp(text.txt_ptr, "@name") ) continue;
txtptr= translate(n, text.txt_ptr);
ROTATION(rot, flip, 0.0,0.0,text.x0,text.y0,x1,y1);
@@ -697,7 +696,6 @@ void create_ps(char **psfile, int what)
int c,i, textlayer;
int old_grid;
const char *textfont;
- int show_hidden_texts = tclgetboolvar("show_hidden_texts");
if(what & 1) { /* prolog */
numpages = 0;
@@ -823,7 +821,7 @@ void create_ps(char **psfile, int what)
for(i=0;itexts;i++)
{
textlayer = xctx->text[i].layer;
- if(!show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
+ if(!xctx->show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
my_snprintf(ps_font_family, S(ps_font_name), "Helvetica");
diff --git a/src/scheduler.c b/src/scheduler.c
index 998ade53..73ff0d94 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -2603,6 +2603,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
dbg(1, "scheduler(): set semaphore to %s\n", argv[3]);
xctx->semaphore=atoi(argv[3]);
}
+ else if(!strcmp(argv[2],"show_hidden_texts")) {
+ dbg(1, "scheduler(): set show_hidden_texts to %s\n", argv[3]);
+ xctx->show_hidden_texts=atoi(argv[3]);
+ }
else if(!strcmp(argv[2],"sym_txt")) {
xctx->sym_txt=atoi(argv[3]);
}
diff --git a/src/svgdraw.c b/src/svgdraw.c
index 11e3d991..f852f605 100644
--- a/src/svgdraw.c
+++ b/src/svgdraw.c
@@ -443,7 +443,6 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot,
xPoly polygon;
xSymbol *symptr;
char *textfont;
- int show_hidden_texts = tclgetboolvar("show_hidden_texts");
if(xctx->inst[n].ptr == -1) return;
if( (layer != PINLAYER && !xctx->enable_layer[layer]) ) return;
@@ -535,7 +534,7 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot,
for(j=0;j< symptr->texts;j++) {
text = symptr->text[j];
/* if(text.xscale*FONTWIDTH* xctx->mooz<1) continue; */
- if(!show_hidden_texts && (symptr->text[j].flags & HIDE_TEXT)) continue;
+ if(!xctx->show_hidden_texts && (symptr->text[j].flags & HIDE_TEXT)) continue;
if( hide && text.txt_ptr && strcmp(text.txt_ptr, "@symname") && strcmp(text.txt_ptr, "@name") ) continue;
txtptr= translate(n, text.txt_ptr);
ROTATION(rot, flip, 0.0,0.0,text.x0,text.y0,x1,y1);
@@ -631,7 +630,6 @@ void svg_draw(void)
int *unused_layer;
int color;
Hilight_hashentry *entry;
- int show_hidden_texts = tclgetboolvar("show_hidden_texts");
if(!lastdir[0]) my_strncpy(lastdir, pwd_dir, S(lastdir));
if(has_x && !xctx->plotfile[0]) {
@@ -764,7 +762,7 @@ void svg_draw(void)
for(i=0;itexts;i++)
{
textlayer = xctx->text[i].layer;
- if(!show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
+ if(!xctx->show_hidden_texts && (xctx->text[i].flags & HIDE_TEXT)) continue;
if(textlayer < 0 || textlayer >= cadlayers) textlayer = TEXTLAYER;
my_snprintf(svg_font_family, S(svg_font_family), tclgetvar("svg_font_name"));
my_snprintf(svg_font_style, S(svg_font_style), "normal");
diff --git a/src/xinit.c b/src/xinit.c
index 79c93dc5..ff71590f 100644
--- a/src/xinit.c
+++ b/src/xinit.c
@@ -630,6 +630,7 @@ static void alloc_xschem_data(const char *top_path, const char *win_path)
my_strdup2(1462, &xctx->current_win_path, win_path);
xctx->fill_type=my_calloc(640, cadlayers, sizeof(int));
xctx->case_insensitive = 0;
+ xctx->show_hidden_texts = 0;
xctx->x_strcmp = strcmp;
xctx->fill_pattern = 1;
xctx->draw_window = 0;
@@ -2371,6 +2372,10 @@ int Tcl_AppInit(Tcl_Interp *inter)
xctx->x_strcmp = my_strcasecmp;
}
+ if(tclgetboolvar("show_hidden_texts")) {
+ xctx->show_hidden_texts = 1;
+ }
+
/* */
/* START PROCESSING USER OPTIONS */
/* */
diff --git a/src/xschem.h b/src/xschem.h
index 6a630f8f..ad5e1021 100644
--- a/src/xschem.h
+++ b/src/xschem.h
@@ -954,6 +954,7 @@ typedef struct {
void (*delete_undo)(void);
void (*clear_undo)(void);
int case_insensitive; /* for case insensitive compare where needed */
+ int show_hidden_texts; /* force show texts that have hide=true attribute set */
int (*x_strcmp)(const char *, const char *);
Lcc hier_attr[CADMAXHIER]; /* hierarchical recursive attribute substitution when descending */
} Xschem_ctx;
diff --git a/src/xschem.tcl b/src/xschem.tcl
index 1dd75ccc..f86052e2 100644
--- a/src/xschem.tcl
+++ b/src/xschem.tcl
@@ -5170,7 +5170,8 @@ proc build_widgets { {topwin {} } } {
select_layers
xschem redraw
}
- $topwin.menubar.view.menu add checkbutton -label "Show hidden texts" -variable show_hidden_texts -command {xschem redraw}
+ $topwin.menubar.view.menu add checkbutton -label "Show hidden texts" -variable show_hidden_texts \
+ -command {xschem set show_hidden_texts $show_hidden_texts; xschem redraw}
$topwin.menubar.view.menu add command -label "Change current layer color" -accelerator {} -command {
change_color
}
diff --git a/src/xschemrc b/src/xschemrc
index f089a5e3..59aa38ed 100644
--- a/src/xschemrc
+++ b/src/xschemrc
@@ -358,3 +358,10 @@
## Do not set this option if you don't know what you are doing.
## Default: not enabled (0)
# set case_insensitive 1
+
+###########################################################################
+#### SHOW HIDDEN TEXTS
+###########################################################################
+## This option shows text objects even if they have attribute 'hide=true' set
+## default: 0 (not set)
+# set show_hidden_texts 1