195 lines
7.0 KiB
Lua
195 lines
7.0 KiB
Lua
---@meta
|
|
|
|
---@class Frame : ScriptRegion
|
|
Frame = {
|
|
--- Aborts the current drag operation.
|
|
--- @example
|
|
--- myFrame:AbortDrag()
|
|
AbortDrag = function(self) end,
|
|
|
|
--- Returns true if secure frame attributes can be changed.
|
|
--- @return boolean canChange True if attributes can be changed.
|
|
--- @example
|
|
--- local canChange = myFrame:CanChangeAttribute()
|
|
CanChangeAttribute = function(self) end,
|
|
|
|
--- Creates and returns a FontString as a child of this Frame.
|
|
--- @param name string? Optional. The name of the FontString.
|
|
--- @param layer string? Optional. The layer of the FontString.
|
|
--- @param inheritsFrom string? Optional. The name of the FontString to inherit from.
|
|
--- @return FontString fontString The created FontString.
|
|
--- @example
|
|
--- local myFontString = myFrame:CreateFontString("MyFontString", "OVERLAY")
|
|
CreateFontString = function(self, name, layer, inheritsFrom) end,
|
|
|
|
--- Draws a line.
|
|
--- @param name string? Optional. The name of the line.
|
|
--- @param drawLayer string? Optional. The layer to draw the line.
|
|
--- @param templateName string? Optional. The name of a template to use.
|
|
--- @param subLevel number? Optional. The sublevel of the line.
|
|
--- @return Line The created line.
|
|
--- @example
|
|
--- local line = myFrame:CreateLine(nil, "OVERLAY", "LineTemplate")
|
|
CreateLine = function(self, name, drawLayer, templateName, subLevel) end,
|
|
|
|
--- Creates a mask texture.
|
|
--- @param name string? Optional. The name of the mask texture.
|
|
--- @param drawLayer string? Optional. The layer to draw the mask texture.
|
|
--- @param templateName string? Optional. The name of a template to use.
|
|
--- @param subLevel number? Optional. The sublevel of the mask texture.
|
|
--- @return Texture The created mask texture.
|
|
--- @example
|
|
--- local maskTexture = myFrame:CreateMaskTexture(nil, "OVERLAY", "MaskTemplate")
|
|
CreateMaskTexture = function(self, name, drawLayer, templateName, subLevel) end,
|
|
|
|
--- Creates and returns a Texture as a child of this Frame.
|
|
--- @param name string? Optional. The name of the Texture.
|
|
--- @param layer string? Optional. The layer of the Texture.
|
|
--- @param inheritsFrom string? Optional. The name of the Texture to inherit from.
|
|
--- @return Texture texture The created Texture.
|
|
--- @example
|
|
--- local myTexture = myFrame:CreateTexture("MyTexture", "BACKGROUND")
|
|
CreateTexture = function(self, name, layer, inheritsFrom) end,
|
|
|
|
--- Disables drawing on the specified layer.
|
|
--- @param layer string The layer to disable.
|
|
--- @example
|
|
--- myFrame:DisableDrawLayer("BACKGROUND")
|
|
DisableDrawLayer = function(self, layer) end,
|
|
|
|
--- Enables drawing on the specified layer.
|
|
--- @param layer string The layer to enable.
|
|
--- @example
|
|
--- myFrame:EnableDrawLayer("BACKGROUND")
|
|
EnableDrawLayer = function(self, layer) end,
|
|
|
|
--- Sets the opacity of the frame.
|
|
--- @param alpha number The opacity value (0 to 1).
|
|
--- @example
|
|
--- myFrame:SetAlpha(0.5) -- Set to 50% opacity
|
|
SetAlpha = function(self, alpha) end,
|
|
|
|
--- Returns the frame's numeric identifier.
|
|
--- @return number id The frame's ID.
|
|
--- @example
|
|
--- local id = myFrame:GetID()
|
|
GetID = function(self) end,
|
|
|
|
--- Shows this object (it will appear if its parent is visible).
|
|
--- @example
|
|
--- myFrame:Show()
|
|
Show = function(self) end,
|
|
|
|
--- Hides this object (it and all of its children will disappear).
|
|
--- @example
|
|
--- myFrame:Hide()
|
|
Hide = function(self) end,
|
|
|
|
--- Starts moving the frame via mouse movement.
|
|
--- @example
|
|
--- myFrame:StartMoving()
|
|
StartMoving = function(self) end,
|
|
|
|
--- Stops moving the frame.
|
|
--- @example
|
|
--- myFrame:StopMovingOrSizing()
|
|
StopMovingOrSizing = function(self) end,
|
|
|
|
--- Sets whether the frame can be moved.
|
|
--- @param movable boolean True to allow moving.
|
|
--- @example
|
|
--- myFrame:SetMovable(true)
|
|
SetMovable = function(self, movable) end,
|
|
|
|
--- Sets the frame's level.
|
|
--- @param level number The level to set.
|
|
--- @example
|
|
--- myFrame:SetFrameLevel(5)
|
|
SetFrameLevel = function(self, level) end,
|
|
|
|
--- Sets the frame's strata.
|
|
--- @param strata string The strata to set (e.g., "BACKGROUND", "MEDIUM", "HIGH").
|
|
--- @example
|
|
--- myFrame:SetFrameStrata("HIGH")
|
|
SetFrameStrata = function(self, strata) end,
|
|
|
|
--- Registers the frame for a specific event.
|
|
--- @param eventName string The name of the event to register.
|
|
--- @example
|
|
--- myFrame:RegisterEvent("PLAYER_LOGIN")
|
|
RegisterEvent = function(self, eventName) end,
|
|
|
|
--- Unregisters an event from the frame.
|
|
--- @param eventName string The name of the event to unregister.
|
|
--- @example
|
|
--- myFrame:UnregisterEvent("PLAYER_LOGIN")
|
|
UnregisterEvent = function(self, eventName) end,
|
|
|
|
--- Sets the backdrop of the frame according to the specification provided.
|
|
--- @param backdropTable table? Optional. A table defining the backdrop.
|
|
--- @example
|
|
--- myFrame:SetBackdrop({bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"})
|
|
SetBackdrop = function(self, backdropTable) end,
|
|
|
|
--- Sets the frame's backdrop color.
|
|
--- @param r number The red component of the color.
|
|
--- @param g number The green component of the color.
|
|
--- @param b number The blue component of the color.
|
|
--- @param a number? Optional. The alpha component of the color.
|
|
--- @example
|
|
--- myFrame:SetBackdropColor(0, 0, 0, 0.5) -- Set to semi-transparent black
|
|
SetBackdropColor = function(self, r, g, b, a) end,
|
|
|
|
--- Sets the frame's backdrop border color.
|
|
--- @param r number The red component of the border color.
|
|
--- @param g number The green component of the border color.
|
|
--- @param b number The blue component of the border color.
|
|
--- @param a number? Optional. The alpha component of the border color.
|
|
--- @example
|
|
--- myFrame:SetBackdropBorderColor(1, 1, 1) -- Set to white
|
|
SetBackdropBorderColor = function(self, r, g, b, a) end,
|
|
|
|
--- Sets whether this frame will get keyboard input.
|
|
--- @param enableFlag boolean True to enable keyboard input.
|
|
--- @example
|
|
--- myFrame:EnableKeyboard(true)
|
|
EnableKeyboard = function(self, enableFlag) end,
|
|
|
|
--- Sets whether this frame will get mouse input.
|
|
--- @param enableFlag boolean True to enable mouse input.
|
|
--- @example
|
|
--- myFrame:EnableMouse(true)
|
|
EnableMouse = function(self, enableFlag) end,
|
|
|
|
--- Sets whether this frame will get mouse wheel notifications.
|
|
--- @param enableFlag boolean True to enable mouse wheel notifications.
|
|
--- @example
|
|
--- myFrame:EnableMouseWheel(true)
|
|
EnableMouseWheel = function(self, enableFlag) end,
|
|
|
|
--- Sets the height of the object.
|
|
--- @param height number The height to set.
|
|
--- @example
|
|
--- myFrame:SetHeight(200)
|
|
SetHeight = function(self, height) end,
|
|
|
|
--- Sets the width of the object.
|
|
--- @param width number The width to set.
|
|
--- @example
|
|
--- myFrame:SetWidth(300)
|
|
SetWidth = function(self, width) end,
|
|
|
|
--- Sets the size of the frame.
|
|
--- @param width number The width to set.
|
|
--- @param height number The height to set.
|
|
--- @example
|
|
--- myFrame:SetSize(300, 200)
|
|
SetSize = function(self, width, height) end,
|
|
|
|
--- Sets the parent for this frame.
|
|
--- @param parent Frame|string The parent frame or name of the parent frame.
|
|
--- @example
|
|
--- myFrame:SetParent(otherFrame)
|
|
SetParent = function(self, parent) end,
|
|
}
|