Module object.inputbox

Properties of the inputbox object most of these properties are optional !

an inputbox is a customizable text input featuring features like scrolling,insert mode,pasting

Tables

properties inputbox OBJECT CREATION PROPERTIES
read_properties inputboxs OBJECT READ PROPERTIES
autocompletion autoc table properties


Tables

properties
inputbox OBJECT CREATION PROPERTIES

Fields:

  • x [number] the x position of the inputbox
  • y [number] the y position of the inputbox
  • width [number] the width of the inputbox
  • pattern [string] the pattern used for the input. lets say you only want numbers to be able to be inputed. then set pattern to "%d"
  • selected [boolean] sets if the input should be currently selected
  • cursor_pos [number] the position of the cursor in the inputbox
  • char_limit [number] the max characters that can be written into the inputbox. defaulted to
  • background_color [number] the background color of the inputbox
  • text_color [number] the color of the text in the inputbox
  • space_symbol [string] the symbol to draw spaces with
  • background_symbol [string] the symbol to draw the background with
  • replace_char [string] can be used for showing diffirent chracters visualy. for example you can do "*" for passwords
  • ignore_tab [boolean] if true the tab key will be ignored for autocompletion. defaulted to false
  • on_change_select [function] a function that gets ran when the inputbox selection changes. gets passed self
  • on_change_input [function] a function that gets ran when the inputbox input changes. gets passed self and the change
  • on_enter [function] gets called when you press enter while the inputbox is selected. gets passed self
  • autoc [table] a table of autocompletion options.
read_properties
inputboxs OBJECT READ PROPERTIES

Fields:

  • input [string] the current text written in the inputbox
  • selected [boolean] tells whether the inputbox is selected or not
  • insert [boolean] tells whether the inputbox is in insert mode or not
  • ctrl [boolean] tells wheter ctrl key is currently held or not
  • shift [number] the visual offset to show the text with
autocompletion
autoc table properties

Fields:

  • strings [table] a list of strings that the api will try to complete with every word
  • spec_strings [table] basicaly strings but word specific. if you want to have the first and second word only autocomplete Hello or World you can do {{"Hello","World"},{"Hello","world"}} the index of the strings table being the word count
  • bg [number] the background color of the autocompletion display
  • fg [number] the text color of the autocompletion display
  • current [string] the currently selected autocompletion suggestion readonly
  • selected [number] the currently selected autocompletion suggestion readonly
  • put_space [boolean] whether the autocompletion should put a space between each word autocompleted or not
generated by LDoc 1.4.6 Last updated 2022-06-23 16:51:50