Fix X11 stack height bug, S+click in editor to extend selection
parent
45d953c6c1
commit
7018d05703
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
+ ui:
|
+ ui:
|
||||||
|
|
||||||
|
- x11.app has a problem with A+ keys
|
||||||
- status bar showing number of words needing a recompile
|
- status bar showing number of words needing a recompile
|
||||||
- UI dataflow visualizer
|
- UI dataflow visualizer
|
||||||
- services do not launch if factor not running
|
- services do not launch if factor not running
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
- only redraw visible lines
|
- only redraw visible lines
|
||||||
- more efficient multi-line inserts
|
- more efficient multi-line inserts
|
||||||
- editor should support stream output protocol
|
- editor should support stream output protocol
|
||||||
- s+click
|
|
||||||
- double/triple click
|
- double/triple click
|
||||||
- autoscroll
|
- autoscroll
|
||||||
- undo and redo
|
- undo and redo
|
||||||
|
|
|
@ -129,7 +129,7 @@ V{ } clone hand-buttons set-global
|
||||||
|
|
||||||
: modifier ( mod modifiers -- seq )
|
: modifier ( mod modifiers -- seq )
|
||||||
[ second swap bitand 0 > ] subset-with
|
[ second swap bitand 0 > ] subset-with
|
||||||
[ first ] map f like ;
|
[ first ] map prune f like ;
|
||||||
|
|
||||||
: drag-loc ( -- loc )
|
: drag-loc ( -- loc )
|
||||||
hand-loc get-global hand-click-loc get-global v- ;
|
hand-loc get-global hand-click-loc get-global v- ;
|
||||||
|
|
|
@ -4,10 +4,12 @@ IN: gadgets-text
|
||||||
USING: gadgets gadgets-controls kernel models namespaces
|
USING: gadgets gadgets-controls kernel models namespaces
|
||||||
sequences ;
|
sequences ;
|
||||||
|
|
||||||
: editor-mouse-down ( editor -- )
|
: editor-extend-selection ( editor -- )
|
||||||
dup request-focus
|
dup request-focus
|
||||||
dup
|
dup editor-caret click-loc ;
|
||||||
dup editor-caret click-loc
|
|
||||||
|
: editor-mouse-down ( editor -- )
|
||||||
|
dup editor-extend-selection
|
||||||
dup editor-mark click-loc ;
|
dup editor-mark click-loc ;
|
||||||
|
|
||||||
: editor-mouse-drag ( editor -- )
|
: editor-mouse-drag ( editor -- )
|
||||||
|
@ -68,6 +70,7 @@ editor {
|
||||||
{ f "Insert newline" T{ key-down f f "RETURN" } [ "\n" swap user-input ] }
|
{ f "Insert newline" T{ key-down f f "RETURN" } [ "\n" swap user-input ] }
|
||||||
{ f "Insert newline" T{ key-down f { S+ } "RETURN" } [ "\n" swap user-input ] }
|
{ f "Insert newline" T{ key-down f { S+ } "RETURN" } [ "\n" swap user-input ] }
|
||||||
{ f "Position caret" T{ button-down } [ editor-mouse-down ] }
|
{ f "Position caret" T{ button-down } [ editor-mouse-down ] }
|
||||||
|
{ f "Extend selection" T{ button-down f { S+ } } [ editor-extend-selection ] }
|
||||||
{ f "Start selection" T{ drag } [ editor-mouse-drag ] }
|
{ f "Start selection" T{ drag } [ editor-mouse-drag ] }
|
||||||
{ f "Focus editor" T{ gain-focus } [ focus-editor ] }
|
{ f "Focus editor" T{ gain-focus } [ focus-editor ] }
|
||||||
{ f "Unfocus editor" T{ lose-focus } [ unfocus-editor ] }
|
{ f "Unfocus editor" T{ lose-focus } [ unfocus-editor ] }
|
||||||
|
|
|
@ -26,6 +26,7 @@ M: world configure-event
|
||||||
{ S+ HEX: 1 }
|
{ S+ HEX: 1 }
|
||||||
{ C+ HEX: 4 }
|
{ C+ HEX: 4 }
|
||||||
{ A+ HEX: 8 }
|
{ A+ HEX: 8 }
|
||||||
|
{ A+ HEX: 10 }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
: key-codes
|
: key-codes
|
||||||
|
@ -90,7 +91,7 @@ M: world key-up-event
|
||||||
world-focus swap key-event>gesture dup [
|
world-focus swap key-event>gesture dup [
|
||||||
<key-up> dup [ swap handle-gesture drop ] [ 2drop ] if
|
<key-up> dup [ swap handle-gesture drop ] [ 2drop ] if
|
||||||
] [
|
] [
|
||||||
2drop
|
3drop
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: mouse-event-loc ( event -- loc )
|
: mouse-event-loc ( event -- loc )
|
||||||
|
|
Loading…
Reference in New Issue