IN: ui.gadgets.panes
TUPLE: pane < track
- output current input last-line prototype
+ output current input last-line prototype scrolls?
selection-color caret mark selecting? ;
TUPLE: pane-stream pane parent ;
bi
] [ drop f f ] if ;
+: scroll-pane ( pane -- )
+ dup scrolls?>> [ scroll>bottom ] [ drop ] if ;
+
GENERIC: pane-label ( pane -- label )
M: pane pane-label drop "" <label> ;
} cleave
] [ f ] if* :> bottom?
pane quot call
- scroller bottom? and [
+ pane scrolls?>> bottom? and scroller and [
scroller {
[ model>> range-value first ]
[ model>> range-max-value second 2array ]
: init-input/output ( listener -- listener )
<interactor>
- [ >>input ] [ pane new-pane >>output ] bi
+ [ >>input ] [ pane new-pane t >>scrolls? >>output ] bi
dup listener-streams >>output drop ;
: error-summary. ( -- )
: <callstack-display> ( model -- gadget )
[ [ call>> callstack. ] when* ]
- <pane-control> margins <scroller> white-interior
+ <pane-control> t >>scrolls? margins <scroller> white-interior
"Call stack" call-stack-color <colored-labeled-gadget> ;
: <datastack-display> ( model -- gadget )
: run-gesture-logger ( -- )
[
- <pane> dup <scroller>
+ <pane> t >>scrolls? dup <scroller>
{ 450 500 } >>pref-dim
"Gesture log" open-window
<pane-stream> <gesture-logger>