component_add_callback co f adds a general callback function f to a component.
component_add_callback co f
f
Convert the specialised listbox type back to a normal component, eg.
component_takes_focus co bool enables or disables a component.
component_takes_focus co bool
init_and_finish f calls Newt.init, then runs the function f (), then finishes (cleans up) the terminal.
init_and_finish f
Newt.init
f ()
Create a listbox.
listbox_append_entry lb text data appends a new listbox entry consisting of the text string text and data data to the end of the listbox.
listbox_append_entry lb text data
text
data
Remove all listbox entries.
Clear the current selection.
listbox_delete_entry lb data deletes the listbox entry which contains data.
listbox_delete_entry lb data
This returns the data field from the current item, for listboxes which only allow single selection.
Return a member of the listbox.
listbox_get_selection lb return an array of data from the items selected.
listbox_get_selection lb
listbox_insert_entry lb text data after inserts a new listbox entry consisting of the text string text and data data after the current listbox entry with data field after.
listbox_insert_entry lb text data after
after
Return the total number of items in the listbox.
Select the item containing data.
Set the current selection for listboxes which allow single selection.
Set the current selection to the row containing data.
Newt_int is the internal, unsafe module for access to the newt text window system.