diff --git a/doc/xschem_man/intuitive_interface_cheatsheet.svg b/doc/xschem_man/intuitive_interface_cheatsheet.svg index ead8f87f..ed597674 100644 --- a/doc/xschem_man/intuitive_interface_cheatsheet.svg +++ b/doc/xschem_man/intuitive_interface_cheatsheet.svg @@ -1,6423 +1,6420 @@ -INTUITIVE_INTERFACE CHEAT SHEET -D -D -D -D -D -D -D -D -D -D -D -D -(Enable Options → Intuitive Click & Drag interface -or add: `set intuitive_interface 1` in xschemrc file). -Move objects -Move objects -Move objects, -create wires -Move objects, -keep attached -wires -Move objects, -keep attached -wires / stretch -circuit -Shift -Ctrl -Ctrl -Duplicate objects -D -D -D -D -Shift -D -D -Select -and unselect -objects -Shift -D -Alt -Select -Add -Selection -Remove -Selection -D -D -D -Resize wires -Constrained move -horizontal / -vertical -Move components, -create wires, -resize wires -Cut wires -Stretch multiple -shapes -Ctrl -Shift -Accurately position closer -to the wire end to be moved -so it will not be unselected -Move multiple -objects keeping -connections -Ctrl -Alt -Click to select wire, release button -click wire endpoint and drag it away -Ctrl -D -D -D -Ctrl -! -Remove wires -under component -If Shift key is needed for ! -use also Shift -D -Add -Selection -Shift -Move multiple -objects keeping -connections, -adding wires -Ctrl -Shift -Join / Trim wires -& -This wire will not be broken -& -This wire is now -broken -break wires -at instance -pins -! -Shift -+ -The single wire line will be -broken at selected instance pins -Single wire line -D -D -Shift -Select instance -and all connected -wires -Join / Trim wires -Options->Auto join / trim wires to perform this function automatically -Join / Trim wires -This wire is broken -This wire is still broken -This wire is now joined -& -Options->Auto join / trim wires to perform this function automatically -Options->Auto join / trim wires to perform this function automatically -multiple overlayed wires create -unneeded connecting dots -overlayed wires are removed -Ctrl -Ctrl -Shift -you can now -select one of -the cut segments... -... and move it. -D -Component -wiring -Click to -unselect -Click to select -Click one of the -selected objects -and drag it away. -This command will work also on multiple selected objects. -D -D -Press and release 'h' -while keeping left mouse -button pressed. -move will be horizontal only -Press and release 'v' -while keeping left mouse -button pressed. -move will be vertical only -D -Move and -extend -wires -D -D -D -Shift -Rotate / Flip -Shift -R -Shift -R -Shift -R -Shift -R -Shift -F -Shift -V -D -D -D -Shift -R -Selected shapes rotate around mouse pointer -Rotate -D -D -Shift -F -Selected shapes flip around mouse pointer -Flip -D -Rotate around -center point -Alt -R -Same commands are available for -vertical flip (Alt-v) and -horizontal flip (Alt-f) -get existing wire -move -extend -duplicated -Ctrl -Toggle mouse vs -crosshair display -Alt -x -Alt -x -X1 -CODE[5:0] -SIG_IN -VREF -CK -RST -adc -Auto-wiring -of components -X1 -CODE[5:0] -SIG_IN -VREF -CK -RST -adc -SIG_IN -VREF -CK -RST -CODE[5:0] -Shift -H -SIG_IN -VREF -CK -RST -Ctrl -Shift -CODE[5:0] -X1 -CODE[5:0] -SIG_IN -VREF -CK -RST -adc -SIG_IN -VREF -CK -RST -CODE[5:0] -Ctrl -Shift -X1 -CODE[5:0] -SIG_IN -VREF -CK -RST -adc -This represents the mouse -device. Red rectangle -indicates a pressed button -Alt -This represents -a pressed modifier key -R -This represents -a pressed key -This represents the -mouse pointer -Rotate / Flip -wire labels -SIG_IN -SIG_IN -Shift -R -Shift -R -SIG_IN -SIG_IN -Shift -F -SIG_IN -7/0.15/1 -M1 -10/0.15/1 -M1 -4/0.15/1 -M1 -D -D -D -4/0.15/1 -M1 -D -7/0.15/1 -M1 -10/0.15/1 -M1 -4/0.15/1 -M1 -D -D -D -4/0.15/1 -M1 -D -Shift -q -or double click -last element -7/0.3/1 -M1 -7/0.3/1 -M1 -4/0.3/1 -M1 -D -D -D -4/0.3/1 -M1 -D -Select one or multiple -objects using the Shift -key -Only the l=... attribute -is changed. Elements retain -their other attributes. -Edit attributes -SCHEM -Polygon editing -p -Shift -Clicking a polygon point -with Shift key will add -one more point. -Using Ctrl will delete -point -Editing polygon points -Transforming -polygons to -beziers -q -Add attribute: -bezier=1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +INTUITIVE_INTERFACE CHEAT SHEET +D +D +D +D +D +D +D +D +D +D +D +D +(Enable Options → Intuitive Click & Drag interface +or add: `set intuitive_interface 1` in xschemrc file). +Move objects +Move objects +Move objects, +create wires +Move objects, +keep attached +wires +Move objects, +keep attached +wires / stretch +circuit +Shift +Ctrl +Ctrl +Duplicate objects +D +D +D +D +Shift +D +D +Select +and unselect +objects +Shift +D +Alt +Select +Add +Selection +Remove +Selection +D +D +D +Resize wires +Constrained move +horizontal / +vertical +Move components, +create wires, +resize wires +Cut wires +Stretch multiple +shapes +Ctrl +Shift +Accurately position close +to the wire end to be moved +Move multiple +objects keeping +connections +Ctrl +Alt +Click to select wire, release button +click wire endpoint and drag it away +Ctrl +D +D +D +Ctrl +! +Remove wires +under component +If Shift key is needed for ! +use also Shift +D +Add +Selection +Shift +Move multiple +objects keeping +connections, +adding wires +Ctrl +Shift +Join / Trim wires +& +This wire will not be broken +& +This wire is now +broken +break wires +at instance +pins +! +Shift ++ +The single wire line will be +broken at selected instance pins +Single wire line +D +D +Shift +Select instance +and all connected +wires +Join / Trim wires +Options->Auto join / trim wires to perform this function automatically +Join / Trim wires +This wire is broken +This wire is still broken +This wire is now joined +& +Options->Auto join / trim wires to perform this function automatically +Options->Auto join / trim wires to perform this function automatically +multiple overlayed wires create +unneeded connecting dots +overlayed wires are removed +Ctrl +Ctrl +Shift +you can now +select one of +the cut segments... +... and move it. +D +Component +wiring +Click to +unselect +Click to select +Click one of the +selected objects +and drag it away. +This command will work also on multiple selected objects. +D +D +Press and release 'h' +while keeping left mouse +button pressed. +move will be horizontal only +Press and release 'v' +while keeping left mouse +button pressed. +move will be vertical only +D +Move and +extend +wires +D +D +D +Shift +Rotate / Flip +Shift +R +Shift +R +Shift +R +Shift +R +Shift +F +Shift +V +D +D +D +Shift +R +Selected shapes rotate around mouse pointer +Rotate +D +D +Shift +F +Selected shapes flip around mouse pointer +Flip +D +Rotate around +center point +Alt +R +Same commands are available for +vertical flip (Alt-v) and +horizontal flip (Alt-f) +get existing wire +move +extend +duplicated +Ctrl +Toggle mouse vs +crosshair display +Alt +x +Alt +x +X1 +CODE[5:0] +SIG_IN +VREF +CK +RST +adc +Auto-wiring +of components +X1 +CODE[5:0] +SIG_IN +VREF +CK +RST +adc +SIG_IN +VREF +CK +RST +CODE[5:0] +Shift +H +SIG_IN +VREF +CK +RST +Ctrl +Shift +CODE[5:0] +X1 +CODE[5:0] +SIG_IN +VREF +CK +RST +adc +SIG_IN +VREF +CK +RST +CODE[5:0] +Ctrl +Shift +X1 +CODE[5:0] +SIG_IN +VREF +CK +RST +adc +This represents the mouse +device. Red rectangle +indicates a pressed button +Alt +This represents +a pressed modifier key +R +This represents +a pressed key +This represents the +mouse pointer +Rotate / Flip +wire labels +SIG_IN +SIG_IN +Shift +R +Shift +R +SIG_IN +SIG_IN +Shift +F +SIG_IN +7/0.15/1 +M1 +10/0.15/1 +M1 +4/0.15/1 +M1 +D +D +D +4/0.15/1 +M1 +D +7/0.15/1 +M1 +10/0.15/1 +M1 +4/0.15/1 +M1 +D +D +D +4/0.15/1 +M1 +D +Shift +q +or double click +last element +7/0.3/1 +M1 +7/0.3/1 +M1 +4/0.3/1 +M1 +D +D +D +4/0.3/1 +M1 +D +Select one or multiple +objects using the Shift +key +Only the l=... attribute +is changed. Elements retain +their other attributes. +Edit attributes +SCHEM +Polygon editing +p +Shift +Clicking a polygon point +with Shift key will add +one more point. +Using Ctrl will delete +point +Editing polygon points +Transforming +polygons to +beziers +q +Add attribute: +bezier=1 diff --git a/src/actions.c b/src/actions.c index b80f9f9a..5eecc23b 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2781,7 +2781,7 @@ void zoom_full(int dr, int sel, int flags, double shrink) xctx->cadhalfdotsize = CADHALFDOTSIZE * (cs < 20. ? cs : 20.) / 10.; if(dr && has_x) { draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } } @@ -2797,7 +2797,7 @@ void view_zoom(double z) change_linewidth(-1.); draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } void view_unzoom(double z) @@ -2818,7 +2818,7 @@ void view_unzoom(double z) } change_linewidth(-1.); draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } void set_viewport_size(int w, int h, double lw) @@ -2900,7 +2900,7 @@ void zoom_rectangle(int what) xctx->mooz = 1 / xctx->zoom; change_linewidth(-1.); draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); dbg(1, "zoom_rectangle(): coord: %.16g %.16g %.16g %.16g zoom=%.16g\n", xctx->nl_x1, xctx->nl_y1, xctx->mousex_snap, xctx->mousey_snap, xctx->zoom); } diff --git a/src/callback.c b/src/callback.c index 8ce7412c..5023ac7e 100644 --- a/src/callback.c +++ b/src/callback.c @@ -74,7 +74,7 @@ static int waves_selected(int event, KeySym key, int state, int button) if(! (xctx->ui_state & GRAPHPAN) ) { xctx->graph_master = i; } - if(draw_xhair) draw_crosshair(1); /* remove crosshair, re-enable mouse cursor */ + if(draw_xhair) draw_crosshair(1, 0); /* remove crosshair, re-enable mouse cursor */ tclvareval(xctx->top_path, ".drw configure -cursor tcross" , NULL); break; } @@ -95,11 +95,18 @@ static int waves_selected(int event, KeySym key, int state, int button) return is_inside; } -void redraw_w_a_l_r_p_rubbers(void) +/* do nothing if coordinates not changed unless force is given */ +void redraw_w_a_l_r_p_z_rubbers(int force) { + double mx = xctx->mousex_snap; + double my = xctx->mousey_snap; + + if(!force && xctx->mousex_snap == xctx->prev_rubberx && xctx->mousey_snap == xctx->prev_rubbery) return; + + if(xctx->ui_state & STARTZOOM) zoom_rectangle(RUBBER); if(xctx->ui_state & STARTWIRE) { - if(xctx->constr_mv == 1) xctx->mousey_snap = xctx->my_double_save; - if(xctx->constr_mv == 2) xctx->mousex_snap = xctx->mx_double_save; + if(xctx->constr_mv == 1) my = xctx->my_double_save; + if(xctx->constr_mv == 2) mx = xctx->mx_double_save; if(tclgetboolvar("orthogonal_wiring")) { new_wire(RUBBER|CLEAR, xctx->mousex_snap, xctx->mousey_snap); /* Origin shift the cartesian coordinate p2(x2,y2) w.r.t. p1(x1,y1) */ @@ -111,24 +118,26 @@ void redraw_w_a_l_r_p_rubbers(void) xctx->manhattan_lines = 2; } } - new_wire(RUBBER, xctx->mousex_snap, xctx->mousey_snap); + new_wire(RUBBER, mx, my); } if(xctx->ui_state & STARTARC) { - if(xctx->constr_mv == 1) xctx->mousey_snap = xctx->my_double_save; - if(xctx->constr_mv == 2) xctx->mousex_snap = xctx->mx_double_save; - new_arc(RUBBER, 0, xctx->mousex_snap, xctx->mousey_snap); + if(xctx->constr_mv == 1) my = xctx->my_double_save; + if(xctx->constr_mv == 2) mx = xctx->mx_double_save; + new_arc(RUBBER, 0, mx, my); } if(xctx->ui_state & STARTLINE) { - if(xctx->constr_mv == 1) xctx->mousey_snap = xctx->my_double_save; - if(xctx->constr_mv == 2) xctx->mousex_snap = xctx->mx_double_save; - new_line(RUBBER, xctx->mousex_snap, xctx->mousey_snap); + if(xctx->constr_mv == 1) my = xctx->my_double_save; + if(xctx->constr_mv == 2) mx = xctx->mx_double_save; + new_line(RUBBER, mx, my); } - if(xctx->ui_state & STARTRECT) new_rect(RUBBER,xctx->mousex_snap, xctx->mousey_snap); + if(xctx->ui_state & STARTRECT) new_rect(RUBBER,mx, my); if(xctx->ui_state & STARTPOLYGON) { - if(xctx->constr_mv == 1) xctx->mousey_snap = xctx->my_double_save; - if(xctx->constr_mv == 2) xctx->mousex_snap = xctx->mx_double_save; - new_polygon(RUBBER, xctx->mousex_snap, xctx->mousey_snap); + if(xctx->constr_mv == 1) my = xctx->my_double_save; + if(xctx->constr_mv == 2) mx = xctx->mx_double_save; + new_polygon(RUBBER, mx, my); } + xctx->prev_rubberx = xctx->mousex_snap; + xctx->prev_rubbery = xctx->mousey_snap; } /* resets UI state, unselect all and abort any pending operation */ @@ -141,7 +150,7 @@ void abort_operation(void) if(xctx->last_command && xctx->ui_state & (STARTWIRE | STARTLINE)) { if(xctx->ui_state & STARTWIRE) new_wire(RUBBER|CLEAR, xctx->mousex_snap, xctx->mousey_snap); if(xctx->ui_state & STARTLINE) new_line(RUBBER|CLEAR, xctx->mousex_snap, xctx->mousey_snap); - if(tclgetboolvar("draw_crosshair")) draw_crosshair(2); + if(tclgetboolvar("draw_crosshair")) draw_crosshair(2, 0); xctx->ui_state = 0; return; } @@ -221,7 +230,7 @@ static void start_wire(double mx, double my) if(tclgetboolvar("orthogonal_wiring") && !tclgetboolvar("constr_mv")){ xctx->constr_mv = xctx->manhattan_lines; new_wire(CLEAR, mx, my); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } if(xctx->constr_mv != 2) { xctx->mx_double_save = mx; @@ -1353,19 +1362,27 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int return 0; } -/* what == 3 : delete and draw - * what == 1 : delete - * what == 2 : draw */ -void draw_crosshair(int what) +/* what == 3 (+4) : delete and draw (force) + * what == 1 (+4) : delete (force) + * what == 2 (+4) : draw (force) + * what == 4 : force (re)clear and/or (re)draw even if on same point */ +void draw_crosshair(int what, int state) { int sdw, sdp; int xhair_size = tclgetintvar("crosshair_size"); + double mx, my; dbg(1, "draw_crosshair(): what=%d\n", what); sdw = xctx->draw_window; sdp = xctx->draw_pixmap; if(!xctx->mouse_inside) return; - + mx = xctx->mousex_snap; + my = xctx->mousey_snap; + if( ( (xctx->ui_state & (MENUSTART | STARTWIRE) ) || xctx->ui_state == 0 ) && + (state == ShiftMask) ) { + find_closest_net_or_symbol_pin(xctx->mousex, xctx->mousey, &mx, &my); + } + if(!(what & 4) && mx == xctx->prev_crossx && my == xctx->prev_crossy) return; xctx->draw_pixmap = 0; xctx->draw_window = 1; if(what & 1) { /* delete previous */ @@ -1429,37 +1446,39 @@ void draw_crosshair(int what) if(what & 2) { /* draw new */ if(xhair_size) { draw_xhair_line(xctx->gc[xctx->crosshair_layer], xhair_size, - X_TO_SCREEN(xctx->mousex_snap) - xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) - xhair_size, - X_TO_SCREEN(xctx->mousex_snap) + xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) - xhair_size); + X_TO_SCREEN(mx) - xhair_size, + Y_TO_SCREEN(my) - xhair_size, + X_TO_SCREEN(mx) + xhair_size, + Y_TO_SCREEN(my) - xhair_size); draw_xhair_line(xctx->gc[xctx->crosshair_layer], xhair_size, - X_TO_SCREEN(xctx->mousex_snap) - xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) + xhair_size, - X_TO_SCREEN(xctx->mousex_snap) + xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) + xhair_size); + X_TO_SCREEN(mx) - xhair_size, + Y_TO_SCREEN(my) + xhair_size, + X_TO_SCREEN(mx) + xhair_size, + Y_TO_SCREEN(my) + xhair_size); draw_xhair_line(xctx->gc[xctx->crosshair_layer], xhair_size, - X_TO_SCREEN(xctx->mousex_snap) - xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) - xhair_size, - X_TO_SCREEN(xctx->mousex_snap) - xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) + xhair_size); + X_TO_SCREEN(mx) - xhair_size, + Y_TO_SCREEN(my) - xhair_size, + X_TO_SCREEN(mx) - xhair_size, + Y_TO_SCREEN(my) + xhair_size); draw_xhair_line(xctx->gc[xctx->crosshair_layer], xhair_size, - X_TO_SCREEN(xctx->mousex_snap) + xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) - xhair_size, - X_TO_SCREEN(xctx->mousex_snap) + xhair_size, - Y_TO_SCREEN(xctx->mousey_snap) + xhair_size); + X_TO_SCREEN(mx) + xhair_size, + Y_TO_SCREEN(my) - xhair_size, + X_TO_SCREEN(mx) + xhair_size, + Y_TO_SCREEN(my) + xhair_size); } else { /* full screen span xhair */ draw_xhair_line(xctx->gc[xctx->crosshair_layer], xhair_size, - xctx->areax1, Y_TO_SCREEN(xctx->mousey_snap), - xctx->areax2, Y_TO_SCREEN(xctx->mousey_snap)); + xctx->areax1, Y_TO_SCREEN(my), + xctx->areax2, Y_TO_SCREEN(my)); draw_xhair_line(xctx->gc[xctx->crosshair_layer], xhair_size, - X_TO_SCREEN(xctx->mousex_snap), xctx->areay1, - X_TO_SCREEN(xctx->mousex_snap), xctx->areay2); + X_TO_SCREEN(mx), xctx->areay1, + X_TO_SCREEN(mx), xctx->areay2); } } if(what) draw_selection(xctx->gc[SELLAYER], 0); - xctx->prev_crossx = xctx->mousex_snap; - xctx->prev_crossy = xctx->mousey_snap; + if(what & 2) { + xctx->prev_crossx = mx; + xctx->prev_crossy = my; + } xctx->draw_window = sdw; xctx->draw_pixmap = sdp; @@ -1485,19 +1504,19 @@ void draw_snap_cursor(int what) if(what & 1) { if(fix_broken_tiled_fill || !_unix) { MyXCopyArea(display, xctx->save_pixmap, xctx->window, xctx->gc[0], - (int)X_TO_SCREEN(prev_x) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size, - (int)Y_TO_SCREEN(prev_y) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size, - 4 * INT_WIDTH(xctx->lw) + 4 * snapcursor_size, - 4 * INT_WIDTH(xctx->lw) + 4 * snapcursor_size, - (int)X_TO_SCREEN(prev_x) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size, - (int)Y_TO_SCREEN(prev_y) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size); + (int)X_TO_SCREEN(prev_x) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size, + (int)Y_TO_SCREEN(prev_y) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size, + 2 * INT_WIDTH(xctx->lw) + 2 * snapcursor_size, + 2 * INT_WIDTH(xctx->lw) + 2 * snapcursor_size, + (int)X_TO_SCREEN(prev_x) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size, + (int)Y_TO_SCREEN(prev_y) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size); MyXCopyArea(display, xctx->save_pixmap, xctx->window, xctx->gc[0], - (int)X_TO_SCREEN(prev_x) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size, - (int)Y_TO_SCREEN(prev_y) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size, - 4 * INT_WIDTH(xctx->lw) + 4 * snapcursor_size, - 4 * INT_WIDTH(xctx->lw) + 4 * snapcursor_size, - (int)X_TO_SCREEN(prev_x) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size, - (int)Y_TO_SCREEN(prev_y) - 2 * INT_WIDTH(xctx->lw) - snapcursor_size); + (int)X_TO_SCREEN(prev_x) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size, + (int)Y_TO_SCREEN(prev_y) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size, + 2 * INT_WIDTH(xctx->lw) + 2 * snapcursor_size, + 2 * INT_WIDTH(xctx->lw) + 2 * snapcursor_size, + (int)X_TO_SCREEN(prev_x) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size, + (int)Y_TO_SCREEN(prev_y) - 1 * INT_WIDTH(xctx->lw) - snapcursor_size); } else { draw_xhair_line(xctx->gctiled, snapcursor_size, X_TO_SCREEN(prev_x), @@ -1820,15 +1839,14 @@ static int edit_line_point(int state) line_c = xctx->sel_array[0].col; /* lineangle point: Check is user is clicking a control point of a lineangle */ if(line_n >= 0) { - double ds = xctx->cadhalfdotsize ; xLine *p = &xctx->line[line_c][line_n]; xctx->need_reb_sel_arr=1; - if(POINTINSIDE(xctx->mousex, xctx->mousey, p->x1 - ds, p->y1 - ds, p->x1 + ds, p->y1 + ds)) { + if(xctx->mousex_snap == p->x1 && xctx->mousey_snap == p->y1) { xctx->shape_point_selected = 1; p->sel = SELECTED1; } - else if(POINTINSIDE(xctx->mousex, xctx->mousey, p->x2 - ds, p->y2 - ds, p->x2 + ds, p->y2 + ds)) { + else if(xctx->mousex_snap == p->x2 && xctx->mousey_snap == p->y2) { xctx->shape_point_selected = 1; p->sel = SELECTED2; } @@ -1848,19 +1866,18 @@ static int edit_line_point(int state) static int edit_wire_point(int state) { int wire_n = -1; - dbg(1, "edit_wire_point\n"); + dbg(1, "edit_wire_point, ds = %g\n", xctx->cadhalfdotsize); wire_n = xctx->sel_array[0].n; /* wire point: Check is user is clicking a control point of a wire */ if(wire_n >= 0) { - double ds = xctx->cadhalfdotsize ; xWire *p = &xctx->wire[wire_n]; xctx->need_reb_sel_arr=1; - if(POINTINSIDE(xctx->mousex, xctx->mousey, p->x1 - ds, p->y1 - ds, p->x1 + ds, p->y1 + ds)) { + if(xctx->mousex_snap == p->x1 && xctx->mousey_snap == p->y1) { xctx->shape_point_selected = 1; p->sel = SELECTED1; } - else if(POINTINSIDE(xctx->mousex, xctx->mousey, p->x2 - ds, p->y2 - ds, p->x2 + ds, p->y2 + ds)) { + else if(xctx->mousex_snap == p->x2 && xctx->mousey_snap == p->y2) { xctx->shape_point_selected = 1; p->sel = SELECTED2; } @@ -2148,7 +2165,7 @@ static int handle_mouse_wheel(int event, int mx, int my, KeySym key, int button, } xctx->xorigin+=-CADMOVESTEP*xctx->zoom/2.; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } else if(button==Button5 && (state & ShiftMask) && !(state & Button2Mask)) { if(waves_selected(event, key, state, button)) { @@ -2157,17 +2174,17 @@ static int handle_mouse_wheel(int event, int mx, int my, KeySym key, int button, } xctx->xorigin-=-CADMOVESTEP*xctx->zoom/2.; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } else if(button==Button4 && (state & ControlMask) && !(state & Button2Mask)) { xctx->yorigin+=-CADMOVESTEP*xctx->zoom/2.; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } else if(button==Button5 && (state & ControlMask) && !(state & Button2Mask)) { xctx->yorigin-=-CADMOVESTEP*xctx->zoom/2.; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); } } return 0; @@ -2496,7 +2513,7 @@ int rstate; /* (reduced state, without ShiftMask) */ { case LeaveNotify: - if(draw_xhair) draw_crosshair(1); + if(draw_xhair) draw_crosshair(1, state); /* clear crosshair when exiting window */ if(snap_cursor && wire_draw_active) draw_snap_cursor(1); tclvareval(xctx->top_path, ".drw configure -cursor {}" , NULL); xctx->mouse_inside = 0; @@ -2566,7 +2583,7 @@ int rstate; /* (reduced state, without ShiftMask) */ break; } if(draw_xhair) { - draw_crosshair(1); /* when moving mouse: first action is delete crosshair, will be drawn later */ + draw_crosshair(1, state); /* when moving mouse: first action is delete crosshair, will be drawn later */ } if(snap_cursor && wire_draw_active) draw_snap_cursor(1); /* pan schematic */ @@ -2574,12 +2591,11 @@ int rstate; /* (reduced state, without ShiftMask) */ if(xctx->semaphore >= 2) { if(draw_xhair) { - draw_crosshair(2); /* locked UI: draw new crosshair and break out */ + draw_crosshair(2, state); /* locked UI: draw new crosshair and break out */ } if(snap_cursor && wire_draw_active) draw_snap_cursor(2); break; } - dbg(1, "ui_state=%d deltax=%g\n", xctx->ui_state, xctx->deltax); /* update status bar messages */ if(xctx->ui_state) { @@ -2593,9 +2609,6 @@ int rstate; /* (reduced state, without ShiftMask) */ } } - /* update zoom rectangle drag */ - if(xctx->ui_state & STARTZOOM) zoom_rectangle(RUBBER); - /* determine direction of a rectangle selection (or unselection with ALT key) */ if(xctx->ui_state & STARTSELECT && !(xctx->ui_state & (PLACE_SYMBOL | STARTPAN | PLACE_TEXT)) ) { /* Unselect by area : determine direction */ @@ -2623,10 +2636,9 @@ int rstate; /* (reduced state, without ShiftMask) */ if(xctx->constr_mv == 2) xctx->mousex_snap = xctx->mx_double_save; copy_objects(RUBBER); } - - /* draw moving objects being inserted, wires, arcs, lines, rectangles, polygons */ - redraw_w_a_l_r_p_rubbers(); + /* draw moving objects being inserted, wires, arcs, lines, rectangles, polygons or zoom box */ + redraw_w_a_l_r_p_z_rubbers(0); /* start of a mouse area select. Button1 pressed. No shift pressed * Do not start an area select if user is dragging a polygon/bezier point */ @@ -2678,22 +2690,8 @@ int rstate; /* (reduced state, without ShiftMask) */ } } } - /* snap crosshair to closest pin or net endpoint */ if(draw_xhair) { - if( ( (xctx->ui_state & (MENUSTART | STARTWIRE)) || xctx->ui_state == 0 ) && - (state & ShiftMask) ) { - double x, y, sx, sy; - sx = xctx->mousex_snap; - sy = xctx->mousey_snap; - find_closest_net_or_symbol_pin(xctx->mousex, xctx->mousey, &x, &y); - xctx->mousex_snap = x; - xctx->mousey_snap = y; - draw_crosshair(2); - xctx->mousex_snap = sx; - xctx->mousey_snap = sy; - } else { - draw_crosshair(2); - } + draw_crosshair(2, state); /* what = 2(draw) */ } if(snap_cursor && wire_draw_active) draw_snap_cursor(2); break; @@ -2979,7 +2977,8 @@ int rstate; /* (reduced state, without ShiftMask) */ } break; } - if(key=='z' && rstate == 0) /* zoom box */ + if(key=='z' && rstate == 0 && + !(xctx->ui_state & (STARTRECT | STARTLINE | STARTWIRE | STARTPOLYGON | STARTARC))) /* zoom box */ { dbg(1, "callback(): zoom_rectangle call\n"); zoom_rectangle(START);break; @@ -3030,7 +3029,7 @@ int rstate; /* (reduced state, without ShiftMask) */ xctx->xorigin=-xctx->mousex_snap+xctx->areaw*xctx->zoom/2.0; xctx->yorigin=-xctx->mousey_snap+xctx->areah*xctx->zoom/2.0; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); break; } if(key=='5' && rstate == 0) { /* 20110112 display only probes */ @@ -3093,7 +3092,7 @@ int rstate; /* (reduced state, without ShiftMask) */ } xctx->xorigin+=-CADMOVESTEP*xctx->zoom; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); break; } if(key==XK_Left && !(state & ControlMask)) /* right */ @@ -3104,7 +3103,7 @@ int rstate; /* (reduced state, without ShiftMask) */ } xctx->xorigin-=-CADMOVESTEP*xctx->zoom; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); break; } if(key==XK_Down) /* down */ @@ -3115,7 +3114,7 @@ int rstate; /* (reduced state, without ShiftMask) */ } xctx->yorigin+=-CADMOVESTEP*xctx->zoom; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); break; } if(key==XK_Up) /* up */ @@ -3126,7 +3125,7 @@ int rstate; /* (reduced state, without ShiftMask) */ } xctx->yorigin-=-CADMOVESTEP*xctx->zoom; draw(); - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); break; } if(key=='w' && rstate == ControlMask) /* close current schematic */ @@ -3709,7 +3708,7 @@ int rstate; /* (reduced state, without ShiftMask) */ } else { tclsetboolvar("orthogonal_wiring", 1); } - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); break; } if(key=='F' && rstate == 0) /* flip */ @@ -4397,21 +4396,25 @@ int rstate; /* (reduced state, without ShiftMask) */ /* intuitive interface: directly drag elements */ if(sel.type && xctx->intuitive_interface && xctx->lastsel >= 1 && !xctx->shape_point_selected) { + /* enable_stretch (from TCL variable) reverses command if enabled: + * - move --> stretch move + * - stretch move (with ctrl key) --> move + */ int stretch = (state & ControlMask ? 1 : 0) ^ enable_stretch; xctx->drag_elements = 1; /* select attached nets depending on ControlMask and enable_stretch */ - if(stretch && !(state & ShiftMask)) { + if(stretch) { select_attached_nets(); /* stretch nets that land on selected instance pins */ } - - /* if dragging instances with Ctrl and Shift down add wires to pins attached to something */ - if(state == (ShiftMask | ControlMask) ) { + /* if dragging instances with stretch enabled and Shift down add wires to pins + * attached to something */ + if((state & ShiftMask) && stretch) { xctx->connect_by_kissing = 2; /* 2 will be used to reset var to 0 at end of move */ move_objects(START,0,0,0); } /* dragging away an object with Shift pressed is a copy (duplicate object) */ - else if(state == ShiftMask) copy_objects(START); - /* else it is a move */ + else if(state & ShiftMask) copy_objects(START); + /* else it is a normal move */ else move_objects(START,0,0,0); } @@ -4497,7 +4500,7 @@ int rstate; /* (reduced state, without ShiftMask) */ /* xctx->mx_save = mx; xctx->my_save = my; */ /* xctx->mx_double_save=xctx->mousex_snap; */ /* xctx->my_double_save=xctx->mousey_snap; */ - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); break; } dbg(1, "callback(): ButtonRelease ui_state=%d state=%d\n",xctx->ui_state,state); @@ -4522,9 +4525,8 @@ int rstate; /* (reduced state, without ShiftMask) */ xctx->ui_state &= ~MENUSTART; break; } - - if(draw_xhair) draw_crosshair(3); /* restore crosshair when selecting / unselecting */ - if(snap_cursor && wire_draw_active) draw_snap_cursor(2); + if(draw_xhair) draw_crosshair(3, state); /* restore crosshair when selecting / unselecting */ + if(snap_cursor && wire_draw_active) draw_snap_cursor(3); break; case -3: /* double click : edit prop */ if( waves_selected(event, key, state, button)) { @@ -4548,7 +4550,7 @@ int rstate; /* (reduced state, without ShiftMask) */ edit_property(0); } else { if(xctx->ui_state & STARTWIRE) { - redraw_w_a_l_r_p_rubbers(); + redraw_w_a_l_r_p_z_rubbers(1); start_wire(mx, my); xctx->ui_state &= ~STARTWIRE; } diff --git a/src/draw.c b/src/draw.c index b92f9312..970bade1 100644 --- a/src/draw.c +++ b/src/draw.c @@ -5137,7 +5137,7 @@ void draw(void) } else { draw_selection(xctx->gc[SELLAYER], 0); /* 20181009 moved outside of cadlayers loop */ } - if(tclgetboolvar("draw_crosshair")) draw_crosshair(3); + if(tclgetboolvar("draw_crosshair")) draw_crosshair(7, 0); /* what = 1(clear) + 2(draw) */ } /* if(has_x) */ } diff --git a/src/findnet.c b/src/findnet.c index 26e52402..2616a697 100644 --- a/src/findnet.c +++ b/src/findnet.c @@ -25,7 +25,7 @@ static double distance; /* safe to keep even with multiple schematics */ static Selected sel; /* safe to keep even with multiple schematics */ -static void find_closest_net(double mx, double my) +static void find_closest_wire(double mx, double my) /* returns the net that is closest to the mouse pointer */ /* if there are nets and distance < CADWIREMINDIST */ { @@ -480,7 +480,7 @@ Selected find_closest_obj(double mx, double my, int override_lock) find_closest_arc(mx, my); /* dbg(1, "2 find_closest_obj(): sel.n=%d, sel.col=%d, sel.type=%d\n", sel.n, sel.col, sel.type); */ find_closest_text(mx, my); - find_closest_net(mx, my); + find_closest_wire(mx, my); find_closest_element(mx, my, override_lock); return sel; /*sel.type = 0 if nothing found */ } diff --git a/src/move.c b/src/move.c index 317ab661..c6fc2b55 100644 --- a/src/move.c +++ b/src/move.c @@ -241,7 +241,7 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->text[n].x0, xctx->text[n].y0, xctx->text[n].x0, xctx->text[n].y0, xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->text[n].x0, xctx->text[n].y0, xctx->rx1,xctx->ry1); } #if HAS_CAIRO==1 @@ -267,9 +267,9 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->rect[c][n].x1, xctx->rect[c][n].y1, xctx->rect[c][n].x2, xctx->rect[c][n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->rect[c][n].x1, xctx->rect[c][n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->rect[c][n].x2, xctx->rect[c][n].y2, xctx->rx2,xctx->ry2); } if(xctx->rect[c][n].sel==SELECTED) @@ -344,7 +344,7 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->poly[c][n].x[0], xctx->poly[c][n].y[0], xctx->poly[c][n].x[k], xctx->poly[c][n].y[k], xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->poly[c][n].x[k], xctx->poly[c][n].y[k], xctx->rx1,xctx->ry1); } x[k] = xctx->rx1 + xctx->deltax; @@ -368,9 +368,9 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->wire[n].x1, xctx->wire[n].y1, xctx->wire[n].x2, xctx->wire[n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->wire[n].x1, xctx->wire[n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->wire[n].x2, xctx->wire[n].y2, xctx->rx2,xctx->ry2); } @@ -406,9 +406,9 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->line[c][n].x1, xctx->line[c][n].y1, xctx->line[c][n].x2, xctx->line[c][n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->line[c][n].x1, xctx->line[c][n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->line[c][n].x2, xctx->line[c][n].y2, xctx->rx2,xctx->ry2); } ORDER(xctx->rx1,xctx->ry1,xctx->rx2,xctx->ry2); @@ -442,7 +442,7 @@ void draw_selection(GC g, int interruptable) xctx->rx1 = xctx->arc[c][n].x; xctx->ry1 = xctx->arc[c][n].y; } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->arc[c][n].x, xctx->arc[c][n].y, xctx->rx1,xctx->ry1); } angle = xctx->arc[c][n].a; @@ -475,7 +475,7 @@ void draw_selection(GC g, int interruptable) ROTATION(xctx->move_rot, xctx->move_flip, xctx->inst[n].x0, xctx->inst[n].y0, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } tmp_rot = (xctx->move_flip & xctx->inst[n].rot & 1) ? @@ -538,11 +538,11 @@ void copy_objects(int what) save_selection(1); xctx->deltax = xctx->deltay = 0.0; xctx->movelastsel = xctx->lastsel; - xctx->x1=xctx->mousex_snap;xctx->y_1=xctx->mousey_snap; + xctx->x1=xctx->mousex_snap;xctx->y1=xctx->mousey_snap; xctx->move_flip = 0;xctx->move_rot = 0; xctx->ui_state|=STARTCOPY; } - if(what & ABORT) /* draw objects while moving */ + if(what & ABORT) /* abort operation */ { draw_selection(xctx->gctiled,0); @@ -558,9 +558,10 @@ void copy_objects(int what) } if(what & RUBBER) /* draw objects while moving */ { - xctx->x2=xctx->mousex_snap;xctx->y_2=xctx->mousey_snap; + if(xctx->mousex_snap == xctx->x2 && xctx->mousey_snap == xctx->y2) return; + xctx->x2=xctx->mousex_snap;xctx->y2=xctx->mousey_snap; draw_selection(xctx->gctiled,0); - xctx->deltax = xctx->x2-xctx->x1; xctx->deltay = xctx->y_2 - xctx->y_1; + xctx->deltax = xctx->x2-xctx->x1; xctx->deltay = xctx->y2 - xctx->y1; } if(what & ROTATELOCAL ) { xctx->rotatelocal=1; @@ -617,9 +618,9 @@ void copy_objects(int what) ROTATION(xctx->move_rot, xctx->move_flip, xctx->wire[n].x1, xctx->wire[n].y1, xctx->wire[n].x2, xctx->wire[n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->wire[n].x1, xctx->wire[n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->wire[n].x2, xctx->wire[n].y2, xctx->rx2,xctx->ry2); } if( xctx->wire[n].sel & (SELECTED|SELECTED1) ) @@ -663,9 +664,9 @@ void copy_objects(int what) ROTATION(xctx->move_rot, xctx->move_flip, xctx->line[c][n].x1, xctx->line[c][n].y1, xctx->line[c][n].x2, xctx->line[c][n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->line[c][n].x1, xctx->line[c][n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->line[c][n].x2, xctx->line[c][n].y2, xctx->rx2,xctx->ry2); } if( xctx->line[c][n].sel & (SELECTED|SELECTED1) ) @@ -707,7 +708,7 @@ void copy_objects(int what) if(xctx->rotatelocal) { ROTATION(xctx->move_rot, xctx->move_flip, p->x[0], p->y[0], p->x[j], p->y[j], xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, p->x[j], p->y[j], xctx->rx1,xctx->ry1); + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, p->x[j], p->y[j], xctx->rx1,xctx->ry1); } x[j] = xctx->rx1+xctx->deltax; y[j] = xctx->ry1+xctx->deltay; @@ -734,7 +735,7 @@ void copy_objects(int what) xctx->rx1 = xctx->arc[c][n].x; xctx->ry1 = xctx->arc[c][n].y; } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->arc[c][n].x, xctx->arc[c][n].y, xctx->rx1,xctx->ry1); } angle = xctx->arc[c][n].a; @@ -762,9 +763,9 @@ void copy_objects(int what) ROTATION(xctx->move_rot, xctx->move_flip, xctx->rect[c][n].x1, xctx->rect[c][n].y1, xctx->rect[c][n].x2, xctx->rect[c][n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->rect[c][n].x1, xctx->rect[c][n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->rect[c][n].x2, xctx->rect[c][n].y2, xctx->rx2,xctx->ry2); } RECTORDER(xctx->rx1,xctx->ry1,xctx->rx2,xctx->ry2); @@ -784,7 +785,7 @@ void copy_objects(int what) ROTATION(xctx->move_rot, xctx->move_flip, xctx->text[n].x0, xctx->text[n].y0, xctx->text[n].x0, xctx->text[n].y0, xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->text[n].x0, xctx->text[n].y0, xctx->rx1,xctx->ry1); } xctx->text[xctx->texts].txt_ptr=NULL; @@ -850,7 +851,7 @@ void copy_objects(int what) ROTATION(xctx->move_rot, xctx->move_flip, xctx->inst[n].x0, xctx->inst[n].y0, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } xctx->inst[xctx->instances] = xctx->inst[n]; @@ -900,14 +901,14 @@ void copy_objects(int what) propagate_hilights(1, 1, XINSERT_NOREPLACE); } xctx->ui_state &= ~STARTCOPY; - xctx->x1 = xctx->y_1 = xctx->x2 = xctx->y_2 = xctx->deltax = xctx->deltay = 0; + xctx->x1 = xctx->y1 = xctx->x2 = xctx->y2 = xctx->deltax = xctx->deltay = 0; xctx->move_rot = xctx->move_flip = 0; set_modify(1); /* must be done before draw() if floaters are present to force cached values update */ draw(); xctx->rotatelocal=0; } /* if(what & END) */ draw_selection(xctx->gc[SELLAYER], 0); - if(tclgetboolvar("draw_crosshair")) draw_crosshair(3); + if(tclgetboolvar("draw_crosshair")) draw_crosshair(3, 0); /* what = 1(clear) + 2(draw) */ } @@ -939,12 +940,12 @@ void move_objects(int what, int merge, double dx, double dy) if(xctx->lastsel==1 && xctx->sel_array[0].type==ARC && xctx->arc[c=xctx->sel_array[0].col][n=xctx->sel_array[0].n].sel!=SELECTED) { xctx->x1 = xctx->arc[c][n].x; - xctx->y_1 = xctx->arc[c][n].y; - } else {xctx->x1=xctx->mousex_snap;xctx->y_1=xctx->mousey_snap;} + xctx->y1 = xctx->arc[c][n].y; + } else {xctx->x1=xctx->mousex_snap;xctx->y1=xctx->mousey_snap;} xctx->move_flip = 0;xctx->move_rot = 0; xctx->ui_state|=STARTMOVE; } - if(what & ABORT) /* draw objects while moving */ + if(what & ABORT) /* abort operation */ { xctx->paste_from = 0; draw_selection(xctx->gctiled,0); @@ -958,12 +959,12 @@ void move_objects(int what, int merge, double dx, double dy) xctx->ui_state &= ~STARTMOVE; update_symbol_bboxes(0, 0); } - if(what & RUBBER) /* abort operation */ + if(what & RUBBER) /* draw objects while moving */ { - - xctx->x2=xctx->mousex_snap;xctx->y_2=xctx->mousey_snap; + if(xctx->mousex_snap == xctx->x2 && xctx->mousey_snap == xctx->y2) return; + xctx->x2=xctx->mousex_snap;xctx->y2=xctx->mousey_snap; draw_selection(xctx->gctiled,0); - xctx->deltax = xctx->x2-xctx->x1; xctx->deltay = xctx->y_2 - xctx->y_1; + xctx->deltax = xctx->x2-xctx->x1; xctx->deltay = xctx->y2 - xctx->y1; } if(what & ROTATELOCAL) { xctx->rotatelocal=1; @@ -1032,9 +1033,9 @@ void move_objects(int what, int merge, double dx, double dy) ROTATION(xctx->move_rot, xctx->move_flip, wire[n].x1, wire[n].y1, wire[n].x2, wire[n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, wire[n].x1, wire[n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, wire[n].x2, wire[n].y2, xctx->rx2,xctx->ry2); } if( wire[n].sel & (SELECTED|SELECTED1) ) @@ -1070,9 +1071,9 @@ void move_objects(int what, int merge, double dx, double dy) ROTATION(xctx->move_rot, xctx->move_flip, line[c][n].x1, line[c][n].y1, line[c][n].x2, line[c][n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, line[c][n].x1, line[c][n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, line[c][n].x2, line[c][n].y2, xctx->rx2,xctx->ry2); } @@ -1120,7 +1121,7 @@ void move_objects(int what, int merge, double dx, double dy) ROTATION(xctx->move_rot, xctx->move_flip, savex0, savey0, p->x[j], p->y[j], xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, p->x[j], p->y[j], + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, p->x[j], p->y[j], xctx->rx1,xctx->ry1); } @@ -1146,7 +1147,7 @@ void move_objects(int what, int merge, double dx, double dy) xctx->rx1 = xctx->arc[c][n].x; xctx->ry1 = xctx->arc[c][n].y; } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->arc[c][n].x, xctx->arc[c][n].y, xctx->rx1,xctx->ry1); } angle = xctx->arc[c][n].a; @@ -1192,9 +1193,9 @@ void move_objects(int what, int merge, double dx, double dy) ROTATION(xctx->move_rot, xctx->move_flip, xctx->rect[c][n].x1, xctx->rect[c][n].y1, xctx->rect[c][n].x2, xctx->rect[c][n].y2, xctx->rx2,xctx->ry2); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->rect[c][n].x1, xctx->rect[c][n].y1, xctx->rx1,xctx->ry1); - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->rect[c][n].x2, xctx->rect[c][n].y2, xctx->rx2,xctx->ry2); } @@ -1284,7 +1285,7 @@ void move_objects(int what, int merge, double dx, double dy) ROTATION(xctx->move_rot, xctx->move_flip, xctx->text[n].x0, xctx->text[n].y0, xctx->text[n].x0, xctx->text[n].y0, xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->text[n].x0, xctx->text[n].y0, xctx->rx1,xctx->ry1); } xctx->text[n].x0=xctx->rx1+xctx->deltax; @@ -1325,7 +1326,7 @@ void move_objects(int what, int merge, double dx, double dy) ROTATION(xctx->move_rot, xctx->move_flip, xctx->inst[n].x0, xctx->inst[n].y0, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } else { - ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y_1, + ROTATION(xctx->move_rot, xctx->move_flip, xctx->x1, xctx->y1, xctx->inst[n].x0, xctx->inst[n].y0, xctx->rx1,xctx->ry1); } xctx->inst[n].x0 = xctx->rx1+xctx->deltax; @@ -1355,11 +1356,11 @@ void move_objects(int what, int merge, double dx, double dy) if(xctx->ui_state & STARTMERGE) xctx->ui_state |= SELECTION; /* leave selection state so objects can be deleted */ xctx->ui_state &= ~STARTMERGE; xctx->move_rot=xctx->move_flip=0; - xctx->x1=xctx->y_1=xctx->x2=xctx->y_2=xctx->deltax=xctx->deltay=0.; + xctx->x1=xctx->y1=xctx->x2=xctx->y2=xctx->deltax=xctx->deltay=0.; set_modify(1); /* must be done before draw() if floaters are present to force cached values update */ draw(); xctx->rotatelocal=0; } /* what & end */ draw_selection(xctx->gc[SELLAYER], 0); - if(tclgetboolvar("draw_crosshair")) draw_crosshair(3); + if(tclgetboolvar("draw_crosshair")) draw_crosshair(3, 0); /* what = 1(clear) + 2(draw) */ } diff --git a/src/xinit.c b/src/xinit.c index 4cc8bf24..e91347ce 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -566,7 +566,7 @@ static void alloc_xschem_data(const char *top_path, const char *win_path) xctx->manhattan_lines = 0; xctx->kissing = 0; xctx->connect_by_kissing = 0; - xctx->x1 = xctx->y_1 = xctx->x2 = xctx->y_2 = xctx->deltax = xctx->deltay = 0.0; + xctx->x1 = xctx->y1 = xctx->x2 = xctx->y2 = xctx->deltax = xctx->deltay = 0.0; xctx->movelastsel = 0; xctx->rotatelocal=0; /* new_wire */ @@ -646,6 +646,7 @@ static void alloc_xschem_data(const char *top_path, const char *win_path) xctx->enable_drill = 0; xctx->prev_set_modify = -1; xctx->prev_crossx = xctx->prev_crossy = 0.0; + xctx->prev_rubberx = xctx->prev_rubbery = 0.0; xctx->prev_gridx = xctx->prev_gridy = 0.0; xctx->prev_snapx = xctx->prev_snapy = 0.0; xctx->closest_pin_found = 0; diff --git a/src/xschem.h b/src/xschem.h index 4bd05ae4..c8496ab5 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -1018,13 +1018,15 @@ typedef struct { /* move.c */ double rx1, rx2, ry1, ry2; short move_rot; + double x1, y1, x2, y2, deltax, deltay; /* connect by kissing enable flag */ int connect_by_kissing; + /* redraw_w_a_l_r_p_z_rubbers() */ + double prev_rubberx, prev_rubbery; /* a wire was created while separating a component frm a net or another component */ int kissing; short move_flip; int manhattan_lines; - double x1, y_1, x2, y_2, deltax, deltay; int movelastsel; short rotatelocal; /* new_wire, new_line, new_rect*/ @@ -1392,7 +1394,7 @@ extern int select_dangling_nets(void); extern void tclmainloop(void); extern int Tcl_AppInit(Tcl_Interp *interp); extern void abort_operation(void); -extern void draw_crosshair(int what); +extern void draw_crosshair(int what, int state); extern void draw_snap_cursor(int what); extern void backannotate_at_cursor_b_pos(xRect *r, Graph_ctx *gr); /* extern void snapped_wire(double c_snap); */ @@ -1542,7 +1544,7 @@ extern void arc_3_points(double x1, double y1, double x2, double y2, double x3, double *x, double *y, double *r, double *a, double *b); extern void move_objects(int what,int merge, double dx, double dy); extern void check_collapsing_objects(); -extern void redraw_w_a_l_r_p_rubbers(void); /* redraw wire, arcs, line, polygon rubbers */ +extern void redraw_w_a_l_r_p_z_rubbers(int force); /* redraw wire, arcs, line, polygon rubbers */ extern void copy_objects(int what); extern void find_inst_to_be_redrawn(int what); extern void pan(int what, int mx, int my); diff --git a/xschem_library/devices/intuitive_interface_cheatsheet.sch b/xschem_library/devices/intuitive_interface_cheatsheet.sch index e91bae65..07bc6dfc 100644 --- a/xschem_library/devices/intuitive_interface_cheatsheet.sch +++ b/xschem_library/devices/intuitive_interface_cheatsheet.sch @@ -5682,6 +5682,10 @@ P 1 5 1707.5 -145 1712.5 -145 1712.5 -120 1707.5 -120 1707.5 -145 {} P 1 14 2260 -200 2282.5 -200 2287.5 -200 2287.5 -195 2287.5 -152.5 2280 -127.5 2275 -127.5 2245 -127.5 2240 -127.5 2232.5 -152.5 2232.5 -195 2232.5 -200 2237.5 -200 2260 -200 {bezier=1} P 1 14 2275 -197.5 2280 -197.5 2285 -197.5 2285 -192.5 2285 -172.5 2285 -167.5 2280 -167.5 2270 -167.5 2265 -167.5 2265 -172.5 2265 -192.5 2265 -197.5 2270 -197.5 2275 -197.5 {bezier=1} P 1 5 2257.5 -195 2262.5 -195 2262.5 -170 2257.5 -170 2257.5 -195 {} +P 1 10 1710 -6255 1735 -6255 1745 -6245 1745 -6215 1735 -6205 1685 -6205 1675 -6215 1675 -6245 1685 -6255 1710 -6255 {bezier=1} +P 1 10 1710 -6260 1740 -6260 1750 -6250 1750 -6210 1740 -6200 1680 -6200 1670 -6210 1670 -6250 1680 -6260 1710 -6260 {bezier=1} +P 1 10 2560 -6435 2585 -6435 2595 -6425 2595 -6395 2585 -6385 2535 -6385 2525 -6395 2525 -6425 2535 -6435 2560 -6435 {bezier=1} +P 1 10 2560 -6440 2590 -6440 2600 -6430 2600 -6390 2590 -6380 2530 -6380 2520 -6390 2520 -6430 2530 -6440 2560 -6440 {bezier=1} P 2 7 897.5 -6830 893.75 -6835 885 -6835 888.75 -6830 885 -6825 893.75 -6825 897.5 -6830 {fill=true} P 2 7 1457.5 -6830 1453.75 -6835 1445 -6835 1448.75 -6830 1445 -6825 1453.75 -6825 1457.5 -6830 {fill=true} P 2 7 2277.5 -6830 2273.75 -6835 2265 -6835 2268.75 -6830 2265 -6825 2273.75 -6825 2277.5 -6830 {fill=true} @@ -5930,7 +5934,7 @@ P 7 14 1695 -147.5 1700 -147.5 1705 -147.5 1705 -142.5 1705 -122.5 1705 -117.5 1 bezier=1} P 7 14 2245 -197.5 2250 -197.5 2255 -197.5 2255 -192.5 2255 -172.5 2255 -167.5 2250 -167.5 2240 -167.5 2235 -167.5 2235 -172.5 2235 -192.5 2235 -197.5 2240 -197.5 2245 -197.5 {fill=1 bezier=1} -P 9 8 1770 -10100 1912.5 -10072.5 1890 -10040 1980 -9980 1960 -9950 1870 -10010 1845 -9975 1770 -10100 {fill=0} +P 9 8 1800 -10090 1942.5 -10062.5 1920 -10030 2010 -9970 1990 -9940 1900 -10000 1875 -9965 1800 -10090 {fill=0} P 10 7 880 -11520 872.5 -11527.5 877.5 -11532.5 862.5 -11537.5 867.5 -11522.5 872.5 -11527.5 880 -11520 {fill=1} P 10 7 2110 -11570 2102.5 -11577.5 2107.5 -11582.5 2092.5 -11587.5 2097.5 -11572.5 2102.5 -11577.5 2110 -11570 {fill=1} P 10 7 1330 -11560 1322.5 -11567.5 1327.5 -11572.5 1312.5 -11577.5 1317.5 -11562.5 1322.5 -11567.5 1330 -11560 {fill=1} @@ -5976,7 +5980,7 @@ P 10 7 2460 -5560 2452.5 -5567.5 2457.5 -5572.5 2442.5 -5577.5 2447.5 -5562.5 24 P 10 7 2560 -5310 2552.5 -5317.5 2557.5 -5322.5 2542.5 -5327.5 2547.5 -5312.5 2552.5 -5317.5 2560 -5310 {fill=1} P 10 7 2030 -5210 2022.5 -5217.5 2027.5 -5222.5 2012.5 -5227.5 2017.5 -5212.5 2022.5 -5217.5 2030 -5210 {fill=1} P 10 7 1520 -5200 1512.5 -5207.5 1517.5 -5212.5 1502.5 -5217.5 1507.5 -5202.5 1512.5 -5207.5 1520 -5200 {fill=1} -P 10 8 1770 -10100 1912.5 -10072.5 1890 -10040 1980 -9980 1960 -9950 1870 -10010 1845 -9975 1770 -10100 {fill=1} +P 10 8 1800 -10090 1942.5 -10062.5 1920 -10030 2010 -9970 1990 -9940 1900 -10000 1875 -9965 1800 -10090 {fill=1} P 10 7 2470 -3880 2462.5 -3887.5 2467.5 -3892.5 2452.5 -3897.5 2457.5 -3882.5 2462.5 -3887.5 2470 -3880 {fill=1} P 10 7 2450 -2490 2442.5 -2497.5 2447.5 -2502.5 2432.5 -2507.5 2437.5 -2492.5 2442.5 -2497.5 2450 -2490 {fill=1} P 10 7 380 -9640 372.5 -9647.5 377.5 -9652.5 362.5 -9657.5 367.5 -9642.5 372.5 -9647.5 380 -9640 {fill=1} @@ -6084,9 +6088,8 @@ T {Stretch multiple shapes} 0 -5290 0 0 1 1 {} T {Ctrl} 1430 -6065 0 0 0.5 0.5 {hcenter=1} T {Shift} 1430 -5985 0 0 0.5 0.5 {hcenter=1} -T {Accurately position closer -to the wire end to be moved -so it will not be unselected} 1610 -10260 0 0 0.5 0.5 {} +T {Accurately position close +to the wire end to be moved} 1600 -10230 0 0 0.5 0.5 {} T {Move multiple objects keeping connections} 0 -3270 0 0 1 1 {} @@ -6366,3 +6369,5 @@ beziers} 0 -240 0 0 1 1 {} T {q} 1143.75 -248.75 0 0 0.5 0.5 {hcenter=1} T {Add attribute:} 1048.75 -173.75 0 0 0.5 0.5 {} T {bezier=1} 1050 -131.25 0 0 0.7 0.7 {font=monospace layer=4} +T {h} 1710 -6245 0 0 0.5 0.5 {hcenter=1} +T {v} 2560 -6425 0 0 0.5 0.5 {hcenter=1}