]> gitweb.factorcode.org Git - factor.git/blob - core/ui/gadgets/frames.facts
44a7b24f20ffb49af74c005b3769d99b6128e419
[factor.git] / core / ui / gadgets / frames.facts
1 IN: help
2 USING: gadgets kernel arrays ;
3
4 : $ui-frame-constant ( element -- )
5     drop
6     { $description "Symbolic constant for a common input to " { $link grid-add } "." } print-element ;
7
8 IN: gadgets
9
10 HELP: @center $ui-frame-constant ;
11 HELP: @left $ui-frame-constant ;
12 HELP: @right $ui-frame-constant ;
13 HELP: @top $ui-frame-constant ;
14 HELP: @bottom $ui-frame-constant ;
15 HELP: @top-left $ui-frame-constant ;
16 HELP: @top-right $ui-frame-constant ;
17 HELP: @bottom-left $ui-frame-constant ;
18 HELP: @bottom-right $ui-frame-constant ;
19
20 HELP: frame
21 { $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."
22 $terpri
23 "Frames are constructed by calling " { $link <frame> } " and since they delegate to " { $link grid } " instances, children can be managed with " { $link grid-add } " and " { $link grid-remove } "." }
24 { $see-also delegate>frame make-frame make-frame* } ;
25
26 HELP: <frame>
27 { $values { "frame" frame } }
28 { $description "Creates a new " { $link frame } " for laying out gadgets in a 3x3 grid." }
29 { $see-also delegate>frame make-frame make-frame* } ;
30
31 HELP: delegate>frame
32 { $values { "tuple" tuple } }
33 { $description "Sets the tuple's delegate to a new " { $link frame } "." } 
34 { $side-effects "frame" } ;
35
36 HELP: make-frame
37 { $values { "specs" array } { "frame" frame } }
38 { $description "Creates a new frame from a declarative specification. See " { $link build-grid } " for a description of the format of " { $snippet "spec" } "." } ;
39
40 HELP: make-frame*
41 { $values { "tuple" tuple } { "specs" array } { "frame" frame } }
42 { $description "Creates a new frame from a declarative specification and sets " { $snippet "tuple" } "'s delegate to the new frame. See " { $link build-grid } " for a description of the format of " { $snippet "spec" } "." } ;