ui.tools.common: reuse code.
parent
1fdc965b34
commit
c6f8a84ee4
|
@ -9,18 +9,22 @@ SYMBOL: tool-dims
|
||||||
|
|
||||||
tool-dims [ H{ } clone ] initialize
|
tool-dims [ H{ } clone ] initialize
|
||||||
|
|
||||||
|
: set-tool-dim ( dim class -- )
|
||||||
|
tool-dims get-global set-at ;
|
||||||
|
|
||||||
|
: get-tool-dim ( class -- dim )
|
||||||
|
tool-dims get-global at ;
|
||||||
|
|
||||||
TUPLE: tool < track ;
|
TUPLE: tool < track ;
|
||||||
|
|
||||||
M: tool pref-dim*
|
M: tool pref-dim*
|
||||||
{ [ class-of tool-dims get-global at ] [ call-next-method ] } 1|| ;
|
{ [ class-of get-tool-dim ] [ call-next-method ] } 1|| ;
|
||||||
|
|
||||||
M: tool layout*
|
M: tool layout*
|
||||||
[ call-next-method ]
|
[ call-next-method ]
|
||||||
[ [ dim>> ] [ class-of ] bi tool-dims get-global set-at ]
|
[ [ dim>> ] [ class-of ] bi set-tool-dim ]
|
||||||
bi ;
|
bi ;
|
||||||
|
|
||||||
: set-tool-dim ( dim class -- ) tool-dims get-global set-at ;
|
|
||||||
|
|
||||||
SLOT: scroller
|
SLOT: scroller
|
||||||
|
|
||||||
: com-page-up ( tool -- )
|
: com-page-up ( tool -- )
|
||||||
|
|
Loading…
Reference in New Issue