# SimpleButtonAPI (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/SimpleButtonAPI

## Functions

### ClearDisabledTexture

```lua
self:ClearDisabledTexture()
```

### ClearHighlightTexture

```lua
self:ClearHighlightTexture()
```

### ClearNormalTexture

```lua
self:ClearNormalTexture()
```

### ClearPushedTexture

```lua
self:ClearPushedTexture()
```

### Click

```lua
self:Click([button], [isDown])
```

Arguments:
- `button`: cstring, default "LeftButton"
- `isDown`: bool, default false

### Disable

```lua
self:Disable()
```

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

### Enable

```lua
self:Enable()
```

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

### GetButtonState

```lua
buttonState = self:GetButtonState()
```

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

Returns:
- `buttonState`: SimpleButtonStateToken

### GetDisabledFontObject

```lua
font = self:GetDisabledFontObject()
```

Returns:
- `font`: SimpleFont

### GetDisabledTexture

```lua
texture = self:GetDisabledTexture()
```

Returns:
- `texture`: SimpleTexture

### GetFontString

```lua
fontString = self:GetFontString()
```

Returns:
- `fontString`: SimpleFontString

### GetHighlightFontObject

```lua
font = self:GetHighlightFontObject()
```

Returns:
- `font`: SimpleFont

### GetHighlightTexture

```lua
texture = self:GetHighlightTexture()
```

Returns:
- `texture`: SimpleTexture

### GetMotionScriptsWhileDisabled

```lua
motionScriptsWhileDisabled = self:GetMotionScriptsWhileDisabled()
```

Returns:
- `motionScriptsWhileDisabled`: bool

### GetNormalFontObject

```lua
font = self:GetNormalFontObject()
```

Returns:
- `font`: SimpleFont

### GetNormalTexture

```lua
texture = self:GetNormalTexture()
```

Returns:
- `texture`: SimpleTexture

### GetPushedTextOffset

```lua
offsetX, offsetY = self:GetPushedTextOffset()
```

Returns:
- `offsetX`: uiUnit
- `offsetY`: uiUnit

### GetPushedTexture

```lua
texture = self:GetPushedTexture()
```

Returns:
- `texture`: SimpleTexture

### GetText

```lua
text = self:GetText()
```

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

Returns:
- `text`: cstring

### GetTextHeight

```lua
height = self:GetTextHeight()
```

Returns:
- `height`: uiUnit

### GetTextWidth

```lua
width = self:GetTextWidth()
```

Returns:
- `width`: uiUnit

### IsEnabled

```lua
isEnabled = self:IsEnabled()
```

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

Returns:
- `isEnabled`: bool

### RegisterForClicks

```lua
self:RegisterForClicks(buttons)
```

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

Arguments:
- `buttons`: ClickButton

### RegisterForMouse

```lua
self:RegisterForMouse(buttons)
```

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

Arguments:
- `buttons`: ClickButton

### SetButtonState

```lua
self:SetButtonState(buttonState, [lock])
```

Arguments:
- `buttonState`: SimpleButtonStateToken
- `lock`: bool, default false

### SetDisabledAtlas

```lua
self:SetDisabledAtlas(atlas)
```

Arguments:
- `atlas`: textureAtlas

### SetDisabledFontObject

```lua
self:SetDisabledFontObject(font)
```

Arguments:
- `font`: SimpleFont

### SetDisabledTexture

```lua
self:SetDisabledTexture(asset)
```

Arguments:
- `asset`: TextureAsset

### SetEnabled

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

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

Arguments:
- `enabled`: bool, default false

### SetFontString

```lua
self:SetFontString(fontString)
```

Arguments:
- `fontString`: SimpleFontString

### SetFormattedText

```lua
self:SetFormattedText(text)
```

Arguments:
- `text`: cstring

### SetHighlightAtlas

```lua
self:SetHighlightAtlas(atlas, [blendMode])
```

Arguments:
- `atlas`: textureAtlas
- `blendMode`: BlendMode, may be nil

### SetHighlightFontObject

```lua
self:SetHighlightFontObject(font)
```

Arguments:
- `font`: SimpleFont

### SetHighlightTexture

```lua
self:SetHighlightTexture(asset, [blendMode])
```

Arguments:
- `asset`: TextureAsset
- `blendMode`: BlendMode, may be nil

### SetMotionScriptsWhileDisabled

```lua
self:SetMotionScriptsWhileDisabled(motionScriptsWhileDisabled)
```

Arguments:
- `motionScriptsWhileDisabled`: bool

### SetNormalAtlas

```lua
self:SetNormalAtlas(atlas)
```

Arguments:
- `atlas`: textureAtlas

### SetNormalFontObject

```lua
self:SetNormalFontObject(font)
```

Arguments:
- `font`: SimpleFont

### SetNormalTexture

```lua
self:SetNormalTexture(asset)
```

Arguments:
- `asset`: TextureAsset

### SetPushedAtlas

```lua
self:SetPushedAtlas(atlas)
```

Arguments:
- `atlas`: textureAtlas

### SetPushedTextOffset

```lua
self:SetPushedTextOffset(offsetX, offsetY)
```

Arguments:
- `offsetX`: uiUnit
- `offsetY`: uiUnit

### SetPushedTexture

```lua
self:SetPushedTexture(asset)
```

Arguments:
- `asset`: TextureAsset

### SetText

```lua
self:SetText([text])
```

Arguments:
- `text`: cstring, default ""

---
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."
