Tiny cleanups
parent
4148a106e3
commit
698727b49f
|
@ -1,6 +1,17 @@
|
||||||
+ 0.85:
|
+ 0.85:
|
||||||
|
|
||||||
|
- listener toolbar is too wide
|
||||||
- font corruption now that books don't add/remove their children
|
- font corruption now that books don't add/remove their children
|
||||||
|
- doc sweep
|
||||||
|
- tool help button in every tool's toolbar
|
||||||
|
- keyboard help: hide commands whose gestures are shadowed
|
||||||
|
- the editor should fill up the interior of the scroller completely
|
||||||
|
- words:
|
||||||
|
- S+left: reload
|
||||||
|
- S+right: inspect
|
||||||
|
- links:
|
||||||
|
- same deal
|
||||||
|
|
||||||
- pane output in UI should use less memory
|
- pane output in UI should use less memory
|
||||||
- signal 4 on datastack underflow on mac intel??
|
- signal 4 on datastack underflow on mac intel??
|
||||||
- buffer-ptr should be an alien
|
- buffer-ptr should be an alien
|
||||||
|
@ -22,25 +33,15 @@
|
||||||
space
|
space
|
||||||
- we have trouble drawing rectangles
|
- we have trouble drawing rectangles
|
||||||
- ui browser: show currently selected vocab & words
|
- ui browser: show currently selected vocab & words
|
||||||
- the editor should fill up the interior of the scroller completely
|
|
||||||
- doc sweep
|
|
||||||
- tool help
|
|
||||||
- keyboard help: hide commands whose gestures are shadowed
|
|
||||||
- how do we refer to command shortcuts in the docs?
|
|
||||||
|
|
||||||
+ ui:
|
+ ui:
|
||||||
|
|
||||||
|
- how do we refer to command shortcuts in the docs?
|
||||||
|
- page up/down: each tool has a distinglished scroller
|
||||||
- reliably clonable gadgets
|
- reliably clonable gadgets
|
||||||
- figure out if we need both set-model and set-model*
|
- figure out if we need both set-model and set-model*
|
||||||
- help tool: edit, reload buttons
|
|
||||||
- words:
|
|
||||||
- S+left: reload
|
|
||||||
- S+right: inspect
|
|
||||||
- links:
|
|
||||||
- same deal
|
|
||||||
- if i do 10000 [ . ] each and then clear, the listener window is slow
|
- if i do 10000 [ . ] each and then clear, the listener window is slow
|
||||||
- dataflow UI needs various improvements:
|
- full-height nodes should really be full height
|
||||||
full-height nodes should really be full height
|
|
||||||
- draw-world: bail out if world is 0x0
|
- draw-world: bail out if world is 0x0
|
||||||
- better help result ranking
|
- better help result ranking
|
||||||
- page scrolling should be timer-based too
|
- page scrolling should be timer-based too
|
||||||
|
|
|
@ -115,8 +115,6 @@ ARTICLE: "c-types-strings" "C string types"
|
||||||
{ { $snippet "char*" } "8-bit per character null-terminated ASCII" }
|
{ { $snippet "char*" } "8-bit per character null-terminated ASCII" }
|
||||||
{ { $snippet "ushort*" } "16-bit per character null-terminated UTF16" }
|
{ { $snippet "ushort*" } "16-bit per character null-terminated UTF16" }
|
||||||
}
|
}
|
||||||
"Passing an instance of " { $link c-ptr } " to a C function expecting a C string will simply pass in the address of the " { $link c-ptr } "."
|
|
||||||
$terpri
|
|
||||||
"Passing a Factor string to a C function expecting a C string allocates a byte array in the Factor heap; the string is then converted to the requested format and a raw pointer is passed to the function. If the conversion fails, for example if the string contains null bytes or characters with values higher than 255, a " { $link c-string-error. } " is thrown."
|
"Passing a Factor string to a C function expecting a C string allocates a byte array in the Factor heap; the string is then converted to the requested format and a raw pointer is passed to the function. If the conversion fails, for example if the string contains null bytes or characters with values higher than 255, a " { $link c-string-error. } " is thrown."
|
||||||
$terpri
|
$terpri
|
||||||
"C functions must not retain such pointers to heap-allocated strings after returning, since byte arrays in the Factor heap can be moved by the garbage collector. To allocate a string which will not move, use " { $link <malloc-string> } " and then " { $link free } "."
|
"C functions must not retain such pointers to heap-allocated strings after returning, since byte arrays in the Factor heap can be moved by the garbage collector. To allocate a string which will not move, use " { $link <malloc-string> } " and then " { $link free } "."
|
||||||
|
|
|
@ -6,7 +6,7 @@ sequences ;
|
||||||
|
|
||||||
: <alien> ( address -- alien ) f <displaced-alien> ; inline
|
: <alien> ( address -- alien ) f <displaced-alien> ; inline
|
||||||
|
|
||||||
UNION: c-ptr byte-array alien ;
|
UNION: c-ptr byte-array alien POSTPONE: f ;
|
||||||
|
|
||||||
M: alien equal?
|
M: alien equal?
|
||||||
over alien? [
|
over alien? [
|
||||||
|
|
|
@ -59,23 +59,6 @@ M: object gesture>string drop f ;
|
||||||
: all-commands ( gadget -- seq )
|
: all-commands ( gadget -- seq )
|
||||||
delegates [ class commands ] map concat ;
|
delegates [ class commands ] map concat ;
|
||||||
|
|
||||||
: resend-button-down ( gesture world -- )
|
|
||||||
hand-loc get-global swap send-button-down ;
|
|
||||||
|
|
||||||
: resend-button-up ( gesture world -- )
|
|
||||||
hand-loc get-global swap send-button-up ;
|
|
||||||
|
|
||||||
world H{
|
|
||||||
{ T{ key-down f { C+ } "x" } [ T{ cut-action } send-action ] }
|
|
||||||
{ T{ key-down f { C+ } "c" } [ T{ copy-action } send-action ] }
|
|
||||||
{ T{ key-down f { C+ } "v" } [ T{ paste-action } send-action ] }
|
|
||||||
{ T{ key-down f { C+ } "a" } [ T{ select-all-action } send-action ] }
|
|
||||||
{ T{ button-down f { C+ } 1 } [ T{ button-down f f 3 } swap resend-button-down ] }
|
|
||||||
{ T{ button-down f { A+ } 1 } [ T{ button-down f f 2 } swap resend-button-down ] }
|
|
||||||
{ T{ button-up f { C+ } 1 } [ T{ button-up f f 3 } swap resend-button-up ] }
|
|
||||||
{ T{ button-up f { A+ } 1 } [ T{ button-up f f 2 } swap resend-button-up ] }
|
|
||||||
} set-gestures
|
|
||||||
|
|
||||||
SYMBOL: +name+
|
SYMBOL: +name+
|
||||||
SYMBOL: +button+
|
SYMBOL: +button+
|
||||||
SYMBOL: +group+
|
SYMBOL: +group+
|
||||||
|
|
|
@ -174,3 +174,20 @@ V{ } clone hand-buttons set-global
|
||||||
|
|
||||||
: send-action ( world gesture -- )
|
: send-action ( world gesture -- )
|
||||||
swap world-focus handle-gesture drop ;
|
swap world-focus handle-gesture drop ;
|
||||||
|
|
||||||
|
: resend-button-down ( gesture world -- )
|
||||||
|
hand-loc get-global swap send-button-down ;
|
||||||
|
|
||||||
|
: resend-button-up ( gesture world -- )
|
||||||
|
hand-loc get-global swap send-button-up ;
|
||||||
|
|
||||||
|
world H{
|
||||||
|
{ T{ key-down f { C+ } "x" } [ T{ cut-action } send-action ] }
|
||||||
|
{ T{ key-down f { C+ } "c" } [ T{ copy-action } send-action ] }
|
||||||
|
{ T{ key-down f { C+ } "v" } [ T{ paste-action } send-action ] }
|
||||||
|
{ T{ key-down f { C+ } "a" } [ T{ select-all-action } send-action ] }
|
||||||
|
{ T{ button-down f { C+ } 1 } [ T{ button-down f f 3 } swap resend-button-down ] }
|
||||||
|
{ T{ button-down f { A+ } 1 } [ T{ button-down f f 2 } swap resend-button-down ] }
|
||||||
|
{ T{ button-up f { C+ } 1 } [ T{ button-up f f 3 } swap resend-button-up ] }
|
||||||
|
{ T{ button-up f { A+ } 1 } [ T{ button-up f f 2 } swap resend-button-up ] }
|
||||||
|
} set-gestures
|
||||||
|
|
Loading…
Reference in New Issue