@@ 51,6 51,7 @@
%GET-POSITION { .settings/focus LDZ2 BANK -- DUP2 #0002 // WIDTH MOD2 SWP2 WIDTH #0002 ** // #0008 ** }
%ADD-POSITIONS { ROT2 ++ ROT2 ROT2 ++ SWP2 }
%RELEASE-MOUSE { #00 .Mouse/state DEO }
+%RESET-SELECTION { .selection/x1 LDZ2 .selection/x2 STZ2 }
%SET-STATE { #01 .state/changed STZ ;draw-state JSR2 }
%RESET-STATE { #00 .state/changed STZ ;draw-state JSR2 }
@@ 215,6 216,8 @@ BRK
( tool ) #00 .settings/tool STZ ;redraw JSR2 &no-tool0
DUP #77 ! ,&no-tool1 JCN
( tool ) #01 .settings/tool STZ ;redraw JSR2 &no-tool1
+ DUP #1b ! ,&no-escape JCN
+ ( escape ) RESET-SELECTION ;redraw JSR2 &no-escape
POP
( release ) #00 .Controller/key DEO
@@ 241,12 244,27 @@ BRK
@on-control ( -> )
.Controller/key DEI
- DUP ( ctrl+p ) #70 ! ,&no-print JCN
- ;save-theme JSR2
- POP BRK &no-print
- DUP ( ctrl+o ) #6f ! ,&no-open JCN
- ;load-file JSR2
- ;redraw JSR2 POP BRK &no-open
+
+ DUP [ LIT 'a ] ! ,&no-expand JCN
+ #00 .selection/x1 STZ
+ #00 .selection/y1 STZ
+ HOR .selection/x2 STZ
+ VER .selection/y2 STZ
+ ;clamp-selection JSR2
+ ;redraw JSR2 POP BRK
+ &no-expand
+ DUP [ LIT 'c ] ! ,&no-copy JCN
+ ;copy-snarf JSR2
+ ;redraw JSR2 POP BRK
+ &no-copy
+ DUP [ LIT 'v ] ! ,&no-paste JCN
+ ;paste-snarf JSR2 RESET-SELECTION
+ ;redraw JSR2 POP BRK
+ &no-paste
+ DUP [ LIT 'x ] ! ,&no-cut JCN
+ ;copy-snarf JSR2 ;erase-selection JSR2 RESET-SELECTION
+ ;redraw JSR2 POP BRK
+ &no-cut
DUP [ LIT 'r ] ! ,&no-name JCN
#00 ;draw-filepath JSR2
;on-frame-trap .Screen/vector DEO2
@@ 262,13 280,17 @@ BRK
;on-button-trap .Controller/vector DEO2
POP BRK
&no-rename
- DUP ( ctrl+s ) #73 ! ,&no-save JCN
- ;save-file JSR2
- ;draw-state JSR2 POP BRK &no-save
- DUP ( ctrl+n ) #6e ! ,&no-make JCN
+ DUP [ LIT 'n ] ! ,&no-new JCN
#25 ;draw-filepath JSR2
;untitled-txt ;new-file JSR2
- ;redraw JSR2 POP BRK &no-make
+ ;redraw JSR2 POP BRK &no-new
+ DUP [ LIT 'o ] ! ,&no-open JCN
+ ;load-file JSR2
+ ;redraw JSR2 POP BRK &no-open
+ DUP [ LIT 's ] ! ,&no-save JCN
+ ;save-file JSR2
+ ;save-theme JSR2
+ ;draw-state JSR2 POP BRK &no-save
POP
BRK
@@ 458,7 480,6 @@ BRK
@on-touch-zoomview ( -> )
-
( skip ) .Mouse/state DEI #00 ! #01 JCN [ BRK ]
.Mouse/y DEI2 .zoomview/y1 LDZ2 -- #0008 // TOB #04 ! ;&no-mod JCN2
@@ 1118,6 1139,10 @@ RTN
( etc )
+@erase-selection ( -- )
+
+RTN
+
@clamp-selection ( -- )
.selection/x1 LDZ HOR #01 - STHk < ,&ok-limitx1 JCN
@@ 1221,6 1246,18 @@ RTN
RTN
+( snarf )
+
+@snarf-txt ".snarf $1
+
+@copy-snarf ( -- )
+
+RTN
+
+@paste-snarf ( -- )
+
+RTN
+
( generics )
@within-rect ( x* y* rect -- flag )