WowAddons

World of Warcraft Forever API · SimpleScriptRegionAPI.md, for your AI

SimpleScriptRegionAPI (widget methods)

55 functions, as Blizzard documents them for Forever 1.60.1 (70959).

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

Functions

CanChangeProtectedState

canChange = self:CanChangeProtectedState()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

canChangebool

CanPropagateMouseClicks

canPropagate = self:CanPropagateMouseClicks()

Returns

canPropagatebool

CanPropagateMouseMotion

canPropagate = self:CanPropagateMouseMotion()

Returns

canPropagatebool

ClearScripts

self:ClearScripts()

Remove all script handlers set through Scripts in XML or SetScript in Lua

CollapsesLayout

collapsesLayout = self:CollapsesLayout()

Returns

collapsesLayoutbool

EnableMouse

self:EnableMouse([enable])

Protected: only Blizzard's own code may call it.

Arguments

enablebool default false

EnableMouseMotion

self:EnableMouseMotion([enable])

Protected: only Blizzard's own code may call it.

Arguments

enablebool default false

EnableMouseWheel

self:EnableMouseWheel([enable])

Protected: only Blizzard's own code may call it.

Arguments

enablebool default false

FocusEnter

self:FocusEnter([fromMouseMotion])

Protected: only Blizzard's own code may call it.

Arguments

fromMouseMotionbool default true

FocusExit

self:FocusExit([fromMouseMotion])

Protected: only Blizzard's own code may call it.

Arguments

fromMouseMotionbool default true

GetBottom

bottom = self:GetBottom()

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

bottomuiUnit

GetCenter

x, y = self:GetCenter()

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

xuiUnit
yuiUnit

GetHeight

height = self:GetHeight([ignoreRect])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

ignoreRectbool default false

Returns

heightuiUnit

GetLeft

left = self:GetLeft()

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

leftuiUnit

GetRect

left, bottom, width, height = self:GetRect()

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

leftuiUnit
bottomuiUnit
widthuiUnit
heightuiUnit

GetRight

right = self:GetRight()

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

rightuiUnit

GetRoundLayoutToNearestPixel

enabled = self:GetRoundLayoutToNearestPixel()

Returns

enabledbool

GetScaledRect

left, bottom, width, height = self:GetScaledRect()

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

leftuiUnit
bottomuiUnit
widthuiUnit
heightuiUnit

GetScript

script = self:GetScript(scriptTypeName, [bindingType])

Arguments

scriptTypeNameScriptTypeName
bindingTypeScriptBindingType default "Extrinsic"

Returns

scriptLuaFunctionReference

GetSize

width, height = self:GetSize([ignoreRect])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

ignoreRectbool default false

Returns

widthuiUnit
heightuiUnit

GetSourceLocation

location = self:GetSourceLocation()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

locationstring

GetTop

top = self:GetTop()

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

topuiUnit

GetWidth

width = self:GetWidth([ignoreRect])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

ignoreRectbool default false

Returns

widthuiUnit

HasScript

hasScript = self:HasScript(scriptName)

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

scriptNamecstring

Returns

hasScriptbool

Hide

self:Hide()

HookScript

success = self:HookScript(scriptTypeName, script, [bindingType])

Arguments

scriptTypeNameScriptTypeName
scriptLuaFunctionReference
bindingTypeScriptBindingType default "Extrinsic"

Returns

successbool

Intersects

intersects = self:Intersects(region)

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

regionScriptRegion

Returns

intersectsbool

IsAnchoringRestricted

isRestricted = self:IsAnchoringRestricted()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

isRestrictedbool

IsAnchoringSecret

isSecret = self:IsAnchoringSecret()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

isSecretbool

IsCollapsed

isCollapsed = self:IsCollapsed()

Returns

isCollapsedbool

IsDragging

isDragging = self:IsDragging()

Returns

isDraggingbool

IsMouseClickEnabled

enabled = self:IsMouseClickEnabled()

Returns

enabledbool

IsMouseEnabled

enabled = self:IsMouseEnabled()

Returns

enabledbool

IsMouseMotionEnabled

enabled = self:IsMouseMotionEnabled()

Returns

enabledbool

IsMouseMotionFocus

isMouseMotionFocus = self:IsMouseMotionFocus()

Returns

isMouseMotionFocusbool

IsMouseOver

isMouseOver = self:IsMouseOver([offsetTop], [offsetBottom], [offsetLeft], [offsetRight])

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments

offsetTopuiUnit default 0
offsetBottomuiUnit default 0
offsetLeftuiUnit default 0
offsetRightuiUnit default 0

Returns

isMouseOverbool

IsMouseWheelEnabled

enabled = self:IsMouseWheelEnabled()

Returns

enabledbool

IsProtected

isProtected, isProtectedExplicitly = self:IsProtected()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

isProtectedbool
isProtectedExplicitlybool

IsRectValid

isValid = self:IsRectValid()

Returns

isValidbool

IsShown

isShown = self:IsShown()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

isShownbool

IsVisible

isVisible = self:IsVisible()

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Returns

isVisiblebool

MouseDown

self:MouseDown([button])

Protected: only Blizzard's own code may call it.

Arguments

buttoncstring default "LeftButton"

MouseUp

self:MouseUp([button])

Protected: only Blizzard's own code may call it.

Arguments

buttoncstring default "LeftButton"

SetCollapsesLayout

self:SetCollapsesLayout(collapsesLayout)

Protected: only Blizzard's own code may call it.

Arguments

collapsesLayoutbool

SetMouseClickEnabled

self:SetMouseClickEnabled([enabled])

Protected: only Blizzard's own code may call it.

Arguments

enabledbool default false

SetMouseMotionEnabled

self:SetMouseMotionEnabled([enabled])

Protected: only Blizzard's own code may call it.

Arguments

enabledbool default false

SetParent

self:SetParent([parent])

Protected: only Blizzard's own code may call it.

Arguments

parentSimpleFrame may be nil

SetPassThroughButtons

self:SetPassThroughButtons(buttons)

Protected: only Blizzard's own code may call it.

Arguments

buttonsMouseButton

SetPropagateMouseClicks

self:SetPropagateMouseClicks(propagate)

Protected: only Blizzard's own code may call it.

Arguments

propagatebool

SetPropagateMouseMotion

self:SetPropagateMouseMotion(propagate)

Protected: only Blizzard's own code may call it.

Arguments

propagatebool

SetRoundLayoutToNearestPixel

self:SetRoundLayoutToNearestPixel(enabled)

Protected: only Blizzard's own code may call it.

Arguments

enabledbool

SetScript

self:SetScript(scriptTypeName, [script])

Arguments

scriptTypeNameScriptTypeName
scriptLuaFunctionReference may be nil

SetShown

self:SetShown([show])

Arguments

showbool default false

ShouldButtonPassThrough

shouldPassThrough = self:ShouldButtonPassThrough(button)

Arguments

buttonMouseButton

Returns

shouldPassThroughbool

Show

self:Show()

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows