factor/core/ui/backend.facts

43 lines
2.6 KiB
Plaintext

IN: gadgets
USING: help strings ;
HELP: set-title
{ $values { "string" string } { "world" world } }
{ $description "Sets the title bar of the native window containing the world." }
{ $notes "This word should not be called directly by user code. Instead, change the " { $link world-title } " model; see " { $link "models" } "." } ;
HELP: open-window*
{ $values { "world" world } { "title" string } }
{ $description "Opens a native window containing the given world. This grafts the world by calling " { $link graft } ". Each world can only be displayed in one top-level window at a time." }
{ $notes "This word should not be called directly by user code. Instead, use " { $link open-window } " or " { $link open-titled-window } "." } ;
HELP: raise-window
{ $values { "world" world } }
{ $description "Makes the native window containing the given world the front-most window." }
{ $notes "To raise the window containing a specific gadget, use " { $link find-world } " to find the world containing the gadget first." } ;
HELP: select-gl-context
{ $values { "handle" "a backend-specific handle" } }
{ $description "Selects an OpenGL context to be the implicit destination for subsequent GL rendering calls. This word is called automatically by the UI before drawing a " { $link world } "." } ;
HELP: flush-gl-context
{ $values { "handle" "a backend-specific handle" } }
{ $description "Ensures all GL rendering calls made to an OpenGL context finish rendering to the screen. This word is called automatically by the UI after drawing a " { $link world } "." } ;
HELP: clipboard
{ $class-description "A mutable container for a single string implementing the " { $link "clipboard-protocol" } "." } ;
HELP: paste-clipboard
{ $values { "gadget" gadget } { "clipboard" "an object" } }
{ $contract "Arranges for the contents of the clipboard to be inserted into the gadget at some point in the near future via a call to " { $link user-input } ". The gadget must be a child of a grafted " { $link world } "." } ;
HELP: copy-clipboard
{ $values { "string" string } { "gadget" gadget } { "clipboard" "an object" } }
{ $contract "Arranges for the string to be copied to the clipboard on behalf of the gadget. The gadget must be a child of a grafted " { $link world } "." } ;
HELP: clipboard
{ $var-description "Global variable holding the system clipboard. By convention, text should only be copied to the clipboard via an explicit user action, for example by pressing " { $snippet "C+c" } "." } ;
HELP: selection
{ $var-description "Global variable holding the system selection. By convention, text should be copied to the selection as soon as it is selected by the user." } ;