/unmaintained/ui/gadgets/controls/controls-docs.factor

http://github.com/abeaumont/factor · Factor · 71 lines · 54 code · 17 blank · 0 comment · 0 complexity · 08f5f7fe591756555a98bd4d7d1c3f96 MD5 · raw file

  1. USING: accessors help.markup help.syntax ui.gadgets.buttons
  2. ui.gadgets.editors models ui.gadgets ;
  3. IN: ui.gadgets.controls
  4. HELP: <model-btn>
  5. { $values { "gadget" "the button's label" } { "button" button } }
  6. { $description "Creates an button whose signal updates on clicks. " } ;
  7. HELP: <model-border-btn>
  8. { $values { "text" "the button's label" } { "button" button } }
  9. { $description "Creates an button whose signal updates on clicks. " } ;
  10. HELP: <table>
  11. { $values { "model" "values the table is to display" } { "table" table } }
  12. { $description "Creates an " { $link table } } ;
  13. HELP: <table*>
  14. { $values { "table" table } }
  15. { $description "Creates an " { $link table } " with no initial values to display" } ;
  16. HELP: <list>
  17. { $values { "column-model" "values the table is to display" } { "table" table } }
  18. { $description "Creates an " { $link table } " with a val-quot that renders each element as its own row" } ;
  19. HELP: <list*>
  20. { $values { "table" table } }
  21. { $description "Creates an model-list with no initial values to display" } ;
  22. HELP: indexed
  23. { $values { "table" table } }
  24. { $description "Sets the output model of an table to the selected-index, rather than the selected-value" } ;
  25. HELP: <model-field>
  26. { $values { "model" model } { "gadget" model-field } }
  27. { $description "Creates a field with an initial value" } ;
  28. HELP: <model-field*>
  29. { $values { "field" model-field } }
  30. { $description "Creates a field with an empty initial value" } ;
  31. HELP: <empty-field>
  32. { $values { "model" model } { "field" model-field } }
  33. { $description "Creates a field with an empty initial value that switches to another signal on its update" } ;
  34. HELP: <model-editor>
  35. { $values { "model" model } { "gadget" model-field } }
  36. { $description "Creates an editor with an initial value" } ;
  37. HELP: <model-editor*>
  38. { $values { "editor" "an editor" } }
  39. { $description "Creates a editor with an empty initial value" } ;
  40. HELP: <empty-editor>
  41. { $values { "model" model } { "editor" "an editor" } }
  42. { $description "Creates a field with an empty initial value that switches to another signal on its update" } ;
  43. HELP: <model-action-field>
  44. { $values { "field" action-field } }
  45. { $description "Field that updates its model with its contents when the user hits the return key" } ;
  46. HELP: IMG-MODEL-BTN:
  47. { $syntax "IMAGE-MODEL-BTN: filename" }
  48. { $description "Creates a button using a tiff image named as specified found in the icons subdirectory of the vocabulary path" } ;
  49. HELP: IMG-BTN:
  50. { $syntax "[ do-something ] IMAGE-BTN: filename" }
  51. { $description "Creates a button using a tiff image named as specified found in the icons subdirectory of the vocabulary path, calling the specified quotation on click" } ;
  52. HELP: output-model
  53. { $values { "gadget" gadget } { "model" model } }
  54. { $description "Returns the model a gadget uses for output. Often the same as " { $link model>> } } ;