1 USING: help.syntax help.markup ui.gadgets kernel arrays math help sequences
2 quotations classes.tuple ui.gadgets.grids ;
5 ARTICLE: "ui-frame-layout" "Frame layouts"
6 "Frames extend " { $link "ui-grid-layout" } " with the ability to give all remaining space to a distinguished filled cell."
8 "The filled cell's column/row pair is stored in the frame gadget's " { $slot "filled-cell" } " slot. If the actual dimensions of a frame exceed it preferred dimensions, then the fill slot is resized appropriately, together with its row and column."
10 "Because frames inherit from grids, grid layout words can be used to add and remove children."
12 "Creating empty frames:"
13 { $subsection <frame> } ;
16 { $class-description "A frame is a gadget which lays out its children in a grid, and assigns all remaining space to a distinguished filled cell. The " { $slot "filled-cell" } " slot stores a pair with shape " { $snippet "{ col row }" } "."
18 "Frames are constructed by calling " { $link <frame> } " and since they inherit from " { $link grid } ", children can be managed with " { $link grid-add } " and " { $link grid-remove } "." } ;
21 { $values { "cols" integer } { "rows" integer } { "frame" frame } }
22 { $description "Creates a new " { $link frame } " for laying out gadgets in a grid." } ;
24 { grid frame } related-words
26 ABOUT: "ui-frame-layout"