Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Leaves.Text_inputSourceval make :
string ->
?text_style:Spices.style ->
?cursor:Cursor.t ->
?prompt:string ->
unit ->
tmake text () Create a new Text_input.t.
If unspecified, it will use the `default_text_style`, `default_cursor`, and `default_prompt`.
let text_input = Text_input.make "Hello" ()empty () creates a new Text_input.t with an empty string and default configuration.
let text_input = Text_input.empty ()view text_input renders text_input into a string.
let text_input = Text_input.make "Hello" () in
let text: string = Text_input.view text_inputupdate text_input event updates the text_input to handle cursor movement, text insertions etc.
let text_input = Text_input.update text_input eventcurrent_text t gets the current text of the Text_input t.
let text = Text_input.current_text text_input