LibTextDump-1.0

API Reference

Library Methods

:New(frame_title)

Creates an interface.

Arguments

frame_title
string - Text to be displayed on the title bar of the display frame for the interface .

Return Values

interface
table

Example

local LibTextDump = LibStub("LibTextDump-1.0")
local text_dump = LibTextDump:New("This is MY Title")

Interface Methods

:AddLine(text)

Adds a line of text to the interface's buffer.

Arguments

text
string - Text to be added to a new line.

:Clear()

Clears the contents of the interface's buffer.

:Display([separator])

Shows the display frame for the interface, populated with the contents of the interface's buffer.

Arguments

separator
string or nil - Optional separator for concatenating the buffer's lines together. Defaults to a newline.

:InsertLine(position, text)

Inserts a line of text at the specified position in the interface's buffer.

Arguments

position
number - Index of insertion.
text
string - Text to be added to a new line.

:Lines()

Returns the number of lines in the interface's buffer.

:String([separator])

Returns the string representation of the interface's buffer.

separator
string or nil - Optional separator for concatenating the buffer's lines together. Defaults to a newline.

Return Values

interface buffer
string