129 lines
4.4 KiB
Lua
129 lines
4.4 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 a fontstring.
|
|
--- @param name string? Optional. The name of the fontstring.
|
|
--- @param drawLayer string? Optional. The layer to draw the fontstring.
|
|
--- @param templateName string? Optional. The name of a template to use.
|
|
--- @return FontString The created fontstring.
|
|
--- @example
|
|
--- local fontString = myFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
|
CreateFontString = function(self, name, drawLayer, templateName) 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 a texture.
|
|
--- @param name string? Optional. The name of the texture.
|
|
--- @param drawLayer string? Optional. The layer to draw the texture.
|
|
--- @param templateName string? Optional. The name of a template to use.
|
|
--- @param subLevel number? Optional. The sublevel of the texture.
|
|
--- @return Texture The created texture.
|
|
--- @example
|
|
--- local texture = myFrame:CreateTexture(nil, "BACKGROUND", "TextureTemplate")
|
|
CreateTexture = function(self, name, drawLayer, templateName, subLevel) 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 the frame.
|
|
--- @example
|
|
--- myFrame:Show()
|
|
Show = function(self) end,
|
|
|
|
--- Hides the frame.
|
|
--- @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 frameLevel number The level to set.
|
|
--- @example
|
|
--- myFrame:SetFrameLevel(5)
|
|
SetFrameLevel = function(self, frameLevel) end,
|
|
|
|
--- Sets the frame's strata.
|
|
--- @param strata string The strata to set.
|
|
--- @example
|
|
--- myFrame:SetFrameStrata("DIALOG")
|
|
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,
|
|
}
|