     ] if ;
 
 : deactivate-control ( gadget -- )
-    dup gadget-model dup [ 2dup remove-connection ] when 2drop ;
+    dup model>> dup [ 2dup remove-connection ] when 2drop ;
 
 : control-value ( control -- value )
-    gadget-model model-value ;
+    model>> model-value ;
 
 : set-control-value ( value control -- )
-    gadget-model set-model ;
+    model>> set-model ;
 
 : relative-loc ( fromgadget togadget -- loc )
     2dup eq? [

: dim-sum ( seq -- dim ) { 0 0 } [ v+ ] reduce ;

: orient ( gadget seq1 seq2 -- seq )
    >r >r gadget-orientation r> r> [ pick set-axis ] 2map nip ;

: each-child ( gadget quot -- )
    >r children>> r> each ; inline

    f swap (>>parent) ;

: unfocus-gadget ( child gadget -- )
    tuck focus>> eq?
    [ f swap (>>focus) ] [ drop ] if ;

SYMBOL: in-layout?

