# SimpleScriptRegionAPI (widget methods): World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/SimpleScriptRegionAPI

## Functions

### CanChangeProtectedState

```lua
canChange = self:CanChangeProtectedState()
```

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

Returns:
- `canChange`: bool

### CanPropagateMouseClicks

```lua
canPropagate = self:CanPropagateMouseClicks()
```

Returns:
- `canPropagate`: bool

### CanPropagateMouseMotion

```lua
canPropagate = self:CanPropagateMouseMotion()
```

Returns:
- `canPropagate`: bool

### ClearScripts

```lua
self:ClearScripts()
```

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

### CollapsesLayout

```lua
collapsesLayout = self:CollapsesLayout()
```

Returns:
- `collapsesLayout`: bool

### EnableMouse

```lua
self:EnableMouse([enable])
```

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

Arguments:
- `enable`: bool, default false

### EnableMouseMotion

```lua
self:EnableMouseMotion([enable])
```

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

Arguments:
- `enable`: bool, default false

### EnableMouseWheel

```lua
self:EnableMouseWheel([enable])
```

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

Arguments:
- `enable`: bool, default false

### FocusEnter

```lua
self:FocusEnter([fromMouseMotion])
```

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

Arguments:
- `fromMouseMotion`: bool, default true

### FocusExit

```lua
self:FocusExit([fromMouseMotion])
```

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

Arguments:
- `fromMouseMotion`: bool, default true

### GetBottom

```lua
bottom = self:GetBottom()
```

May return nothing.

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

Returns:
- `bottom`: uiUnit

### GetCenter

```lua
x, y = self:GetCenter()
```

May return nothing.

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

Returns:
- `x`: uiUnit
- `y`: uiUnit

### GetHeight

```lua
height = self:GetHeight([ignoreRect])
```

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

Arguments:
- `ignoreRect`: bool, default false

Returns:
- `height`: uiUnit

### GetLeft

```lua
left = self:GetLeft()
```

May return nothing.

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

Returns:
- `left`: uiUnit

### GetRect

```lua
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:
- `left`: uiUnit
- `bottom`: uiUnit
- `width`: uiUnit
- `height`: uiUnit

### GetRight

```lua
right = self:GetRight()
```

May return nothing.

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

Returns:
- `right`: uiUnit

### GetRoundLayoutToNearestPixel

```lua
enabled = self:GetRoundLayoutToNearestPixel()
```

Returns:
- `enabled`: bool

### GetScaledRect

```lua
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:
- `left`: uiUnit
- `bottom`: uiUnit
- `width`: uiUnit
- `height`: uiUnit

### GetScript

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

Arguments:
- `scriptTypeName`: ScriptTypeName
- `bindingType`: ScriptBindingType, default "Extrinsic"

Returns:
- `script`: LuaFunctionReference

### GetSize

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

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

Arguments:
- `ignoreRect`: bool, default false

Returns:
- `width`: uiUnit
- `height`: uiUnit

### GetSourceLocation

```lua
location = self:GetSourceLocation()
```

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

Returns:
- `location`: string

### GetTop

```lua
top = self:GetTop()
```

May return nothing.

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

Returns:
- `top`: uiUnit

### GetWidth

```lua
width = self:GetWidth([ignoreRect])
```

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

Arguments:
- `ignoreRect`: bool, default false

Returns:
- `width`: uiUnit

### HasScript

```lua
hasScript = self:HasScript(scriptName)
```

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

Arguments:
- `scriptName`: cstring

Returns:
- `hasScript`: bool

### Hide

```lua
self:Hide()
```

### HookScript

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

Arguments:
- `scriptTypeName`: ScriptTypeName
- `script`: LuaFunctionReference
- `bindingType`: ScriptBindingType, default "Extrinsic"

Returns:
- `success`: bool

### Intersects

```lua
intersects = self:Intersects(region)
```

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

Arguments:
- `region`: ScriptRegion

Returns:
- `intersects`: bool

### IsAnchoringRestricted

