ui.tools.profiler: rewrite <profiler-gadget>
parent
8a8114a355
commit
04cbc2cee3
|
@ -2,19 +2,17 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: ui.tools.workspace kernel quotations tools.profiler
|
USING: ui.tools.workspace kernel quotations tools.profiler
|
||||||
ui.commands ui.gadgets ui.gadgets.panes ui.gadgets.scrollers
|
ui.commands ui.gadgets ui.gadgets.panes ui.gadgets.scrollers
|
||||||
ui.gadgets.tracks ui.gestures ui.gadgets.buttons ;
|
ui.gadgets.tracks ui.gestures ui.gadgets.buttons accessors ;
|
||||||
IN: ui.tools.profiler
|
IN: ui.tools.profiler
|
||||||
|
|
||||||
TUPLE: profiler-gadget < track pane ;
|
TUPLE: profiler-gadget < track pane ;
|
||||||
|
|
||||||
: <profiler-gadget> ( -- gadget )
|
: <profiler-gadget> ( -- gadget )
|
||||||
{ 0 1 } profiler-gadget new-track
|
{ 0 1 } profiler-gadget new-track
|
||||||
[
|
dup <toolbar> f track-add*
|
||||||
toolbar,
|
<pane> >>pane
|
||||||
<pane> g-> set-profiler-gadget-pane
|
dup pane>> <scroller> 1 track-add* ;
|
||||||
<scroller> 1 track,
|
|
||||||
] make-gadget ;
|
|
||||||
|
|
||||||
: with-profiler-pane ( gadget quot -- )
|
: with-profiler-pane ( gadget quot -- )
|
||||||
>r profiler-gadget-pane r> with-pane ;
|
>r profiler-gadget-pane r> with-pane ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue