! Copyright (C) 2006, 2009 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays documents documents.elements kernel math
-math.ranges models models.filter namespaces locals fry make opengl
+math.ranges models models.arrow namespaces locals fry make opengl
opengl.gl sequences strings math.vectors math.functions sorting colors
colors.constants combinators assocs math.order fry calendar alarms
continuations ui.clipboards ui.commands ui.gadgets ui.gadgets.borders
! A useful model
: <element-model> ( editor element -- model )
[ [ caret>> ] [ model>> ] bi ] dip
- '[ _ _ elt-string ] <filter> ;
+ '[ _ _ elt-string ] <arrow> ;
! Fields wrap an editor
TUPLE: field < border editor min-cols max-cols ;
USING: ui.gadgets ui.gadgets.scrollers namespaces tools.test
-kernel models models.compose models.range ui.gadgets.viewports
-ui.gadgets.labels ui.gadgets.grids
-ui.gadgets.sliders math math.vectors arrays sequences
-tools.test.ui math.rectangles accessors ui.gadgets.buttons
-ui.gadgets.packs ui.gadgets.scrollers.private ;
+kernel models models.product models.range ui.gadgets.viewports
+ui.gadgets.labels ui.gadgets.grids ui.gadgets.sliders math
+math.vectors arrays sequences tools.test.ui math.rectangles
+accessors ui.gadgets.buttons ui.gadgets.packs
+ui.gadgets.scrollers.private ;
IN: ui.gadgets.scrollers.tests
[ ] [
[ ] [
<gadget> dup "g" set
- 10 1 0 100 <range> 20 1 0 100 <range> 2array <compose>
+ 10 1 0 100 <range> 20 1 0 100 <range> 2array <product>
<viewport> "v" set
] unit-test
! Copyright (C) 2005, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays ui.gadgets ui.gadgets.viewports
-ui.gadgets.frames ui.gadgets.grids
-ui.gadgets.sliders ui.gestures kernel math namespaces sequences
-models models.range models.compose combinators math.vectors
-classes.tuple math.rectangles combinators.short-circuit ;
+ui.gadgets.frames ui.gadgets.grids ui.gadgets.sliders
+ui.gestures kernel math namespaces sequences models models.range
+models.product combinators math.vectors classes.tuple
+math.rectangles combinators.short-circuit ;
IN: ui.gadgets.scrollers
TUPLE: scroller < frame column-header viewport x y follows ;
} set-gestures
: <scroller-model> ( -- model )
- 0 0 0 0 <range> 0 0 0 0 <range> 2array <compose> ;
+ 0 0 0 0 <range> 0 0 0 0 <range> 2array <product> ;
M: viewport pref-dim* gadget-child pref-viewport-dim ;
! Copyright (C) 2007, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors models models.delay models.filter
+USING: accessors models models.delay models.arrow
sequences ui.gadgets.labels ui.gadgets.tracks
ui.gadgets.worlds ui.gadgets ui kernel calendar summary ;
IN: ui.gadgets.status-bar
: <status-bar> ( model -- gadget )
- 1/10 seconds <delay> [ "" like ] <filter> <label-control>
+ 1/10 seconds <delay> [ "" like ] <arrow> <label-control>
reverse-video-theme
t >>root? ;
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs definitions fry help.topics kernel
-colors.constants math.rectangles models.filter namespaces sequences
+colors.constants math.rectangles models.arrow namespaces sequences
sorting definitions.icons ui.gadgets ui.gadgets.glass
ui.gadgets.labeled ui.gadgets.scrollers ui.gadgets.tables
ui.gadgets.search-tables ui.gadgets.wrappers ui.gestures ui.operations
swap second subseq? ;
: <links-table> ( model quot -- table )
- '[ @ sorted-links ] <filter>
+ '[ @ sorted-links ] <arrow>
link-renderer [ second ] <search-table>
[ invoke-primary-operation ] >>action
- [ drop ] >>hook ! hide-glass ] >>hook
+ [ hide-glass ] >>hook
t >>selection-required?
10 >>min-rows
10 >>max-rows
! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors inspector namespaces kernel models fry
-colors.constants models.filter prettyprint sequences mirrors assocs
+colors.constants models.arrow prettyprint sequences mirrors assocs
classes io io.styles arrays hashtables math.order sorting refs fonts
ui.tools.browser ui.commands ui.operations ui.gadgets ui.gadgets.panes
ui.gadgets.scrollers ui.gadgets.slots ui.gadgets.tracks ui.gestures
call-next-method [ [ key-string>> ] compare ] sort ;
: <inspector-table> ( model -- table )
- [ make-slot-descriptions ] <filter> inspector-renderer <table>
+ [ make-slot-descriptions ] <arrow> inspector-renderer <table>
[ invoke-primary-operation ] >>action
monospace-font >>font
COLOR: dark-gray >>column-line-color
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs calendar colors colors.constants
documents documents.elements fry kernel words sets splitting math
-math.vectors models.delay models.filter combinators.short-circuit
+math.vectors models.delay models.arrow combinators.short-circuit
parser present sequences tools.completion tools.vocabs.browser generic
generic.standard.engines.tuple fonts definitions.icons ui.images
ui.commands ui.operations ui.gadgets ui.gadgets.editors
: <completion-model> ( editor element quot -- model )
[ <element-model> 1/3 seconds <delay> ] dip
- '[ @ keys 1000 short head ] <filter> ;
+ '[ @ keys 1000 short head ] <arrow> ;
M: completion-popup focusable-child* table>> ;
colors.constants combinators.short-circuit compiler.units
concurrency.flags concurrency.mailboxes continuations destructors
documents documents.elements fry hashtables help help.markup io
-io.styles kernel lexer listener math models models.delay models.filter
+io.styles kernel lexer listener math models models.delay models.arrow
namespaces parser prettyprint quotations sequences strings threads
tools.vocabs vocabs vocabs.loader vocabs.parser words ui ui.commands
ui.pens.solid ui.gadgets ui.gadgets.glass ui.gadgets.buttons ui.gadgets.editors
: <word-model> ( interactor -- model )
[ token-model>> 1/3 seconds <delay> ]
[ '[ _ word-at-caret ] ] bi
- <filter> ;
+ <arrow> ;
: <interactor> ( -- gadget )
interactor new-editor
ui.gadgets.tabbed ui.gadgets.status-bar ui.gadgets.borders
ui.tools.browser ui.tools.common ui.baseline-alignment
ui.operations ui.images ;
-FROM: models.filter => <filter> ;
-FROM: models.compose => <compose> ;
+FROM: models.arrow => <arrow> ;
+FROM: models.product => <product> ;
IN: ui.tools.profiler
TUPLE: profiler-gadget < tool
M: method-renderer column-titles drop { "" "Method" "Count" } ;
: <profiler-model> ( values profiler -- model )
- [ [ filter-counts ] <filter> ] [ sort>> ] bi* <sort> ;
+ [ [ filter-counts ] <arrow> ] [ sort>> ] bi* <sort> ;
: <words-model> ( profiler -- model )
[
[ invoke-primary-operation ] >>action ;
: <profiler-filter-model> ( counts profiler -- model' )
- [ <model> ] dip <profiler-model> [ f prefix ] <filter> ;
+ [ <model> ] dip <profiler-model> [ f prefix ] <arrow> ;
: <vocabs-model> ( profiler -- model )
[ vocab-counters [ [ vocab ] dip ] assoc-map ] dip
: <methods-model> ( profiler -- model )
[
[ method-counters <model> ] dip
- [ generic>> ] [ class>> ] bi 3array <compose>
- [ first3 '[ _ _ method-matches? ] filter ] <filter>
+ [ generic>> ] [ class>> ] bi 3array <product>
+ [ first3 '[ _ _ method-matches? ] filter ] <arrow>
] keep <profiler-model> ;
: sort-by-name ( obj1 obj2 -- <=> )
ui.gadgets.tracks ui.gadgets.buttons ui.gadgets.panes
ui.gadgets.status-bar ui.gadgets.scrollers ui.gadgets.borders
ui.gadgets.tables ui.gestures sequences inspector
-models.filter fonts ;
+models.arrow fonts ;
QUALIFIED-WITH: ui.tools.inspector i
IN: ui.tools.traceback
M: stack-entry-renderer row-value drop object>> ;
: <stack-table> ( model -- table )
- [ [ <stack-entry> ] map ] <filter> stack-entry-renderer <table>
+ [ [ <stack-entry> ] map ] <arrow> stack-entry-renderer <table>
10 >>min-rows
10 >>max-rows
40 >>min-cols
t >>single-click? ;
: <stack-display> ( model quot title -- gadget )
- [ '[ dup _ when ] <filter> <stack-table> <scroller> ] dip
+ [ '[ dup _ when ] <arrow> <stack-table> <scroller> ] dip
<labeled-gadget> ;
: <callstack-display> ( model -- gadget )
add-toolbar ;
: variables ( traceback -- )
- model>> [ dup [ name>> vars-in-scope ] when ] <filter> i:inspect-model ;
+ model>> [ dup [ name>> vars-in-scope ] when ] <arrow> i:inspect-model ;
: traceback-window ( continuation -- )
<model> <traceback-gadget> "Traceback" open-status-window ;
USING: accessors kernel concurrency.messaging inspector
ui.tools.listener ui.tools.traceback ui.gadgets.buttons
ui.gadgets.status-bar ui.gadgets.tracks ui.commands ui.gadgets
-models models.filter ui.tools.browser ui.tools.common ui.gestures
+models models.arrow ui.tools.browser ui.tools.common ui.gestures
ui.gadgets.labels ui threads namespaces make tools.walker assocs
combinators fry ;
IN: ui.tools.walker
] "" make ;
: <thread-status> ( model thread -- gadget )
- '[ _ walker-state-string ] <filter> <label-control> ;
+ '[ _ walker-state-string ] <arrow> <label-control> ;
: <walker-gadget> ( status continuation thread -- gadget )
vertical walker-gadget new-track
! Copyright (C) 2006, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math math.functions math.parser models
-models.filter models.range models.compose sequences ui
+models.arrow models.range models.product sequences ui
ui.gadgets ui.gadgets.frames ui.gadgets.labels ui.gadgets.packs
ui.gadgets.sliders ui.render math.rectangles accessors
ui.gadgets.grids colors ;
swap value>> >>interior relayout-1 ;
: <color-model> ( model -- model )
- [ first3 [ 256 /f ] tri@ 1 <rgba> <solid> ] <filter> ;
+ [ first3 [ 256 /f ] tri@ 1 <rgba> <solid> ] <arrow> ;
: <color-slider> ( model -- gadget )
horizontal <slider> 1 >>line ;
: <color-sliders> ( -- gadget model )
3 [ 0 0 0 255 <range> ] replicate
[ <filled-pile> { 5 5 } >>gap [ <color-slider> add-gadget ] reduce ]
- [ [ range-model ] map <compose> ]
+ [ [ range-model ] map <product> ]
bi ;
: <color-picker> ( -- gadget )
[ <color-model> <color-preview> @center grid-add ]
[
[ [ truncate number>string ] map " " join ]
- <filter> <label-control>
+ <arrow> <label-control>
@bottom grid-add
] bi
] bi* ;
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors sequences kernel math io calendar grouping
-calendar.format calendar.model arrays models models.filter
+calendar.format calendar.model arrays models models.arrow
namespaces ui.gadgets ui.gadgets.labels ui.gadgets.theme ui ;
IN: lcd
3array [ pad-00 ] map ":" join ;
: <time-display> ( timestamp -- gadget )
- [ hh:mm:ss lcd ] <filter> <label-control>
+ [ hh:mm:ss lcd ] <arrow> <label-control>
"99:99:99" lcd >>string
monospace-font >>font ;
! See http://factorcode.org/license.txt for BSD license.\r
\r
USING: accessors kernel fry math math.vectors sequences arrays vectors assocs\r
- hashtables models models.range models.compose combinators\r
+ hashtables models models.range models.product combinators\r
ui ui.gadgets ui.gadgets.buttons ui.gadgets.frames ui.gadgets.packs\r
ui.gadgets.grids ui.gadgets.viewports ui.gadgets.books locals ;\r
\r