```lua
isRestricted = self:IsAnchoringRestricted()
```

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

Returns:
- `isRestricted`: bool

### IsAnchoringSecret

```lua
isSecret = self:IsAnchoringSecret()
```

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

Returns:
- `isSecret`: bool

### IsCollapsed

```lua
isCollapsed = self:IsCollapsed()
```

Returns:
- `isCollapsed`: bool

### IsDragging

```lua
isDragging = self:IsDragging()
```

Returns:
- `isDragging`: bool

### IsMouseClickEnabled

```lua
enabled = self:IsMouseClickEnabled()
```

Returns:
- `enabled`: bool

### IsMouseEnabled

```lua
enabled = self:IsMouseEnabled()
```

Returns:
- `enabled`: bool

### IsMouseMotionEnabled

```lua
enabled = self:IsMouseMotionEnabled()
```

Returns:
- `enabled`: bool

### IsMouseMotionFocus

```lua
isMouseMotionFocus = self:IsMouseMotionFocus()
```

Returns:
- `isMouseMotionFocus`: bool

### IsMouseOver

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

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

Arguments:
- `offsetTop`: uiUnit, default 0
- `offsetBottom`: uiUnit, default 0
- `offsetLeft`: uiUnit, default 0
- `offsetRight`: uiUnit, default 0

Returns:
- `isMouseOver`: bool

### IsMouseWheelEnabled

```lua
enabled = self:IsMouseWheelEnabled()
```

Returns:
- `enabled`: bool

### IsProtected

```lua
isProtected, isProtectedExplicitly = self:IsProtected()
```

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

Returns:
- `isProtected`: bool
- `isProtectedExplicitly`: bool

### IsRectValid

```lua
isValid = self:IsRectValid()
```

Returns:
- `isValid`: bool

### IsShown

```lua
isShown = self:IsShown()
```

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

Returns:
- `isShown`: bool

### IsVisible

```lua
isVisible = self:IsVisible()
```

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

Returns:
- `isVisible`: bool

### MouseDown

```lua
self:MouseDown([button])
```

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

Arguments:
- `button`: cstring, default "LeftButton"

### MouseUp

```lua
self:MouseUp([button])
```

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

Arguments:
- `button`: cstring, default "LeftButton"

### SetCollapsesLayout

```lua
self:SetCollapsesLayout(collapsesLayout)
```

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

Arguments:
- `collapsesLayout`: bool

### SetMouseClickEnabled

```lua
self:SetMouseClickEnabled([enabled])
```

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

Arguments:
- `enabled`: bool, default false

### SetMouseMotionEnabled

```lua
self:SetMouseMotionEnabled([enabled])
```

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

Arguments:
- `enabled`: bool, default false

### SetParent

```lua
self:SetParent([parent])
```

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

Arguments:
- `parent`: SimpleFrame, may be nil

### SetPassThroughButtons

```lua
self:SetPassThroughButtons(buttons)
```

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

Arguments:
- `buttons`: MouseButton

### SetPropagateMouseClicks

```lua
self:SetPropagateMouseClicks(propagate)
```

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

Arguments:
- `propagate`: bool

### SetPropagateMouseMotion

```lua
self:SetPropagateMouseMotion(propagate)
```

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

Arguments:
- `propagate`: bool

### SetRoundLayoutToNearestPixel

```lua
self:SetRoundLayoutToNearestPixel(enabled)
```

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

Arguments:
- `enabled`: bool

### SetScript

```lua
self:SetScript(scriptTypeName, [script])
```

Arguments:
- `scriptTypeName`: ScriptTypeName
- `script`: LuaFunctionReference, may be nil

### SetShown

```lua
self:SetShown([show])
```

Arguments:
- `show`: bool, default false

### ShouldButtonPassThrough

```lua
shouldPassThrough = self:ShouldButtonPassThrough(button)
```

Arguments:
- `button`: MouseButton

Returns:
- `shouldPassThrough`: bool

### Show

```lua
self:Show()
```

---
Make an addon with your 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."
