ui.gadgets.tracks: remove 'track-add'
parent
851443338f
commit
88e5088bd5
|
@ -8,7 +8,7 @@ ARTICLE: "ui-track-layout" "Track layouts"
|
||||||
"Creating empty tracks:"
|
"Creating empty tracks:"
|
||||||
{ $subsection <track> }
|
{ $subsection <track> }
|
||||||
"Adding children:"
|
"Adding children:"
|
||||||
{ $subsection track-add } ;
|
{ $subsection track-add* } ;
|
||||||
|
|
||||||
HELP: track
|
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> } "." } ;
|
{ $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> } "." } ;
|
||||||
|
@ -17,7 +17,7 @@ HELP: <track>
|
||||||
{ $values { "orientation" "an orientation specifier" } { "track" "a new " { $link track } } }
|
{ $values { "orientation" "an orientation specifier" } { "track" "a new " { $link track } } }
|
||||||
{ $description "Creates a new track which lays out children along the given axis. Children are laid out vertically if the orientation is " { $snippet "{ 0 1 }" } " and horizontally if the orientation is " { $snippet "{ 1 0 }" } "." } ;
|
{ $description "Creates a new track which lays out children along the given axis. Children are laid out vertically if the orientation is " { $snippet "{ 0 1 }" } " and horizontally if the orientation is " { $snippet "{ 1 0 }" } "." } ;
|
||||||
|
|
||||||
HELP: track-add
|
HELP: track-add*
|
||||||
{ $values { "gadget" gadget } { "track" track } { "constraint" "a number between 0 and 1, or " { $link f } } }
|
{ $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." } ;
|
{ $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." } ;
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,6 @@ M: track pref-dim* ( gadget -- dim )
|
||||||
tri
|
tri
|
||||||
set-axis ;
|
set-axis ;
|
||||||
|
|
||||||
: track-add ( gadget track constraint -- )
|
|
||||||
over track-sizes push swap add-gadget drop ;
|
|
||||||
|
|
||||||
: track-add* ( track gadget constraint -- track )
|
: track-add* ( track gadget constraint -- track )
|
||||||
pick sizes>> push add-gadget ;
|
pick sizes>> push add-gadget ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue