diff --git a/src/actions.c b/src/actions.c index 348b2cf5..83e3f5be 100644 --- a/src/actions.c +++ b/src/actions.c @@ -743,10 +743,11 @@ void remove_symbols(void) } /* set cached rect .flags bitmask based on attributes, currently: - * graph 1 - * graph_unlocked 1 + 2 - * image 1024 - * image_unscaled 1024 + 2048 + * graph 1 + * unlocked 2 + * private_cursor 4 + * image 1024 + * unscaled 2048 */ int set_rect_flags(xRect *r) { @@ -754,10 +755,15 @@ int set_rect_flags(xRect *r) unsigned short f = 0; if(r->prop_ptr && r->prop_ptr[0]) { flags = get_tok_value(r->prop_ptr,"flags",0); - if(strstr(flags, "unscaled")) f |= 3072; - else if(strstr(flags, "image")) f |= 1024; - else if(strstr(flags, "unlocked")) f |= 3; - else if(strstr(flags, "graph")) f |= 1; + if(strstr(flags, "graph")) { + f |= 1; + if(strstr(flags, "unlocked")) f |= 2; + if(strstr(flags, "private_cursor")) f |= 4; + } + if(strstr(flags, "image")) { + f |= 1024; + if(strstr(flags, "unscaled")) f |= 2048; + } } r->flags = f; dbg(1, "set_rect_flags(): flags=%d\n", f); diff --git a/src/callback.c b/src/callback.c index 3578ae91..d61dbb5f 100644 --- a/src/callback.c +++ b/src/callback.c @@ -239,7 +239,16 @@ void backannotate_at_cursor_b_pos(xRect *r, Graph_ctx *gr) } sweep_idx = get_raw_index(find_nth(get_tok_value(r->prop_ptr, "sweep", 0), ", ", "\"", 0, 1), NULL); if(sweep_idx < 0) sweep_idx = 0; - cursor2 = xctx->graph_cursor2_x; + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0); + if(s[0]) { + cursor2 = atof(s); + } else { + cursor2 = xctx->graph_cursor2_x; + } + } else { + cursor2 = xctx->graph_cursor2_x; + } start = (gr->gx1 <= gr->gx2) ? gr->gx1 : gr->gx2; end = (gr->gx1 <= gr->gx2) ? gr->gx2 : gr->gx1; dbg(1, "start=%g, end=%g\n", start, end); @@ -376,15 +385,29 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int /* move cursor1 */ /* set cursor position from master graph x-axis */ if(event == MotionNotify && (state & Button1Mask) && (xctx->graph_flags & 16 )) { - xctx->graph_cursor1_x = G_X(xctx->mousex); - if(gr->logx) xctx->graph_cursor1_x = pow(10, xctx->graph_cursor1_x); + double c; + + c = G_X(xctx->mousex); + if(gr->logx) c = pow(10, c); + if(r->flags & 4) { /* private_cursor */ + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor1_x", dtoa(c))); + } else { + xctx->graph_cursor1_x = c; + } } /* move cursor2 */ /* set cursor position from master graph x-axis */ else if(event == MotionNotify && (state & Button1Mask) && (xctx->graph_flags & 32 )) { + double c; int floaters = there_are_floaters(); - xctx->graph_cursor2_x = G_X(xctx->mousex); - if(gr->logx) xctx->graph_cursor2_x = pow(10, xctx->graph_cursor2_x); + + c = G_X(xctx->mousex); + if(gr->logx) c = pow(10, c); + if(r->flags & 4) { /* private_cursor */ + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor2_x", dtoa(c))); + } else { + xctx->graph_cursor2_x = c; + } if(tclgetboolvar("live_cursor2_backannotate")) { backannotate_at_cursor_b_pos(r, gr); if(floaters) set_modify(-2); /* update floater caches to reflect actual backannotation */ @@ -416,7 +439,17 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int if(event == ButtonPress && button == Button1) { /* dragging cursors when mouse is very close */ if(xctx->graph_flags & 2) { - double cursor1 = xctx->graph_cursor1_x; + double cursor1; + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor1_x", 0); + if(s[0]) { + cursor1 = atof(s); + } else { + cursor1 = xctx->graph_cursor1_x; + } + } else { + cursor1 = xctx->graph_cursor1_x; + } if(gr->logx ) { cursor1 = mylog10(cursor1); } @@ -425,7 +458,17 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int } } if(xctx->graph_flags & 4) { - double cursor2 = xctx->graph_cursor2_x; + double cursor2; + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0); + if(s[0]) { + cursor2 = atof(s); + } else { + cursor2 = xctx->graph_cursor2_x; + } + } else { + cursor2 = xctx->graph_cursor2_x; + } if(gr->logx) { cursor2 = mylog10(cursor2); } @@ -437,24 +480,60 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int else if(event == ButtonPress && button == Button3) { /* Numerically set cursor position */ if(xctx->graph_flags & 2) { - double cursor1 = xctx->graph_cursor1_x; - if(gr->logx) { + double cursor1; + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor1_x", 0); + if(s[0]) { + cursor1 = atof(s); + } else { + cursor1 = xctx->graph_cursor1_x; + } + } else { + cursor1 = xctx->graph_cursor1_x; + } + if(gr->logx ) { cursor1 = mylog10(cursor1); } if(fabs(xctx->mousex - W_X(cursor1)) < 10) { - tclvareval("input_line {Pos:} {xschem set cursor1_x} ", dtoa_eng(xctx->graph_cursor1_x), NULL); + tclvareval("input_line {Pos:} {} ", dtoa_eng(cursor1), NULL); + cursor1 = atof_spice(tclresult()); + here(cursor1); + if(r->flags & 4) { + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor1_x", dtoa(cursor1))); + } else { + xctx->graph_cursor1_x = cursor1; + } + + event = 0; /* avoid further processing ButtonPress that might set GRAPHPAH */ } redraw_all_at_end = 1; } if(xctx->graph_flags & 4) { - double cursor2 = xctx->graph_cursor2_x; + double cursor2; + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0); + if(s[0]) { + cursor2 = atof(s); + } else { + cursor2 = xctx->graph_cursor2_x; + } + } else { + cursor2 = xctx->graph_cursor2_x; + } if(gr->logx) { cursor2 = mylog10(cursor2); } if(fabs(xctx->mousex - W_X(cursor2)) < 10) { - tclvareval("input_line {Pos:} {xschem set cursor2_x} ", dtoa_eng(xctx->graph_cursor2_x), NULL); + tclvareval("input_line {Pos:} {} ", dtoa_eng(cursor2), NULL); + cursor2 = atof_spice(tclresult()); + if(r->flags & 4) { + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor2_x", dtoa(cursor2))); + } else { + xctx->graph_cursor2_x = cursor2; + } + event = 0; /* avoid further processing ButtonPress that might set GRAPHPAH */ } redraw_all_at_end = 1; @@ -470,17 +549,34 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int xctx->graph_flags ^= 2; need_all_redraw = 1; if(xctx->graph_flags & 2) { - xctx->graph_cursor1_x = G_X(xctx->mousex); - if(gr->logx) xctx->graph_cursor1_x = pow(10, xctx->graph_cursor1_x); + double c = G_X(xctx->mousex); + + if(gr->logx) c = pow(10, c); + if(r->flags & 4) { + if(!get_tok_value(r->prop_ptr, "cursor1_x", 0)[0]) { + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor1_x", dtoa(c))); + } + } else { + xctx->graph_cursor1_x = c; + } } } /* x cursor2 toggle */ else if((key == 'b') ) { int floaters = there_are_floaters(); + xctx->graph_flags ^= 4; if(xctx->graph_flags & 4) { - xctx->graph_cursor2_x = G_X(xctx->mousex); - if(gr->logx) xctx->graph_cursor2_x = pow(10, xctx->graph_cursor2_x); + double c = G_X(xctx->mousex); + + if(gr->logx) c = pow(10, c); + if(r->flags & 4) { + if(!get_tok_value(r->prop_ptr, "cursor2_x", 0)[0]) { + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor2_x", dtoa(c))); + } + } else { + xctx->graph_cursor2_x = c; + } if(tclgetboolvar("live_cursor2_backannotate")) { backannotate_at_cursor_b_pos(r, gr); if(floaters) set_modify(-2); /* update floater caches to reflect actual backannotation */ @@ -497,11 +593,45 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int } /* swap cursors */ else if((key == 's') ) { - double tmp; + double tmp, cursor1, cursor2; int floaters = there_are_floaters(); - tmp = xctx->graph_cursor2_x; - xctx->graph_cursor2_x = xctx->graph_cursor1_x; - xctx->graph_cursor1_x = tmp; + + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor1_x", 0); + if(s[0]) { + cursor1 = atof(s); + } else { + cursor1 = xctx->graph_cursor1_x; + } + } else { + cursor1 = xctx->graph_cursor1_x; + } + + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0); + if(s[0]) { + cursor2 = atof(s); + } else { + cursor2 = xctx->graph_cursor2_x; + } + } else { + cursor2 = xctx->graph_cursor2_x; + } + + tmp = cursor2; + cursor2 = cursor1; + cursor1 = tmp; + + if(r->flags & 4) { + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor1_x", dtoa(cursor1))); + } else { + xctx->graph_cursor1_x = cursor1; + } + if(r->flags & 4) { + my_strdup(_ALLOC_ID_, &r->prop_ptr, subst_token(r->prop_ptr, "cursor2_x", dtoa(cursor2))); + } else { + xctx->graph_cursor2_x = cursor2; + } if(tclgetboolvar("live_cursor2_backannotate")) { backannotate_at_cursor_b_pos(r, gr); if(floaters) set_modify(-2); /* update floater caches to reflect actual backannotation */ @@ -753,7 +883,10 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int } else if((key == 't') ) { if(track_dset != -2) { + /* const char *unlocked = strstr(get_tok_value(r->prop_ptr, "flags", 0), "unlocked"); + */ + int unlocked = r->flags & 2; int floaters = there_are_floaters(); if(i == xctx->graph_master || !unlocked) { gr->dataset = track_dset; diff --git a/src/draw.c b/src/draw.c index d61aee69..4c6f80cd 100644 --- a/src/draw.c +++ b/src/draw.c @@ -3158,7 +3158,7 @@ static void draw_graph_variables(int wcnt, int wave_color, int n_nodes, int swee static void show_node_measures(int measure_p, double measure_x, double measure_prev_x, const char *bus_msb, int wave_color, int idx, SPICE_DATA **idx_arr, - int n_bits, int n_nodes, const char *ntok, int wcnt, Graph_ctx *gr) + int n_bits, int n_nodes, const char *ntok, int wcnt, Graph_ctx *gr, xRect *r, double cursor1) { char tmpstr[1024]; double yy; @@ -3179,7 +3179,8 @@ static void show_node_measures(int measure_p, double measure_x, double measure_p double diffx; char *fmt1, *fmt2; double yy1; - double cursor1 = gr->logx ? mylog10(xctx->graph_cursor1_x) : xctx->graph_cursor1_x; + + if( gr->logx) cursor1 = mylog10(cursor1); yy1 = xctx->raw->values[idx][measure_p-1]; diffy = xctx->raw->values[idx][measure_p] - yy1; diffx = measure_x - measure_prev_x; @@ -3594,11 +3595,35 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) char *custom_rawfile = NULL; /* "rawfile" attr. set in graph: load and switch to specified raw */ char *sim_type = NULL; int save_extra_idx = -1; - + double cursor1, cursor2; + + if(xctx->only_probes) return; if(RECT_OUTSIDE( gr->sx1, gr->sy1, gr->sx2, gr->sy2, xctx->areax1, xctx->areay1, xctx->areax2, xctx->areay2)) return; + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor1_x", 0); + if(s[0]) { + cursor1 = atof(s); + } else { + cursor1 = xctx->graph_cursor1_x; + } + } else { + cursor1 = xctx->graph_cursor1_x; + } + + if(r->flags & 4) { /* private_cursor */ + const char *s = get_tok_value(r->prop_ptr, "cursor2_x", 0); + if(s[0]) { + cursor2 = atof(s); + } else { + cursor2 = xctx->graph_cursor2_x; + } + } else { + cursor2 = xctx->graph_cursor2_x; + } + #if 0 dbg(0, "draw_graph(): window: %d %d %d %d\n", xctx->areax1, xctx->areay1, xctx->areax2, xctx->areay2); dbg(0, "draw_graph(): graph: %g %g %g %g\n", gr->sx1, gr->sy1, gr->sx2, gr->sy2); @@ -3824,9 +3849,11 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) if(dataset == -1 || dataset == sweepvar_wrap) { /* cursor1: show measurements on nodes in graph */ if(flags & 2 && measure_p == -1 && cnt) { - double cursor1 = xctx->graph_cursor1_x; - if(gr->logx) cursor1 = mylog10(cursor1); - if(XSIGN(xx - cursor1) != XSIGN(prev_x - cursor1)) { + double curs1; + + curs1 = cursor1; + if(gr->logx) curs1 = mylog10(cursor1); + if(XSIGN(xx - curs1) != XSIGN(prev_x - curs1)) { measure_p = p; measure_x = xx; measure_prev_x = prev_x; @@ -3862,7 +3889,7 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) bbox(END, 0.0, 0.0, 0.0, 0.0); if(flags & 2 && measure_p != -1) show_node_measures(measure_p, measure_x, measure_prev_x, bus_msb, wave_color, - idx, idx_arr, n_bits, n_nodes, ntok_copy, wcnt, gr); + idx, idx_arr, n_bits, n_nodes, ntok_copy, wcnt, gr, r, cursor1); my_free(_ALLOC_ID_, &point); if(idx_arr) my_free(_ALLOC_ID_, &idx_arr); @@ -3895,8 +3922,6 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) * bbox(SET_INSIDE, 0.0, 0.0, 0.0, 0.0); */ if(flags & 8) { - double cursor1 = xctx->graph_cursor1_x; - double cursor2 = xctx->graph_cursor2_x; /* cursor1 */ if((flags & 2)) { draw_cursor(cursor1, cursor2, 1, gr); diff --git a/src/xschem.tcl b/src/xschem.tcl index 81aa55a5..e236bea7 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -2565,7 +2565,7 @@ proc graph_update_nodelist {} { proc graph_fill_listbox {} { global graph_selected - set retval [.graphdialog.top.search get] + set retval [.graphdialog.center.left.search get] set autoload [uplevel #0 {subst [xschem getprop rect 2 $graph_selected autoload 2]}] set rawfile [uplevel #0 {subst [xschem getprop rect 2 $graph_selected rawfile 2]}] @@ -2649,12 +2649,27 @@ proc raw_is_loaded {rawfile type} { } return $loaded } +proc set_rect_flags {graph_selected} { + global graph_private_cursor graph_unlocked + + if {$graph_private_cursor} { + set private_cursor {,private_cursor} + } else { + set private_cursor {} + } + if {$graph_unlocked} { + set unlocked {,unlocked} + } else { + set unlocked {} + } + xschem setprop rect 2 $graph_selected flags "graph$unlocked$private_cursor" fast + } proc graph_edit_properties {n} { global graph_bus graph_sort graph_digital graph_selected graph_sel_color global graph_unlocked graph_schname graph_logx graph_logy cadlayers graph_rainbow global graph_linewidth_mult graph_change_done has_x graph_dialog_default_geometry - global graph_autoload + global graph_autoload graph_private_cursor if { ![info exists has_x]} {return} set graph_change_done 0 @@ -2680,6 +2695,12 @@ proc graph_edit_properties {n} { set graph_digital 0 if {[xschem getprop rect 2 $n digital] == 1} {set graph_digital 1} + if {[regexp {private_cursor} [xschem getprop rect 2 $n flags]]} { + set graph_private_cursor 1 + } else { + set graph_private_cursor 0 + } + if {[regexp {unlocked} [xschem getprop rect 2 $n flags]]} { set graph_unlocked 1 } else { @@ -2709,7 +2730,8 @@ proc graph_edit_properties {n} { pack .graphdialog.bottom -side top -fill x # center-left frame - label .graphdialog.center.left.lab1 -text {Sig. list} + label .graphdialog.center.left.labsearch -text Search: + entry .graphdialog.center.left.search -width 10 button .graphdialog.center.left.add -text Add -command { graph_add_nodes; graph_update_nodelist } @@ -2719,16 +2741,15 @@ proc graph_edit_properties {n} { scrollbar .graphdialog.center.left.yscroll -command {.graphdialog.center.left.list1 yview} scrollbar .graphdialog.center.left.xscroll -orient horiz -command {.graphdialog.center.left.list1 xview} - grid .graphdialog.center.left.lab1 .graphdialog.center.left.add - grid .graphdialog.center.left.list1 - .graphdialog.center.left.yscroll -sticky nsew - grid .graphdialog.center.left.xscroll - -sticky nsew + grid .graphdialog.center.left.labsearch .graphdialog.center.left.search .graphdialog.center.left.add + grid .graphdialog.center.left.list1 - - .graphdialog.center.left.yscroll -sticky nsew + grid .graphdialog.center.left.xscroll - - -sticky nsew grid rowconfig .graphdialog.center.left 0 -weight 0 grid rowconfig .graphdialog.center.left 1 -weight 1 -minsize 2c grid columnconfig .graphdialog.center.left 0 -weight 1 grid columnconfig .graphdialog.center.left 1 -weight 1 # center right frame - label .graphdialog.center.right.lab1 -text { Signals } checkbutton .graphdialog.center.right.autoload -text {Auto load} -variable graph_autoload \ -command { if {$graph_autoload} { @@ -2772,7 +2793,7 @@ proc graph_edit_properties {n} { } - entry .graphdialog.center.right.rawentry -width 30 + entry .graphdialog.center.right.rawentry -width 20 button .graphdialog.center.right.rawbut -text {Raw file:} -command { regsub {/$} $netlist_dir {} netlist_dir .graphdialog.center.right.rawentry delete 0 end @@ -2801,12 +2822,12 @@ proc graph_edit_properties {n} { scrollbar .graphdialog.center.right.yscroll -command {.graphdialog.center.right.text1 yview} scrollbar .graphdialog.center.right.xscroll -orient horiz -command {.graphdialog.center.right.text1 xview} - grid .graphdialog.center.right.lab1 .graphdialog.center.right.autoload \ + grid .graphdialog.center.right.autoload \ .graphdialog.center.right.lab2 .graphdialog.center.right.list \ .graphdialog.center.right.rawbut .graphdialog.center.right.rawentry - grid configure .graphdialog.center.right.rawentry -sticky ew - grid .graphdialog.center.right.text1 - - - - - .graphdialog.center.right.yscroll -sticky nsew - grid .graphdialog.center.right.xscroll - - - - - - -sticky ew + grid .graphdialog.center.right.text1 - - - - .graphdialog.center.right.yscroll -sticky nsew + grid .graphdialog.center.right.xscroll - - - - - -sticky ew grid rowconfig .graphdialog.center.right 0 -weight 0 grid rowconfig .graphdialog.center.right 1 -weight 1 -minsize 3c grid rowconfig .graphdialog.center.right 2 -weight 0 @@ -2814,9 +2835,8 @@ proc graph_edit_properties {n} { grid columnconfig .graphdialog.center.right 1 -weight 0 grid columnconfig .graphdialog.center.right 2 -weight 0 grid columnconfig .graphdialog.center.right 3 -weight 0 - grid columnconfig .graphdialog.center.right 4 -weight 0 - grid columnconfig .graphdialog.center.right 5 -weight 1 - grid columnconfig .graphdialog.center.right 6 -weight 0 + grid columnconfig .graphdialog.center.right 4 -weight 1 + grid columnconfig .graphdialog.center.right 5 -weight 0 # bottom frame button .graphdialog.bottom.cancel -text Cancel -command { @@ -2833,11 +2853,7 @@ proc graph_edit_properties {n} { xschem setprop rect 2 $graph_selected x2 [.graphdialog.top3.xmax get] fast xschem setprop rect 2 $graph_selected y1 [.graphdialog.top3.ymin get] fast xschem setprop rect 2 $graph_selected y2 [.graphdialog.top3.ymax get] fast - if {$graph_unlocked} { - xschem setprop rect 2 $graph_selected flags {graph,unlocked} fast - } else { - xschem setprop rect 2 $graph_selected flags {graph} fast - } + set_rect_flags $graph_selected } set graph_dialog_default_geometry [winfo geometry .graphdialog] destroy .graphdialog @@ -2852,11 +2868,7 @@ proc graph_edit_properties {n} { xschem setprop rect 2 $graph_selected x2 [.graphdialog.top3.xmax get] fast xschem setprop rect 2 $graph_selected y1 [.graphdialog.top3.ymin get] fast xschem setprop rect 2 $graph_selected y2 [.graphdialog.top3.ymax get] fast - if {$graph_unlocked} { - xschem setprop rect 2 $graph_selected flags {graph,unlocked} fast - } else { - xschem setprop rect 2 $graph_selected flags {graph} fast - } + set_rect_flags $graph_selected } } @@ -2916,15 +2928,6 @@ proc graph_edit_properties {n} { xschem draw_graph $graph_selected } - label .graphdialog.top2.labdset -text { Dataset} - entry .graphdialog.top2.dset -width 4 - bind .graphdialog.top2.dset { - graph_push_undo - xschem setprop rect 2 $graph_selected dataset [.graphdialog.top2.dset get] - xschem draw_graph $graph_selected - } - .graphdialog.top2.dset insert 0 [xschem getprop rect 2 $graph_selected dataset] - label .graphdialog.top2.labsweep -text { Sweep} entry .graphdialog.top2.sweep -width 10 @@ -2967,13 +2970,10 @@ proc graph_edit_properties {n} { .graphdialog.top2.labdivy .graphdialog.top2.divy \ .graphdialog.top2.labsubdivx .graphdialog.top2.subdivx \ .graphdialog.top2.labsubdivy .graphdialog.top2.subdivy \ - .graphdialog.top2.labdset .graphdialog.top2.dset \ .graphdialog.top2.labsweep -side left pack .graphdialog.top2.sweep -side left -fill x -expand yes # top frame - label .graphdialog.top.labsearch -text Search: - entry .graphdialog.top.search -width 10 checkbutton .graphdialog.top.bus -text Bus -padx 2 -variable graph_bus checkbutton .graphdialog.top.incr -text {Incr. sort} -variable graph_sort -indicatoron 1 \ -command graph_fill_listbox @@ -2997,14 +2997,22 @@ proc graph_edit_properties {n} { } else { .graphdialog.top.lwe insert 0 $custom_lw } - checkbutton .graphdialog.top.unlocked -text {Unlock. X axis} -variable graph_unlocked \ - -command { - if {$graph_unlocked} { - xschem setprop rect 2 $graph_selected flags {graph,unlocked} fast - } else { - xschem setprop rect 2 $graph_selected flags {graph} fast - } + + label .graphdialog.top.labdset -text { Dataset} + entry .graphdialog.top.dset -width 4 + bind .graphdialog.top.dset { + graph_push_undo + xschem setprop rect 2 $graph_selected dataset [.graphdialog.top.dset get] + xschem draw_graph $graph_selected } + .graphdialog.top.dset insert 0 [xschem getprop rect 2 $graph_selected dataset] + + checkbutton .graphdialog.top.priv_curs -text {Priv. Cursor} -variable graph_private_cursor \ + -command {set_rect_flags $graph_selected } + + checkbutton .graphdialog.top.unlocked -text {Unlock. X axis} -variable graph_unlocked \ + -command {set_rect_flags $graph_selected } + checkbutton .graphdialog.top.dig -text {Digital} -variable graph_digital -indicatoron 1 \ -command { if { [xschem get schname] eq $graph_schname } { @@ -3062,20 +3070,16 @@ proc graph_edit_properties {n} { } - button .graphdialog.top.clear -text Clear -padx 2 -command { - .graphdialog.top.search delete 0 end - graph_fill_listbox - } - pack .graphdialog.top.labsearch -side left - pack .graphdialog.top.search -side left -expand yes -fill x - pack .graphdialog.top.clear -side left pack .graphdialog.top.incr -side left pack .graphdialog.top.bus -side left + pack .graphdialog.top.priv_curs -side left pack .graphdialog.top.dig -side left pack .graphdialog.top.unlocked -side left pack .graphdialog.top.rainbow -side left pack .graphdialog.top.lw -side left pack .graphdialog.top.lwe -side left + pack .graphdialog.top.labdset -side left + pack .graphdialog.top.dset -side left .graphdialog.top3.ymin insert 0 [xschem getprop rect 2 $graph_selected y1] .graphdialog.top3.ymax insert 0 [xschem getprop rect 2 $graph_selected y2] .graphdialog.top3.xmin insert 0 [xschem getprop rect 2 $graph_selected x1] @@ -3141,7 +3145,7 @@ proc graph_edit_properties {n} { .graphdialog.top3.xlabmag .graphdialog.top3.xmag .graphdialog.top3.ylabmag .graphdialog.top3.ymag \ -fill x -expand yes -side left # binding - bind .graphdialog.top.search { + bind .graphdialog.center.left.search { graph_fill_listbox } bind .graphdialog.center.left.list1 { @@ -6955,7 +6959,7 @@ set tctx::global_list { enter_text_default_geometry filetmp fix_broken_tiled_fill flat_netlist fullscreen gaw_fd gaw_tcp_address graph_autoload graph_bus graph_change_done graph_digital graph_dialog_default_geometry graph_linewidth_mult graph_logx - graph_logy graph_rainbow graph_schname graph_sel_color graph_sel_wave + graph_logy graph_private_cursor graph_rainbow graph_schname graph_sel_color graph_sel_wave graph_selected graph_sort graph_unlocked hide_empty_graphs hide_symbols tctx::hsize incr_hilight incremental_select infowindow_text intuitive_interface keep_symbols launcher_default_program @@ -8445,6 +8449,7 @@ set text_tabs_setting {-tabs "[expr {$tabstop * [font measure TkFixedFont 0]}] l # selected graph user is editing attributes with graph GUI set_ne graph_bus 0 +set_ne graph_private_cursor 0 set_ne graph_logx 0 set_ne graph_logy 0 set_ne graph_rainbow 0