Commit Graph

488 Commits

Author SHA1 Message Date
stefan schippers 9a6006c291 fix potential crash on close multiple windows / tabs (destroy_all_tabs(), destroy_all_windows() ) 2025-03-28 13:43:39 +01:00
stefan schippers 1d2bff5f9b cleanup FocusIn / window switching 2025-03-28 13:12:52 +01:00
stefan schippers 5e14ccf5a0 add a missing tclvareval("housekeeping_ctx", NULL); at the end of a new window creation 2025-03-26 02:11:31 +01:00
stefan schippers 31a0712109 remove some redundant operations (housekeeping_ctx) when switching windows contexts for redraw_only 2025-03-23 12:16:01 +01:00
stefan schippers 73a920ea41 xinit.c: eval user_startup_commands after sourcong tcl_files 2025-03-14 18:28:19 +01:00
stefan schippers e789988b05 add `user_startup_commands` variable that may contain tcl code to be executed after any new window creation. Useful to have custom bindings / menu / buttons in all windows. 2025-03-13 20:11:18 +01:00
stefan schippers e1488da407 add `xschem rect gui`, `xschem line gui`, `xschem polygon gui`, `xschem wire gui` to start placement of these objects with 1st point set to mouse coordinates 2025-03-11 20:47:00 +01:00
stefan schippers de6434c941 allow multi-selections when loading a file; limit max line width in change_linewidth() to avoid strange artifacts at extreme zoom-ins 2025-03-09 02:46:58 +01:00
stefan schippers 25db8b8f9a ellipses rendered in ps/pdf export. Do not allow to select objects with mouse button press if a poligon insertion is ongoing. my_fopen() for read mode open, check for regular file. More checks for failed fopen()s. 2025-02-18 02:25:55 +01:00
stefan schippers 1d1ff164fb Merge branch 'master' into ananthchellappa 2025-02-12 00:37:49 +01:00
stefan schippers 2a7a461ace update verilogA example tb_diff_amp.sch 2025-02-11 20:38:17 +01:00
Ananth 66ec47ccfb only vars and fn defs (not calls) and inits added for ortho routing and snap cursor 2025-02-11 11:49:50 -07:00
stefan schippers 2eeeebf715 avoid calling Tcl_GetErrorLine() if tcl version < 8.6 2025-02-11 18:52:24 +01:00
stefan schippers 724869638e fix max size of graph bitmap calculation in svg_embedded_graph() and ps_embedded_graph() 2025-02-10 01:21:22 +01:00
stefan schippers 0b3db90f19 one more argument to translate3() 2025-02-07 14:39:21 +01:00
stefan schippers 0c4cdb3ea1 propagate changed key bindings to new opened windows (in no-tabs mode) 2025-02-06 01:11:11 +01:00
stefan schippers 4db384a671 add eval_expr.y for evaluation of generic math expressions in infix notation 2025-02-05 16:33:23 +01:00
stefan schippers 31a3a00c46 clean up translate() deallocation 2025-01-30 23:33:51 +01:00
stefan schippers eadd991651 reduce calls to find_closest_net_or_symbol_pin() in draw_crosshair() 2025-01-30 03:47:13 +01:00
stefan schippers bce1e652c6 refactored xctx->y_[12] to xctx->y[12] 2025-01-26 17:49:47 +01:00
stefan schippers 8086b5581e redraw_w_a_l_r_p_z_rubbers(): include zoom_rectangle(RUBBER), only execute if (snapped) coordinates changed, draw_crosshair(): only execute if (snapped) coordinates changed, find_closest_net_or_symbol_pin() is moved into draw_crosshair() so its calls are also minimized, do not allow z (zoom rectangle) if pending STARTWIRE, STARTLINE etc are in progress. 2025-01-26 15:19:22 +01:00
stefan schippers dad3b78931 Add a line number in error report if failed sourced tcl scripts 2025-01-25 19:39:53 +01:00
stefan schippers 99b0bba5b8 if big_grid_points is not set draw always thin axes and mouse crosshairs; dashed axes 2025-01-21 12:34:14 +01:00
stefan schippers 4f31c024c8 add option -noalert to `xschem netlist` command, update `proc cellview` 2025-01-19 23:29:41 +01:00
stefan schippers 7d6c3f4764 destroy_all_tabs() do a final redraw to avoid inconsistent screen after some tab removals 2025-01-15 03:11:12 +01:00
stefan schippers ef5d0e1b96 str_replace(): add parameter to specify number of substituitions (or all); replaced atof_spice() with atof_eng() in various parts related to numbers that do not come from spice netlists; fix numerical setting of cursors if log scale is set (wrong preset was shown); make wave labels in graph scale with gr->magx as X-axis labels; fix scaling roundoff issues in dtoa_eng(); add new `@spice_get_node <spice_node> ` token (where spice_node may contain @variables) in symbol texts to display indicated spice node value. Does not use TCL, thus faster and less "quoting hell" problems 2025-01-10 01:52:54 +01:00
stefan schippers 15738bbf51 better drag waves in x direction (continue even if dragging outside of graph) 2025-01-07 12:03:49 +01:00
stefan schippers fd5fec64aa make uninstall: remove empty directories (share/xschem and share/doc/xschem); make command `xschem help` work also if running in src/ directory; use XSCHEM_SHAREDIR shell variable (if defined and directory existing), else set XCSCHEM_SHAREDIR to `pwd` if started from src/ dir, else set compile set XSCHEM_SHAREDIR. xschemrc can override this XSCHEM_SHAREDIR setting. 2025-01-05 01:29:04 +01:00
stefan schippers 69a23355fb refactor some debug print messages for NULL strings 2025-01-04 11:33:58 +01:00
stefan schippers b23b162f2c rewritten the menu system using a menubar vs the menubuttons 2024-12-31 03:51:05 +01:00
stefan schippers 724c67435c updates in traversal proc, fix searching for xschem_man.html if clicking the link into the About dialog and running xschem from the src/ dir. 2024-12-30 01:04:40 +01:00
stefan schippers 6b75aa62aa avoid a redundant set_modify(-1) in review_window("destroy"...) 2024-12-17 01:07:36 +01:00
stefan schippers 5bc194f3a5 separated undo_initialized and mem_undo_initialized, so they can be used more interchangeably 2024-12-16 12:14:11 +01:00
stefan schippers f73cf30452 added a fix in draw_graph_points() to avoid waves to be drawn outside of the graph box container on Windows, where there is no working XSetCLipRectangles() 2024-12-07 00:56:04 +01:00
stefan schippers 20359ed43e update license info. Remove unneeded newline saving in version line of .sch/.sym files, remove c89 flag based on lib versions 2024-11-12 20:23:18 +01:00
stefan schippers b7e39700d4 add ability to read ASCII raw files 2024-11-06 11:59:00 +01:00
stefan schippers 92c99c10f9 get_additional_symbols(): some sanity checks, descend_schematic() more options in set_title argument (avoid set title, avoid processing pins/nets, avoid descending into i-th xdec[3] instance, descend as a whole xdec[3:0], add `xschem get_additional_symbols what` command, allow `xschem get_sch_from_sym -1 inv.sym` to get schematic associated with symbol. hier_psprint(): avoid printing / listing duplicate schematics, improved traversal.tcl 2024-11-05 13:59:37 +01:00
stefan schippers a79e4304d9 draw_image(): do RECTORDER() before taking *x1, *y1 2024-09-23 15:57:32 +02:00
stefan schippers 1dd3e28b32 remove memory tracking alloc IDs 2024-09-06 22:27:05 +02:00
stefan schippers 391464bab9 fix another small memory leak due to tclvareval("xschem exit...")--> use tcleval() 2024-09-06 22:19:36 +02:00
stefan schippers 882f7f7434 fix memory leaks introduced since introduction of my_expand() 2024-09-06 18:33:09 +02:00
stefan schippers d40a17df64 correctly set top_path and current_win_path in preview_window() when calling alloc_xschem_data(), don`t use fake window paths (alert_ proc uses parent win path) 2024-08-31 09:00:48 +02:00
stefan schippers 2b94e845c0 fix a bug in preview symbol displaying when inserting components. Toplevel .load widget was destroyed before cleaning preview data in preview_window(), so after some insertion preview was no more displayed. 2024-08-31 08:07:17 +02:00
stefan schippers 89eb02f188 add autoload checkbutton in graph properties to automatically load or not custom graph-specified raw files 2024-06-23 15:59:22 +02:00
stefan schippers efdb6b64ce removed previously added use_pwd_instead_of_current_dirname tcl variable: now a `.` in search path is always assumed to be [pwd] and not the directory of the currently opened schematic. This will hopefully fix an endless list of user complains when using symbols from dirs not listed in XSCHEM_LIBRARY_PATH. 2024-06-11 00:24:30 +02:00
stefan schippers 087aa8c3b9 if a full path is given with -N set netlist file name as well as destination path; allow right click waveforms to set to bold even if cursors are drawn 2024-05-27 08:03:52 +02:00
stefan schippers 8067f58b43 uniquify /tmp/xschem_web (--> /tmp/xschem_web_xxxxxx), also handle like /tmp/xschem_undo_xxxxx, create on startup and remove on exit. 2024-05-20 19:00:33 +02:00
stefan schippers be06ed50cb if top level schematic has an associated symbol (.sym) file ensure their ports match, otherwise issue an error. if netlisting fails return non zero exit code if netlisting from command line 2024-05-09 02:10:45 +02:00
stefan schippers c544c5bd6e xinit.c: test for tcl_interactive existence before testing value 2024-05-02 17:33:43 +02:00
stefan schippers c7bf1300c1 some better code formatting 2024-05-02 17:24:31 +02:00
stefan schippers 6f9ddff72f revert change `do not load XSCHEM_LIBRARY_PATH if options are given on cmdline`. if no file to load is given $XSCHEM_LIBRARY_PATH will be loaded regardless of command line switches 2024-04-30 11:00:37 +02:00
stefan schippers b525252612 preview_window() : BUG 2: test for NULL tkpre_window[i] 2024-04-19 19:17:18 +02:00
stefan schippers c485bcd8a2 preview_window() : BUG: fix order of statements 2024-04-19 19:12:23 +02:00
stefan schippers 34a06d964d preview_window() : allow up to 10 simultaneous preview windows open 2024-04-19 19:05:38 +02:00
stefan schippers 372b21ae07 no load XSCHEM_START_WINDOW if cli options given (2); remove one unneeded var in preview_window() 2024-04-19 17:08:37 +02:00
stefan schippers 6b54542ab4 do not load XSCHEM_LIBRARY_PATH if options are given on cmdline 2024-04-19 13:55:25 +02:00
stefan schippers 00d367ae0c Add xctx->mouse_moved state var to better handle ctrl-clicks (launcher() trigger) 2024-04-18 20:47:06 +02:00
stefan schippers 260256afb9 improve preview_window, to redraw current schematic just use `xschem preview_window draw` (no filename -> use current loaded one) 2024-04-14 23:55:47 +02:00
stefan schippers f88f9f8e2e do not exit is calling xschem with a non existent file on cmdline 2024-04-10 12:08:09 +02:00
stefan schippers 9c5a1a9816 handle cursor drawing in multiple graphs, some with log scale some others without 2024-03-31 13:27:12 +02:00
stefan schippers 61b1c0b368 add `Tools->Grab screen area` function (unix only) 2024-03-20 03:53:56 +01:00
stefan schippers 6416df9733 cleanups in draw_image(), do not decode-reencode jpeg data 2024-03-16 12:50:42 +01:00
stefan schippers bef157aacf More return codes when something goes wrong, like loading failure of a file given on cmdline 2024-03-15 11:56:35 +01:00
stefan schippers 927ef74fe1 include in resetwin() the call to create_memory_cairo_ctx() so it will be correctly set up fro multiple windows 2024-03-12 18:21:28 +01:00
stefan schippers 56af3bf427 cleanup in in-memory cairo_ctx creation for text_bbox() when no X used 2024-03-12 12:46:15 +01:00
stefan schippers e4ef7d4dc1 replace cairo_image_surface_create_for_data with cairo_image_surface_create in create_memory_cairo_ctx 2024-03-12 12:03:53 +01:00
stefan schippers 9b8015b437 in_memory cairo_ctx for better font rendering when no X available 2024-03-12 11:48:18 +01:00
stefan schippers 05c6f4770b cleanup the use of set_netlist_dir(), never use simuldir directly, updated intuitive_interface_cheatsheet 2024-03-10 23:50:38 +01:00
stefan schippers fa3ee72a1c xinit: evaluate simuldir to adjust netlist_dir depending on local_netlist_dir setting, even if no netlist command given on cmdline, so netlist_dir will always point to the right place in the running session 2024-03-10 16:10:36 +01:00
stefan schippers 71b1b52384 fix some unwanted persistency of constrained move (now renamed to constr_mv and moved into xctx struct), not being reset at end of command 2024-03-07 17:48:41 +01:00
stefan schippers 99e2c9e503 various improvements in intuitive_interface and shape point selection 2024-03-05 02:54:35 +01:00
stefan schippers b3a52015f1 add rectangle point editing (vertices can be drag directly) 2024-03-04 16:33:20 +01:00
stefan schippers 7daea289a2 refactored callback() (more sub-functions), some fixes in copy between windows 2024-03-04 14:38:32 +01:00
stefan schippers 77cd3eec56 added intuitive_interface xschemrc and menu option: click and drag to quickly move objects without keyboard commands 2024-03-02 14:15:30 +01:00
stefan schippers 263b72de03 add tcl in addition to sch and sym in default search filter in load_file_dialog 2024-03-01 00:29:23 +01:00
stefan schippers e946a729f8 add ability to click and drag directly polygon/bezier points 2024-03-01 00:12:44 +01:00
stefan schippers f4560a0add bezier shapes can be drawn (polygon with attribute `bezier=1`) 2024-02-29 03:40:08 +01:00
stefan schippers c06a896d4f instance based schematic selection: if instance specified schematic=... not existing use base schematic (symbolname.sch) 2024-02-09 02:37:53 +01:00
stefan schippers 778dd2c0dc recognize integrated_noise, improve `xschem preview_window` command 2024-01-27 11:42:05 +01:00
stefan schippers 38ff460694 added `xschem fill_reset` command to reset fill patterns defined via tcl array pixdata(n) 2024-01-15 15:53:49 +01:00
stefan schippers c46afdc582 add command `xschem fill_type n fill_type` 2024-01-15 00:45:24 +01:00
stefan schippers ac04ce5c55 set tab/window title if xschem invoked with `xschem -n file.sch`. fix poweramp.sch testbench for Xyce sim. 2024-01-11 08:19:25 +01:00
Stefan Schippers cd6deb0bf9 xschem raw_read: allow specifying t1 and t2 to load only a portion of simulation file 2023-12-31 20:33:08 +01:00
stefan schippers ed477b90a5 eps export 2023-12-12 01:14:40 +01:00
stefan schippers 441e27e8ca preserve existing line width when creating new windows / tabs 2023-12-11 18:59:46 +01:00
stefan schippers 1285ba0cd4 while opening a sub-schematic in another window propagate cursora/b/ annotate info 2023-12-09 13:26:18 +01:00
stefan schippers 8c81f629d0 fix a regression introduced by saving/restoring tcl context in preview_window() 2023-12-07 16:02:31 +01:00
stefan schippers 8269eff430 save / restore tcl context when creating / destroying preview window 2023-12-05 18:50:46 +01:00
stefan schippers b9ef032a2a Add SImulation radiobutton for setting local netlist directory as [library]/simulation/[cellname]. Change netlisting directory if `set local_netlist_dir` is set via --tcl cmdline 2023-12-01 14:08:42 +01:00
stefan schippers 37c6229a21 xinit.c: do a `xschem set format lvs_format` if lvs_netlist is set via xschemrc or command line 2023-12-01 12:11:12 +01:00
stefan schippers 83c692caa9 copy between windows: allow to navigate between more than 2 windows 2023-11-28 18:41:38 +01:00
stefan schippers 8d155af82f `Alt-e` does a true descend sub-schematic and opens it in another window 2023-11-20 17:53:28 +01:00
stefan schippers d4cde62870 add draw option in schematic_in_new_window(), create_new_tab(), create_new_window() 2023-11-20 00:12:13 +01:00
stefan schippers 48a9a94ab2 offloaded proc graph_tag_nodes from proc graph_update_nodelist, moved rcode and colors into tctx:: context 2023-11-17 14:05:49 +01:00
stefan schippers ecca0ba2be better swap_windows() function (used when closing a window in multi-window(non-tabbed) interface, resolved_net() recognize global nodes. remove static data from record_global_node(), put in xctx. Remove dead code from translate() (@spice_get_voltage) 2023-11-12 13:01:11 +01:00
stefan schippers ccc5dab228 better wire connection dot sizing at small smap values 2023-11-10 17:43:41 +01:00
stefan schippers 584f88fba1 object iterator, object spatial hash table for all objects. tbu in the future maybe. Fix crashing bug when copying ngspice_probe.sym if annotation is enabled 2023-11-09 13:57:58 +01:00
stefan schippers 75c8376a04 fix draw_crosshair when xctx->semaphore not zero, fix tabs context menu issues with `open schematc/symbol`; set_modify: do not attempt to reconfigure menu buttons (Simulate-Netlist-Waves) if invoked from preview dialog 2023-11-08 22:45:31 +01:00
stefan schippers b51af6422e call simuldir if doing netlist from commandline (xschem -x -r -n -s -q ... ) 2023-11-08 03:46:36 +01:00
stefan schippers d7247d55e6 fix `destroy_all_windows()` not destroying windows in non tabbed interface (late usage of tclresult()) 2023-10-30 02:09:49 +01:00