Commit Graph

67 Commits

Author SHA1 Message Date
Stefan Frederik f138db5aba fix linewidth when done with preview, also avoid to destroy & create main pixmap since it was saved 2020-12-05 04:12:56 +01:00
Stefan Frederik 780b994aeb use short data type for small integer data: rot, flip, dash, bus etc... 2020-12-05 03:16:01 +01:00
Stefan Frederik 29d8b0c3a8 resetwin(1,1,1) instead of resetwin(1,1,0) in preview_window so save_pixmap is reset to correct size when switching back to main window 2020-12-04 02:27:35 +01:00
Stefan Frederik 1268a6faae removed redundant XSetTile in preview_window() 2020-12-04 01:38:48 +01:00
Stefan Frederik 76ef664757 undo data structures into xctx context 2020-12-04 00:30:13 +01:00
Stefan Frederik 2b7e31e0d6 add utility functions to create new schematic window 2020-12-03 23:17:13 +01:00
Stefan Frederik 3732bd8d01 put cairo save surface and context into xctx, faster and smoother preview (avoid unload/load if no filename change) 2020-12-03 18:21:23 +01:00
Stefan Frederik 66a73e4e99 cleanup in preview code 2020-12-03 11:49:29 +01:00
Stefan Frederik 4322101f9b cleanup in preview code 2020-12-03 11:46:00 +01:00
Stefan Frederik 9588a859da cleanup in preview code 2020-12-03 11:42:06 +01:00
Stefan Frederik a64d69ed7a some code refactoring, more globals in xctx context, fixed unnoticed shift-reduce conflict in expandlabel 2020-12-03 04:20:05 +01:00
Stefan Frederik 8902f3b56b more state in xctx context 2020-12-02 19:35:42 +01:00
Stefan Frederik e279262f00 more globals into xctx context struct 2020-12-02 15:10:47 +01:00
Stefan Frederik 08e179e588 better cmdline filename path parsing 2020-12-01 13:25:00 +01:00
Stefan Frederik eda64b7ee1 removed event_reporting feature 2020-11-29 03:27:45 +01:00
Stefan Frederik d93826f61c wrap long lines in source code, set default direction of pins to "B"(idirectional) if not specified in spice netlist (no *.PININFO information) 2020-11-22 00:51:24 +01:00
Stefan Frederik 0d59d01170 allow to pass down to tcl evaluation (via tcleval( ....) wrap) instance parameters: example of a mos transistor : name=m1 w=2 l=0.13 model=net ad="tcleval([expr @W * 0.29])" --> in netlist: m1 d g s b nfet w=2 l=0.13 ... ad=0.58 2020-11-20 18:46:27 +01:00
Stefan Schippers 71fd1bcb68 comments about color handling in source code, set_cairo_color() function 2020-11-19 15:08:40 +01:00
Stefan Schippers bf183f0d20 Option (default now) to export svg images using the svg <text> element. This makes generated SVGs much smaller and in most cases faster to render. 2020-11-18 18:29:14 +01:00
Stefan Schippers 78a82a9bc0 fix regression: ps and svg exports were broken due to enable_layer[] used for enabling selections 2020-11-17 02:17:34 +01:00
Stefan Schippers 61dd4e99b0 better xschem icon: added shapemask for "transparent" background 2020-11-10 13:17:25 +01:00
Stefan Schippers 24dd02b713 Fixed Windows Xschem running from VS2019 without installing Xschem to find (Root)/xschem_library/devices as XSCHEM_LIBRARY_PATH, so that viewing schematics through VS2019 will find all symbols in xschem_library/devices. Moved doc and xschem_library XML files to its own *.wxs. Cleaned up Product.wxs by taking out doc and xschem_library files; fixed spacings in License.rtf; added condition that proper version of Active TCL is required to install 2020-11-07 10:52:50 +01:00
Stefan Schippers 73bab32aa9 __unix__: do simple tilde subst ( ~/ --> /home/user) just in case this was not done by the shell 2020-10-27 22:56:53 +01:00
Stefan Schippers 5706b12ad9 do not execute tcl proc "build_windows" in xinit.c if no X or -x option given 2020-10-27 12:00:34 +01:00
Stefan Schippers b4681b22af aligned linux code to windows: check if preview pixmap != main pixmap before destroying. probably not needed but good practice 2020-10-20 23:34:40 +02:00
Stefan Schippers 7e845db5df exampels/poweramp.sch and examples/cmos_example.sch show how to use dynamuc ngspice simulation data backannotation, optimized fix of previous bbox bug 2020-10-20 19:48:59 +02:00
Stefan Schippers 3e3c1ea671 uniquify malloc IDs 2020-10-17 22:39:52 +02:00
Stefan Schippers 632dbd8931 allow dim background color in "View -> Dim oclors" 2020-10-17 03:47:32 +02:00
Stefan Schippers 8a45e319c9 if xschem is started with -n (netlist) load_schematic will not call tcl proc is_xschem_file to determine if sch or sym type, since command line option has higher priority. reverted back possibility in update_symbol() to have double quotes around name attribute (name="My strange name"). This has toooo many implications everywhere. name attribute must be wihout double quotes, xschem will strip them off if any. 2020-10-17 02:54:42 +02:00
Stefan Schippers 55723e9429 line width is related to the schematic, so it is moved under xctx; removed all integer versions (lw, bus_width) that needed to be kept in sync, created two macros to get the integer values from xctx->lw. main window save_pixmap is preserved when doing a schematic preview in file open dialog, so no need to regenerate its content (with a draw() call) after preview. 2020-10-17 00:53:19 +02:00
Stefan Schippers 9e38fbd173 fix wrong const declaration in save.c 2020-10-16 23:19:20 +02:00
Stefan Schippers f0e6559324 fix: restore modified state (set_modify() ) was done before swicthing back xctx to current schematic 2020-10-16 19:36:21 +02:00
Stefan Schippers 7c757f9803 removed unused set_fill() function 2020-10-16 19:27:19 +02:00
Stefan Schippers aa2a47c5b9 grouping X11 specific global declarations 2020-10-16 19:16:03 +02:00
Stefan Schippers f0f1f9c2f0 optimization in preview function: no un-needed redraw of current schematic; no window title change when previewing xschem files 2020-10-16 18:24:06 +02:00
Stefan Schippers 1c294ce31d preview function now does no more need to save whole schematic on the undo stack, it is just a matter of pointer switching 2020-10-15 18:08:14 +02:00
Stefan Schippers e7928727d6 all xctx context is now a dynamically allocated structure; no observable performace impact 2020-10-15 17:39:21 +02:00
Stefan Schippers 0eb706a67e removed changes in strings due to variable refactoring 2020-10-15 17:05:30 +02:00
Stefan Schippers 6d96c8bd61 move xctx.sch_path free under free_xschem_data() 2020-10-15 16:32:09 +02:00
Stefan Schippers c70aa9b06d update_symbol() do not throw away quotes in name attrs (name="some thing") 2020-10-14 16:02:05 +02:00
Stefan Schippers 5d26115bd2 refactored token.c, differentiate between windows and unix in absolute filename construction in xinit.c 2020-10-14 01:38:51 +02:00
Stefan Schippers 1c2bbc609f added "xschem samefile" command to verify if 2 files are the same entity by comparing inodes, pwd_dir set in xinit.c to $env(PWD) if PWD var is defined as it does not dereference symlinks 2020-10-13 17:51:14 +02:00
Stefan Schippers 8ea275013e updated print_spice_subckt() to reflect updates done in print_spice_element(); abs_sym_path recognize ././././, ./., other strange paths., use $env(PWD) for current_dirname on startup instead of getcwd() if possible, to avoid dereferencing symlinks 2020-10-13 16:23:48 +02:00
Stefan Schippers 6f80fdbf76 fix once again an issue when working in symlinked directories and giving a relative .sch file path on cmdline; clean up print_spice_element(). JL to check if tclgetvar("env(PWD)") works on windows (xinit.c:1435) 2020-10-13 01:07:28 +02:00
Stefan Schippers 64c0abc58e code refactoring (global context in Xschem_ctx), "New Schematic" or "New Symbol" will set netlist_type to "spice" or "symbol" respectively 2020-10-12 13:13:31 +02:00
Stefan Schippers 4d0a3d8f7c allow probing to gaw current in voltage sources in addition to ammeters 2020-10-09 22:19:54 +02:00
Stefan Schippers 644641ed23 Preserve existing text (notably license info) in xschem files under version "v" tag; some code refactoring, removed obsoleted comments 2020-10-09 17:29:04 +02:00
Stefan Schippers 0f61e0fe0f JL fix regression for path resolution on windows, Esc resets manhattan_lines setting 2020-10-07 16:12:33 +02:00
Stefan Schippers a10cb2c429 added warnings (Options -> Show info window) if components are missing a name=... attribute / if symbols are missing a type=... attribute; eliminated usage of tcl "file normalize..." statements to avoid symlink dereferencing (if using symlinked libraries), aligned version/file_version tags in support awk scripts 2020-10-06 16:19:52 +02:00
Stefan Schippers 051b20c014 code formating, use some intermediate variables for code readability, line length limited to 124 chars 2020-10-04 23:55:43 +02:00