126 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			126 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
---@meta
 | 
						|
 | 
						|
---@class ScrollingMessageFrame : Frame, FontInstance
 | 
						|
ScrollingMessageFrame = {
 | 
						|
	--- Adds a message to the frame.
 | 
						|
	--- @param text string The message text.
 | 
						|
	--- @param r? number Optional. The red color component.
 | 
						|
	--- @param g? number Optional. The green color component.
 | 
						|
	--- @param b? number Optional. The blue color component.
 | 
						|
	--- @param id? number Optional. A message identifier.
 | 
						|
	--- @param holdTime? number Optional. How long to display the message.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:AddMessage("Hello", 1, 0, 0)
 | 
						|
	AddMessage = function(self, text, r, g, b, id, holdTime) end,
 | 
						|
 | 
						|
	--- Clears all messages from the frame.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:Clear()
 | 
						|
	Clear = function(self) end,
 | 
						|
 | 
						|
	--- Gets the fade duration for messages.
 | 
						|
	--- @return number duration The fade duration in seconds.
 | 
						|
	--- @example
 | 
						|
	--- local duration = myFrame:GetFadeDuration()
 | 
						|
	GetFadeDuration = function(self) end,
 | 
						|
 | 
						|
	--- Gets whether fading is enabled.
 | 
						|
	--- @return boolean enabled True if fading is enabled.
 | 
						|
	--- @example
 | 
						|
	--- local enabled = myFrame:GetFading()
 | 
						|
	GetFading = function(self) end,
 | 
						|
 | 
						|
	--- Gets the time messages remain visible.
 | 
						|
	--- @return number time The time in seconds.
 | 
						|
	--- @example
 | 
						|
	--- local time = myFrame:GetTimeVisible()
 | 
						|
	GetTimeVisible = function(self) end,
 | 
						|
 | 
						|
	--- Gets the current scroll offset.
 | 
						|
	--- @return number offset The scroll offset.
 | 
						|
	--- @example
 | 
						|
	--- local offset = myFrame:GetScrollOffset()
 | 
						|
	GetScrollOffset = function(self) end,
 | 
						|
 | 
						|
	--- Gets the insert mode for new messages.
 | 
						|
	--- @return string mode The insert mode ("TOP" or "BOTTOM").
 | 
						|
	--- @example
 | 
						|
	--- local mode = myFrame:GetInsertMode()
 | 
						|
	GetInsertMode = function(self) end,
 | 
						|
 | 
						|
	--- Scrolls down one line.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:ScrollDown()
 | 
						|
	ScrollDown = function(self) end,
 | 
						|
 | 
						|
	--- Scrolls up one line.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:ScrollUp()
 | 
						|
	ScrollUp = function(self) end,
 | 
						|
 | 
						|
	--- Scrolls to the bottom of the frame.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:ScrollToBottom()
 | 
						|
	ScrollToBottom = function(self) end,
 | 
						|
 | 
						|
	--- Scrolls to the top of the frame.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:ScrollToTop()
 | 
						|
	ScrollToTop = function(self) end,
 | 
						|
 | 
						|
	--- Sets the fade duration for messages.
 | 
						|
	--- @param duration number The fade duration in seconds.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:SetFadeDuration(0.3)
 | 
						|
	SetFadeDuration = function(self, duration) end,
 | 
						|
 | 
						|
	--- Sets whether fading is enabled.
 | 
						|
	--- @param enabled boolean True to enable fading.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:SetFading(true)
 | 
						|
	SetFading = function(self, enabled) end,
 | 
						|
 | 
						|
	--- Sets how long messages remain visible.
 | 
						|
	--- @param time number The time in seconds.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:SetTimeVisible(5)
 | 
						|
	SetTimeVisible = function(self, time) end,
 | 
						|
 | 
						|
	--- Sets the insert mode for new messages.
 | 
						|
	--- @param mode string The insert mode ("TOP" or "BOTTOM").
 | 
						|
	--- @example
 | 
						|
	--- myFrame:SetInsertMode("TOP")
 | 
						|
	SetInsertMode = function(self, mode) end,
 | 
						|
 | 
						|
	--- Sets the maximum number of lines to display.
 | 
						|
	--- @param maxLines number The maximum number of lines.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:SetMaxLines(50)
 | 
						|
	SetMaxLines = function(self, maxLines) end,
 | 
						|
 | 
						|
	--- Sets the scroll offset.
 | 
						|
	--- @param offset number The scroll offset.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:SetScrollOffset(5)
 | 
						|
	SetScrollOffset = function(self, offset) end,
 | 
						|
 | 
						|
	--- Updates the color of a message by its ID.
 | 
						|
	--- @param id number The message ID.
 | 
						|
	--- @param r number The red color component.
 | 
						|
	--- @param g number The green color component.
 | 
						|
	--- @param b number The blue color component.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:UpdateColorByID(1, 1, 0, 0)
 | 
						|
	UpdateColorByID = function(self, id, r, g, b) end,
 | 
						|
 | 
						|
	--- Scrolls down one page.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:PageDown()
 | 
						|
	PageDown = function(self) end,
 | 
						|
 | 
						|
	--- Scrolls up one page.
 | 
						|
	--- @example
 | 
						|
	--- myFrame:PageUp()
 | 
						|
	PageUp = function(self) end,
 | 
						|
}
 |