factor/basis/ui/gadgets/frames/frames-docs.factor

52 lines
1.9 KiB
Factor
Raw Normal View History

2008-01-05 17:27:15 -05:00
USING: help.syntax help.markup ui.gadgets kernel arrays
2009-02-05 06:16:22 -05:00
quotations classes.tuple ui.gadgets.grids parser ;
2008-01-05 17:27:15 -05:00
IN: ui.gadgets.frames
2007-09-20 18:09:08 -04:00
ARTICLE: "ui-frame-layout" "Frame layouts"
2008-07-11 15:52:36 -04:00
"Frames resemble " { $link "ui-grid-layout" } " except the size of grid is fixed at 3x3, and the center gadget fills up any available space. Because frames inherit from grids, grid layout words can be used to add and remove children."
{ $subsection frame }
"Creating empty frames:"
{ $subsection <frame> }
"A set of mnemonic words for the positions on a frame's 3x3 grid; these words push values which may be passed to " { $link grid-add } ":"
{ $subsection @center }
{ $subsection @left }
{ $subsection @right }
{ $subsection @top }
{ $subsection @bottom }
{ $subsection @top-left }
{ $subsection @top-right }
{ $subsection @bottom-left }
{ $subsection @bottom-right } ;
2009-02-05 06:16:22 -05:00
<<
: ui-frame-constant
{ $values { "value" pair } } parsed
{ $description "Symbolic constant for a common input to " { $link grid-add } "." } parsed ;
parsing
>>
HELP: @center ui-frame-constant ;
HELP: @left ui-frame-constant ;
HELP: @right ui-frame-constant ;
HELP: @top ui-frame-constant ;
HELP: @bottom ui-frame-constant ;
HELP: @top-left ui-frame-constant ;
HELP: @top-right ui-frame-constant ;
HELP: @bottom-left ui-frame-constant ;
HELP: @bottom-right ui-frame-constant ;
2007-09-20 18:09:08 -04:00
HELP: frame
{ $class-description "A frame is a gadget which lays out its children in a 3x3 grid. If the frame is enlarged past its preferred size, the center gadget fills up available room."
$nl
"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 } "." } ;
2007-09-20 18:09:08 -04:00
HELP: <frame>
{ $values { "frame" frame } }
{ $description "Creates a new " { $link frame } " for laying out gadgets in a 3x3 grid." } ;
{ grid frame } related-words
ABOUT: "ui-frame-layout"