-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
Tim West edited this page Mar 31, 2023
·
1 revision
Creates an interface.
- frameTitle : string - Text to be displayed on the title bar of the display frame for the interface.
- interface : table
local LibTextDump = LibStub("LibTextDump-1.0")
local interface = LibTextDump:New("This is MY Title")
Adds a line of text to the interface's buffer.
- text : string - Text to be added to a new line.
- dateFormat : string - Optional format parameter passed to the Lua date function. If present, prefixes text with [dateFormat].
interface:AddLine("Hello, there!")
interface:AddLine("What is the current time?", "%X")
interface:AddLine("What is today's date?", "%Y-%m-%d")
Output:
Hello, there!
[02:04:55] What is the current time?
[2016-08-09] What is today's date?
Clears the contents of the interface's buffer.
Shows the display frame for the interface, populated with the contents of the interface's buffer.
- separator : string or nil - Optional separator for concatenating the buffer's lines together. Defaults to a newline.
Inserts a line of text at the specified position in the interface's buffer.
- position : number - Index of insertion.
- text : string - Text to be added to a new line.
- dateFormat : string - Optional format parameter passed to the Lua date function. If present, prefixes text with [dateFormat].
interface:InsertLine(3, "Hello, there!")
interface:InsertLine(3, "What is the current time?", "%X")
interface:InsertLine(3, "What is today's date?", "%Y-%m-%d")
Output:
[2016-08-09] What is today's date?
[02:04:55] What is the current time?
Hello, there!
Returns the number of lines in the interface's buffer.
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.
- interface buffer : string