do not show bboxes of hidden texts while moving objects if global option "show hidden texts" is not set; documentation updates
This commit is contained in:
parent
7d6b33cda8
commit
f286b376f7
|
|
@ -160,6 +160,7 @@ p{padding: 15px 30px 10px;}
|
|||
<li><kbd>/</kbd> Division</li>
|
||||
<li><kbd>**</kbd> Exponentiation</li>
|
||||
<li><kbd>exch()</kbd> Exchange top 2 operands on stack</li>
|
||||
<li><kbd>ravg()</kbd> Running average of over a specified time window</li>
|
||||
</ul>
|
||||
<p>1 argument operators:</p>
|
||||
<ul>
|
||||
|
|
@ -173,7 +174,8 @@ p{padding: 15px 30px 10px;}
|
|||
<li><kbd>ln()</kbd> Base-e logarithm</li>
|
||||
<li><kbd>log10()</kbd> Base 10 logarithm</li>
|
||||
<li><kbd>avg()</kbd> Moving average</li>
|
||||
<li><kbd>deriv()</kbd> Derivative</li>
|
||||
<li><kbd>deriv()</kbd> Derivative w.r.t. graph sweep variable</li>
|
||||
<li><kbd>deriv0()</kbd> Derivative w.r.t. simulation (index 0) sweep variable</li>
|
||||
<li><kbd>integ()</kbd> Integration</li>
|
||||
<li><kbd>dup()</kbd> Duplicate last element on stack</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -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;i<xctx->texts;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
|
||||
|
|
|
|||
|
|
@ -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;i<xctx->texts;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");
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;i<xctx->texts;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");
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
/* */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue