Fix load errors

db4
Slava Pestov 2009-02-15 06:01:53 -06:00
parent 0bbc63f865
commit 8fec1f5d40
3 changed files with 8 additions and 17 deletions

View File

@ -7,7 +7,7 @@ HELP: button
$nl
"A button's appearance can vary depending on the state of the mouse button if the " { $snippet "interior" } " or " { $snippet "boundary" } " slots are set to instances of " { $link button-pen } "."
$nl
"A button can be selected, which is distinct from being pressed. This state is held in the " { $snippet "selected?" } " slot, and is used by the " { $link <toggle-buttons> } " word to construct a row of buttons for choosing among several alternatives." } ;
"A button can be selected, which is distinct from being pressed. This state is held in the " { $snippet "selected?" } " slot, and is used by " { $link checkbox } " instances to render themselves when they're checked." } ;
HELP: <button>
{ $values { "label" gadget } { "quot" { $quotation "( button -- )" } } { "button" "a new " { $link button } } }
@ -31,21 +31,11 @@ HELP: button-pen
{ { $snippet "plain" } " - the button is inactive" }
{ { $snippet "rollover" } " - the button is under the mouse" }
{ { $snippet "pressed" } " - the button is under the mouse and a mouse button is held down" }
{ { $snippet "selected" } " - the button is selected (see " { $link <toggle-buttons> } }
{ { $snippet "selected" } " - the button is selected (see " { $link checkbox } }
{ { $snippet "selected" } " - the button is selected and a mouse button is being held down (see " { $link checkbox } }
}
"The " { $link <roll-button> } " and " { $link <border-button> } " words create " { $link button } " instances with specific " { $link button-pen } "." } ;
HELP: <toggle-button>
{ $values { "model" model } { "value" object } { "label" "a label specifier" } { "gadget" gadget } }
{ $description
"Creates a " { $link <border-button> } " which sets the model's value to " { $snippet "value" } " when pressed. After being pressed, the button becomes selected until the value of the model changes again."
}
{ $notes "Typically a row of radio controls should be built together using " { $link <toggle-buttons> } "." } ;
HELP: <toggle-buttons>
{ $values { "model" model } { "assoc" "an association list mapping labels to objects" } { "gadget" gadget } }
{ $description "Creates a row of labeled " { $link <toggle-button> } " gadgets which change the value of the model." } ;
HELP: <command-button>
{ $values { "target" object } { "gesture" "a gesture" } { "command" "a command" } { "button" "a new " { $link button } } }
{ $description "Creates a " { $link <border-button> } " which invokes the command on " { $snippet "target" } " when clicked." } ;
@ -65,8 +55,6 @@ ARTICLE: "ui.gadgets.buttons" "Button gadgets"
"Gadgets for invoking commands:"
{ $subsection <command-button> }
{ $subsection <toolbar> }
"A radio box is a row of buttons for choosing amongst several distinct possibilities:"
{ $subsection <toggle-buttons> }
"Button appearance can be customized:"
{ $subsection button-pen }
"Button constructors take " { $emphasis "label specifiers" } " as input. A label specifier is either a string, an array of strings, a gadget or " { $link f } "."

View File

@ -231,8 +231,11 @@ PRIVATE>
[ <radio-button> ] <radio-controls>
{ 5 5 } >>gap ;
: command-button-quot ( gesture command -- quot )
'[ _ _ invoke-command drop ] ;
: <command-button> ( target gesture command -- button )
[ command-string swap ] keep '[ _ _ invoke-command drop ] <border-button> ;
[ command-string swap ] keep command-button-quot <border-button> ;
: <toolbar> ( target -- toolbar )
<shelf>

View File

@ -1,5 +1,5 @@
USING: ui.gadgets help.markup help.syntax ui.gadgets.viewports
ui.gadgets.sliders math.rectangles ;
ui.gadgets.sliders math.rectangles ui.gadgets.scrollers.private ;
IN: ui.gadgets.scrollers
HELP: scroller