(index ("init!" 0) ("create" 237) ("clean-up!" 565) ("run!" 821) ("reset!" 1529) ("redraw!" 1730) ("get-value" 1850) ("set-value!" 2054) ("get-focus" 2230) ("set-focus!" 2421) ("quote-text" 2558) ("get-text" 2697) ("dump" 2921) ("modify!" 3267) ("get-error" 4419) ("set-error-action!" 4654))
(def (sig (procedure "(init!)" (id init!))) (p "Initialize STFL.  Currently this sets the program's locale to the global locale to handle UTF-8 correctly and adds the " (tt "clean-up!") " procedure to the exit and exception handlers."))
(def (sig (procedure "(create description)" (id create))) (p "Creates a form from the textual " (tt "DESCRIPTION") " which is described in the textual DSL section.  The returned " (tt "form") " record is a required argument for many of the following functions, its resources are freed automatically by the garbage collector."))
(def (sig (procedure "(clean-up!)" (id clean-up!))) (p "Frees all STFL-specific resources other than forms.  This is added by the " (tt "init!") " procedure to the exit and exception handlers and doesn't need to be run if you're using " (tt "init!") "."))
(def (sig (procedure "(run! form timeout)" (id run!))) (p "Performs an event loop iteration for " (tt "FORM") " and returns a textual event description.  It may be " (tt "#f") " if no event happened or " (tt "\"TIMEOUT\"") " if no event has been handled.  The " (tt "TIMEOUT") " argument is a timeout in milliseconds.  There are a number of special timeout values:") (dl (dt (tt "0")) (dd "Disable timeout and wait indefinitely until the next event") (dt (tt "-1")) (dd "Update the form and return immediately with " (tt "#f")) (dt (tt "-2")) (dd "Update the form and return the next pending event or " (tt "#f")) (dt (tt "-3")) (dd "Rerender the form, but don't update the screen and don't fetch events")))
(def (sig (procedure "(reset!)" (id reset!))) (p "Switch from ncurses mode to normal text mode.  This is done by the " (tt "clean-up!") " procedure when throwing exceptions or quitting the program."))
(def (sig (procedure "(redraw!)" (id redraw!))) (p "Redraw the screen, similar to " (tt "^L") " in ncurses programs."))
(def (sig (procedure "(get-value form name)" (id get-value))) (p "Return the value of the variable specified by " (tt "NAME") " in " (tt "FORM") " or " (tt "#f") " if there's no variable by that name."))
(def (sig (procedure "(set-value! form name value)" (id set-value!))) (p "Set the value of the variable specified by " (tt "NAME") " in " (tt "FORM") " to " (tt "VALUE") "."))
(def (sig (procedure "(get-focus form)" (id get-focus))) (p "Return the name of the currently focused widget in " (tt "FORM") " or " (tt "#f") " if the focused widget doesn't have a name."))
(def (sig (procedure "(set-focus! form name)" (id set-focus!))) (p "Focus the widget specified by " (tt "NAME") " in " (tt "FORM") "."))
(def (sig (procedure "(quote-text text)" (id quote-text))) (p "Return a quoted version of " (tt "TEXT") " for usage in the textual DSL."))
(def (sig (procedure "(get-text form name)" (id get-text))) (p "Return the text value of the text field " (tt "NAME") " in " (tt "FORM") ".  If there is more than one, all text values are concatenated to a single string."))
(def (sig (procedure "(dump form #!key name prefix focus)" (id dump))) (p "Returns the textual DSL representing " (tt "FORM") ".  If " (tt "NAME") " is given, dump that widget only.  If " (tt "PREFIX") " is given, prepend that string to the widget names.  If " (tt "FOCUS") " is " (tt "#t") ", include information about what widget has focus."))
(def (sig (procedure "(modify! form name mode #!optional text)" (id modify!))) (p "Changes the textual DSL in " (tt "FORM") " for the widget specified by " (tt "NAME") ".  " (tt "MODE") " must be one of the following strings, with " (tt "TEXT") " being an optional argument:") (dl (dt (tt "\"delete\"")) (dd "Delete the widget (" (tt "TEXT") " isn't required)") (dt (tt "\"replace\"")) (dd "Replace the widget with " (tt "TEXT")) (dt (tt "\"replace_inner\"")) (dd "Like " (tt "\"replace\"") ", but on the child lists") (dt (tt "\"insert\"")) (dd "Insert " (tt "TEXT") " before the other children") (dt (tt "\"insert_inner\"")) (dd "Like " (tt "\"insert\"") ", but on a child list") (dt (tt "\"append\"")) (dd "Append " (tt "TEXT") " after the other children") (dt (tt "\"append_inner\"")) (dd "Like " (tt "\"append\"") ", but on a child list") (dt (tt "\"before\"")) (dd "Insert " (tt "TEXT") " before the widget") (dt (tt "\"before_inner\"")) (dd "Like " (tt "\"before\"") ", but on a child list") (dt (tt "\"after\"")) (dd "Append " (tt "TEXT") " after the widget") (dt (tt "\"after_inner\"")) (dd "Like " (tt "\"after\"") ", but on a child list")))
(def (sig (procedure "(get-error)" (id get-error))) (p "Returns the last error message or " (tt "#f") " if no error occurred.") (p "Don't call this procedure, it hasn't been implemented yet and will " (tt "abort()") " your program."))
(def (sig (procedure "(set-error-action! mode)" (id set-error-action!))) (p "Change the error behavior to " (tt "MODE") " which must be one of the following strings: " (tt "(\"abort\" \"exit\" \"print\" \"interactive\" \"none\")") ".") (p "Don't call this procedure, it hasn't been implemented yet and will " (tt "abort()") " your program."))
