Minor UI tweaks
parent
5038554251
commit
0d4e5da8f3
|
@ -1,6 +1,5 @@
|
||||||
+ 0.87:
|
+ 0.87:
|
||||||
|
|
||||||
- dataflow looks odd
|
|
||||||
- menu Command: quots look dumb
|
- menu Command: quots look dumb
|
||||||
- http://paste.lisp.org/display/30426
|
- http://paste.lisp.org/display/30426
|
||||||
- "ker" C+u: for a moment, full vocab list is shown
|
- "ker" C+u: for a moment, full vocab list is shown
|
||||||
|
|
|
@ -122,7 +122,7 @@ editor "selection" {
|
||||||
{ "Clear" T{ delete-action } [ remove-editor-selection ] }
|
{ "Clear" T{ delete-action } [ remove-editor-selection ] }
|
||||||
{ "Select all" T{ select-all-action } [ T{ doc-elt } select-elt ] }
|
{ "Select all" T{ select-all-action } [ T{ doc-elt } select-elt ] }
|
||||||
{ "Select line" T{ key-down f { C+ } "l" } [ T{ one-line-elt } select-elt ] }
|
{ "Select line" T{ key-down f { C+ } "l" } [ T{ one-line-elt } select-elt ] }
|
||||||
{ "Select word" T{ key-down f { C+ } "w" } [ T{ one-word-elt } select-elt ] }
|
{ "Select word" f [ T{ one-word-elt } select-elt ] }
|
||||||
{ "Select previous character" T{ key-down f { S+ } "LEFT" } [ T{ char-elt } editor-select-prev ] }
|
{ "Select previous character" T{ key-down f { S+ } "LEFT" } [ T{ char-elt } editor-select-prev ] }
|
||||||
{ "Select next character" T{ key-down f { S+ } "RIGHT" } [ T{ char-elt } editor-select-next ] }
|
{ "Select next character" T{ key-down f { S+ } "RIGHT" } [ T{ char-elt } editor-select-next ] }
|
||||||
{ "Select previous line" T{ key-down f { S+ } "UP" } [ T{ line-elt } editor-select-prev ] }
|
{ "Select previous line" T{ key-down f { S+ } "UP" } [ T{ line-elt } editor-select-prev ] }
|
||||||
|
|
|
@ -78,8 +78,7 @@ TUPLE: node-gadget value height ;
|
||||||
C: node-gadget ( gadget node height -- gadget )
|
C: node-gadget ( gadget node height -- gadget )
|
||||||
[ set-node-gadget-height ] keep
|
[ set-node-gadget-height ] keep
|
||||||
[ set-node-gadget-value ] keep
|
[ set-node-gadget-value ] keep
|
||||||
swap <default-border> over set-gadget-delegate
|
swap <default-border> over set-gadget-delegate ;
|
||||||
dup faint-boundary ;
|
|
||||||
|
|
||||||
M: node-gadget pref-dim*
|
M: node-gadget pref-dim*
|
||||||
dup delegate pref-dim
|
dup delegate pref-dim
|
||||||
|
@ -111,10 +110,6 @@ M: #push node-presents >#push< first ;
|
||||||
<presentation>
|
<presentation>
|
||||||
] 2map ;
|
] 2map ;
|
||||||
|
|
||||||
: <node-presentation> ( node -- gadget )
|
|
||||||
class [ word-name <label> ] keep <link>
|
|
||||||
<presentation> ;
|
|
||||||
|
|
||||||
: default-node-content ( node -- gadget )
|
: default-node-content ( node -- gadget )
|
||||||
dup node-children <child-nodes>
|
dup node-children <child-nodes>
|
||||||
swap class word-name <label> add* make-pile
|
swap class word-name <label> add* make-pile
|
||||||
|
@ -169,7 +164,7 @@ DEFER: (compute-heights)
|
||||||
! Then we create gadgets for every node
|
! Then we create gadgets for every node
|
||||||
: node>gadget ( height node -- gadget )
|
: node>gadget ( height node -- gadget )
|
||||||
[ node>gadget* ] keep node-presents
|
[ node>gadget* ] keep node-presents
|
||||||
[ <presentation> ] when* ;
|
[ <presentation> dup faint-boundary ] when* ;
|
||||||
|
|
||||||
: print-node ( d-height node -- )
|
: print-node ( d-height node -- )
|
||||||
dup full-height-node? [
|
dup full-height-node? [
|
||||||
|
|
|
@ -125,5 +125,5 @@ listener-gadget "toolbar" {
|
||||||
T{ key-down f { C+ } "CLEAR" }
|
T{ key-down f { C+ } "CLEAR" }
|
||||||
[ clear-listener-stack ]
|
[ clear-listener-stack ]
|
||||||
}
|
}
|
||||||
{ "Send EOF" T{ key-down f { C+ } "d" } [ listener-eof ] }
|
{ "Send EOF" f [ listener-eof ] }
|
||||||
} define-commands
|
} define-commands
|
||||||
|
|
|
@ -139,6 +139,7 @@ M: operation invoke-command ( target operation -- )
|
||||||
[ compound? ] H{
|
[ compound? ] H{
|
||||||
{ +name+ "Word dataflow" }
|
{ +name+ "Word dataflow" }
|
||||||
{ +quot+ [ word-def show-dataflow ] }
|
{ +quot+ [ word-def show-dataflow ] }
|
||||||
|
{ +keyboard+ T{ key-down f { A+ } "d" } }
|
||||||
} define-operation
|
} define-operation
|
||||||
|
|
||||||
! Vocabularies
|
! Vocabularies
|
||||||
|
@ -256,28 +257,28 @@ M: operation invoke-command ( target operation -- )
|
||||||
! Quotations
|
! Quotations
|
||||||
[ quotation? ] H{
|
[ quotation? ] H{
|
||||||
{ +name+ "Quotation stack effect" }
|
{ +name+ "Quotation stack effect" }
|
||||||
{ +keyboard+ T{ key-down f { A+ } "i" } }
|
{ +keyboard+ T{ key-down f { C+ } "i" } }
|
||||||
{ +quot+ [ infer. ] }
|
{ +quot+ [ infer. ] }
|
||||||
{ +listener+ t }
|
{ +listener+ t }
|
||||||
} define-operation
|
} define-operation
|
||||||
|
|
||||||
[ quotation? ] H{
|
[ quotation? ] H{
|
||||||
{ +name+ "Quotation dataflow" }
|
{ +name+ "Quotation dataflow" }
|
||||||
{ +keyboard+ T{ key-down f { A+ } "d" } }
|
{ +keyboard+ T{ key-down f { C+ } "d" } }
|
||||||
{ +quot+ [ show-dataflow ] }
|
{ +quot+ [ show-dataflow ] }
|
||||||
{ +listener+ t }
|
{ +listener+ t }
|
||||||
} define-operation
|
} define-operation
|
||||||
|
|
||||||
[ quotation? ] H{
|
[ quotation? ] H{
|
||||||
{ +name+ "Walk" }
|
{ +name+ "Walk" }
|
||||||
{ +keyboard+ T{ key-down f { A+ } "w" } }
|
{ +keyboard+ T{ key-down f { C+ } "w" } }
|
||||||
{ +quot+ [ walk ] }
|
{ +quot+ [ walk ] }
|
||||||
{ +listener+ t }
|
{ +listener+ t }
|
||||||
} define-operation
|
} define-operation
|
||||||
|
|
||||||
[ quotation? ] H{
|
[ quotation? ] H{
|
||||||
{ +name+ "Time" }
|
{ +name+ "Time" }
|
||||||
{ +keyboard+ T{ key-down f { A+ } "t" } }
|
{ +keyboard+ T{ key-down f { C+ } "t" } }
|
||||||
{ +quot+ [ time ] }
|
{ +quot+ [ time ] }
|
||||||
{ +listener+ t }
|
{ +listener+ t }
|
||||||
} define-operation
|
} define-operation
|
||||||
|
@ -299,7 +300,7 @@ M: operation invoke-command ( target operation -- )
|
||||||
dup editor-text swap select-all parse ;
|
dup editor-text swap select-all parse ;
|
||||||
|
|
||||||
interactor "words"
|
interactor "words"
|
||||||
\ word class-operations
|
{ word compound } [ class-operations ] map concat
|
||||||
[ word-action ] modify-listener-operations
|
[ word-action ] modify-listener-operations
|
||||||
define-commands
|
define-commands
|
||||||
|
|
||||||
|
@ -319,7 +320,7 @@ append
|
||||||
define-commands
|
define-commands
|
||||||
|
|
||||||
\ word-search "operations"
|
\ word-search "operations"
|
||||||
\ word class-operations
|
{ word compound } [ class-operations ] map concat
|
||||||
[ search-action ] modify-commands
|
[ search-action ] modify-commands
|
||||||
define-commands
|
define-commands
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue