ui.gadgets: add some inline.
parent
25aadd2dc2
commit
45f0db5f78
|
@ -37,7 +37,7 @@ M: gadget model-changed 2drop ;
|
|||
: nth-gadget ( n gadget -- child ) children>> nth ; inline
|
||||
|
||||
: <gadget> ( -- gadget )
|
||||
gadget new ;
|
||||
gadget new ; inline
|
||||
|
||||
: control-value ( control -- value )
|
||||
model>> value>> ;
|
||||
|
@ -189,7 +189,7 @@ GENERIC: pref-dim* ( gadget -- dim )
|
|||
[ drop ] [ dupd pref-dim<< ] if
|
||||
] ?if ;
|
||||
|
||||
: pref-dims ( gadgets -- seq ) [ pref-dim ] map ;
|
||||
: pref-dims ( gadgets -- seq ) [ pref-dim ] map ; inline
|
||||
|
||||
M: gadget pref-dim* dim>> ;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ M: label string<< ( string label -- )
|
|||
label new-label ;
|
||||
|
||||
: >label< ( label -- font text )
|
||||
[ font>> ] [ text>> ] bi ;
|
||||
[ font>> ] [ text>> ] bi ; inline
|
||||
|
||||
M: label pref-dim*
|
||||
>label< text-dim ;
|
||||
|
|
|
@ -78,13 +78,13 @@ M: pack pref-dim*
|
|||
dup children>> pref-dims pack-pref-dim ;
|
||||
|
||||
: vertical-baseline ( pack -- y )
|
||||
children>> [ f ] [ first baseline ] if-empty ;
|
||||
children>> [ f ] [ first baseline ] if-empty ; inline
|
||||
|
||||
: horizontal-baseline ( pack -- y )
|
||||
children>> dup pref-dims measure-metrics drop ;
|
||||
children>> dup pref-dims measure-metrics drop ; inline
|
||||
|
||||
: pack-cap-height ( pack -- n )
|
||||
children>> [ cap-height ] map ?supremum ;
|
||||
: pack-cap-height ( pack -- n/f )
|
||||
children>> [ cap-height ] map ?supremum ; inline
|
||||
|
||||
PRIVATE>
|
||||
|
||||
|
|
Loading…
Reference in New Issue