Convert calls to 'grid-add*' to 'grid-add'

db4
Eduardo Cavazos 2008-07-25 12:29:29 -05:00
parent ef44191e86
commit de3b36fb6b
4 changed files with 15 additions and 15 deletions
extra/ui/gadgets

View File

@ -7,7 +7,7 @@ ARTICLE: "ui-frame-layout" "Frame layouts"
{ $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* } ":"
"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 }
@ -20,7 +20,7 @@ ARTICLE: "ui-frame-layout" "Frame layouts"
: $ui-frame-constant ( element -- )
drop
{ $description "Symbolic constant for a common input to " { $link grid-add* } "." } print-element ;
{ $description "Symbolic constant for a common input to " { $link grid-add } "." } print-element ;
HELP: @center $ui-frame-constant ;
HELP: @left $ui-frame-constant ;
@ -35,7 +35,7 @@ HELP: @bottom-right $ui-frame-constant ;
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 } "." } ;
"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 } "." } ;
HELP: <frame>
{ $values { "frame" frame } }

View File

@ -39,8 +39,8 @@ M: labelled-gadget focusable-child* labelled-gadget-content ;
: <title-bar> ( title quot -- gadget )
<frame>
swap dup [ <close-box> @left grid-add* ] [ drop ] if
swap <title-label> @center grid-add* ;
swap dup [ <close-box> @left grid-add ] [ drop ] if
swap <title-label> @center grid-add ;
TUPLE: closable-gadget < frame content ;
@ -49,8 +49,8 @@ TUPLE: closable-gadget < frame content ;
: <closable-gadget> ( gadget title quot -- gadget )
closable-gadget new-frame
-rot <title-bar> @top grid-add*
-rot <title-bar> @top grid-add
swap >>content
dup content>> @center grid-add* ;
dup content>> @center grid-add ;
M: closable-gadget focusable-child* closable-gadget-content ;

View File

@ -38,11 +38,11 @@ scroller H{
<scroller-model> >>model
faint-boundary
dup model>> dependencies>> first <x-slider> >>x dup x>> @bottom grid-add*
dup model>> dependencies>> second <y-slider> >>y dup y>> @right grid-add*
dup model>> dependencies>> first <x-slider> >>x dup x>> @bottom grid-add
dup model>> dependencies>> second <y-slider> >>y dup y>> @right grid-add
swap over model>> <viewport> >>viewport
dup viewport>> @center grid-add* ;
dup viewport>> @center grid-add ;
: <scroller> ( gadget -- scroller ) scroller new-scroller ;

View File

@ -130,7 +130,7 @@ M: elevator layout*
tuck <elevator> >>elevator
swap <thumb> >>thumb
dup elevator>> over thumb>> add-gadget
@center grid-add* ;
@center grid-add ;
: <left-button> ( -- button ) { 0 1 } arrow-left -1 <slide-button> ;
: <right-button> ( -- button ) { 0 1 } arrow-right 1 <slide-button> ;
@ -145,15 +145,15 @@ M: elevator layout*
: <x-slider> ( range -- slider )
{ 1 0 } <slider>
<left-button> @left grid-add*
<left-button> @left grid-add
{ 0 1 } elevator,
<right-button> @right grid-add* ;
<right-button> @right grid-add ;
: <y-slider> ( range -- slider )
{ 0 1 } <slider>
<up-button> @top grid-add*
<up-button> @top grid-add
{ 1 0 } elevator,
<down-button> @bottom grid-add* ;
<down-button> @bottom grid-add ;
M: slider pref-dim*
dup call-next-method