ui.gadgets.tracks: refactor
parent
078079859c
commit
1f3f062bf6
|
@ -8,9 +8,7 @@ ARTICLE: "ui-track-layout" "Track layouts"
|
|||
"Creating empty tracks:"
|
||||
{ $subsection <track> }
|
||||
"Adding children:"
|
||||
{ $subsection track-add }
|
||||
"Creating new tracks using a combinator:"
|
||||
{ $subsection track, } ;
|
||||
{ $subsection track-add } ;
|
||||
|
||||
HELP: track
|
||||
{ $class-description "A track is like a " { $link pack } " except each child is resized to a fixed multiple of the track's dimension in the direction of " { $link gadget-orientation } ". Tracks are created by calling " { $link <track> } "." } ;
|
||||
|
@ -23,8 +21,4 @@ HELP: track-add
|
|||
{ $values { "gadget" gadget } { "track" track } { "constraint" "a number between 0 and 1, or " { $link f } } }
|
||||
{ $description "Adds a new child to a track. If the constraint is " { $link f } ", the child always occupies its preferred size. Otherwise, the constrant is a fraction of the total size which is allocated for the child." } ;
|
||||
|
||||
HELP: track,
|
||||
{ $values { "gadget" gadget } { "constraint" "a number between 0 and 1, or " { $link f } } }
|
||||
{ $description "Adds a new child to a track. If the constraint is " { $link f } ", the child always occupies its preferred size. Otherwise, the constrant is a fraction of the total size which is allocated for the child." } ;
|
||||
|
||||
ABOUT: "ui-track-layout"
|
||||
|
|
|
@ -53,9 +53,6 @@ M: track pref-dim*
|
|||
pick sizes>> push
|
||||
add-gadget ;
|
||||
|
||||
: track, ( gadget constraint -- )
|
||||
gadget get swap track-add ;
|
||||
|
||||
: track-remove ( gadget track -- )
|
||||
over [
|
||||
[ gadget-children index ] 2keep
|
||||
|
|
|
@ -232,9 +232,6 @@ ARTICLE: "ui-layout-combinators" "Creating layouts using combinators"
|
|||
"The " { $link make } " combinator provides a convenient way of constructing sequences by keeping the intermediate sequence off the stack until construction is done. The " { $link , } " and " { $link % } " words operate on this implicit sequence, reducing stack noise."
|
||||
$nl
|
||||
"Similar tools exist for constructing complex gadget hierarchies. Different words are used for different types of gadgets; see " { $link "ui-pack-layout" } ", " { $link "ui-track-layout" } " and " { $link "ui-frame-layout" } " for specifics. This section documents their common factors."
|
||||
$nl
|
||||
"Gadget construction combinators whose names are prefixed with " { $snippet "make-" } " construct new gadgets and push them on the stack. The primitive combinator used to define all combinators of this form:"
|
||||
"Words such as " { $link track, } " access the gadget through the " { $link gadget } " variable."
|
||||
;
|
||||
|
||||
ARTICLE: "ui-null-layout" "Manual layouts"
|
||||
|
|
Loading…
Reference in New Issue