   init-track
   { 1 0 }    >>orientation
   V{ } clone >>gadgets
-  2          >>columns
+  2          >>tiles
   0          >>first
   0          >>focused ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-: <tiling> ( -- gadget )
-  tiling new
-  init-tiling ;
+: <tiling> ( -- gadget ) tiling new init-tiling ;
 
 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 


IN: ui.gadgets.tiling

TUPLE: tiling < track gadgets columns first focused ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

TUPLE: tiling-shelf < tiling ;
TUPLE: tiling-pile  < tiling ;

: <tiling-shelf> ( -- gadget )
  tiling-shelf new init-tiling { 1 0 } >>orientation ;

: <tiling-pile> ( -- gadget )
  tiling-pile new init-tiling { 0 1 } >>orientation ;

tiling-shelf
 H{
    { T{ key-down f { A+    } "LEFT"  } [ focus-prev  drop ] }
    { T{ key-down f { A+    } "RIGHT" } [ focus-next drop ] }
    { T{ key-down f { S+ A+ } "LEFT"  } [ move-prev   drop ] }
    { T{ key-down f { S+ A+ } "RIGHT" } [ move-next  drop ] }
    { T{ key-down f { C+    } "["     } [ del-tile  drop ] }
    { T{ key-down f { C+    } "]"     } [ add-tile  drop ] }
  }
set-gestures

tiling-pile
 H{
    { T{ key-down f { A+    } "UP"  } [ focus-prev  drop ] }
    { T{ key-down f { A+    } "DOWN" } [ focus-next drop ] }
    { T{ key-down f { S+ A+ } "UP"  } [ move-prev   drop ] }
    { T{ key-down f { S+ A+ } "DOWN" } [ move-next  drop ] }
    { T{ key-down f { C+    } "["     } [ del-tile  drop ] }
    { T{ key-down f { C+    } "]"     } [ add-tile  drop ] }
  }
set-gestures
