Class TableMaker

Easy formatting for text tables

Methods

TableMaker:addColumn(options, position) Adds a column definition for the table.
TableMaker:deleteColumn(position) Deletes a column at the given position
TableMaker:replaceColumn(options, position) Replaces a column at a specific position with the newly provided formatting
TableMaker:addRow(columnEntries, position) Adds a row of output to the table
TableMaker:deleteRow(position) Deletes the row at the given position
TableMaker:replaceRow(columnEntries, position) Replaces a row of output in the table
TableMaker:setCell(row, column, entry) Sets a specific cell's display information
TableMaker:enablePopups() enables making cells which incorporate insertLink/insertPopup
TableMaker:enableAutoEcho() enables autoEcho so that when assemble is called it echos automatically
TableMaker:disableAutoEcho() disables autoecho.
TableMaker:enableAutoClear() Enables automatically clearing the miniconsole we echo to
TableMaker:disableAutoClear() Disables automatically clearing the miniconsole we echo to
TableMaker:setAutoEchoConsole(console) Set the miniconsole to echo to
TableMaker:assemble() Assemble the table.
TableMaker:new(options) Creates and returns a new TableMaker.


Methods

TableMaker:addColumn(options, position)
Adds a column definition for the table.

Parameters:

  • options table Table of options suitable for a TextFormatter object. See https://github.com/demonnic/fText/wiki/fText
  • position number The position of the column you're adding, counting from the left. If not provided will add it as the last column
TableMaker:deleteColumn(position)
Deletes a column at the given position

Parameters:

  • position number the column you wish to delete
TableMaker:replaceColumn(options, position)
Replaces a column at a specific position with the newly provided formatting

Parameters:

  • options table table of options suitable for a TextFormatter object. See https://github.com/demonnic/fText/wiki/fText
  • position number which column you are replacing, counting from the left.
TableMaker:addRow(columnEntries, position)
Adds a row of output to the table

Parameters:

  • columnEntries table This indexed table contains an entry for each column in the table. Entries in the table must be strings, a table of options for insertPopup or insertLink, or a function which returns one of these things
  • position number position for the row you want to add, counting from the top down. If not provided defaults to the last line in the table.
TableMaker:deleteRow(position)
Deletes the row at the given position

Parameters:

  • position number the row to delete
TableMaker:replaceRow(columnEntries, position)
Replaces a row of output in the table

Parameters:

  • columnEntries table This indexed table contains an entry for each column in the table. Entries in the table must be strings, a table of options for insertPopup or insertLink, or a function which returns one of these things
  • position number position for the row you want to add, counting from the top down.
TableMaker:setCell(row, column, entry)
Sets a specific cell's display information

Parameters:

  • row number the row number of the cell, counted from the top down
  • column number the column number of the cell, counted from the left
  • entry What to set the entry to. Must be a string, or a table of options for insertLink/insertPopup if allowPopups is set. Or a function which returns one of these things
TableMaker:enablePopups()
enables making cells which incorporate insertLink/insertPopup
TableMaker:enableAutoEcho()
enables autoEcho so that when assemble is called it echos automatically
TableMaker:disableAutoEcho()
disables autoecho. Cannot be used if allowPopups is set
TableMaker:enableAutoClear()
Enables automatically clearing the miniconsole we echo to
TableMaker:disableAutoClear()
Disables automatically clearing the miniconsole we echo to
TableMaker:setAutoEchoConsole(console)
Set the miniconsole to echo to

Parameters:

  • console The miniconsole to autoecho to. Set to "main" or do not pass the parameter to autoecho to the main console. Can be a string name of the console, or a Geyser MiniConsole
TableMaker:assemble()
Assemble the table. If autoEcho is enabled/set to true, will automatically echo. Otherwise, returns the formatted string to echo the table
TableMaker:new(options)
Creates and returns a new TableMaker. See https://github.com/demonnic/fText/wiki/TableMaker for valid entries to the options table.

Parameters:

  • options table table of options for the TableMaker object
generated by LDoc 1.4.6 Last updated 2020-06-19 19:46:32