Widget handlers

Revision as of 04:49, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page Widget handlers to Widget handlers without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Widget API

This is a list of all of the types of handlers allowed, and grouped by frame type as returned by the :GetFrameType() method or used in XML.

ReferenceEdit

  • As of patch 4.0.1, event arguments are no longer set as global variables, and must be passed to the handlers correctly if defined in XML.

BaseEdit

Event handlers used by all major Ui elements.

OnLoad(self) - called once at element load time, just after element is created in Lua
OnUpdate(self, elapsed) - called every frame, with elapsed time since last frame

AlphaEdit

from Animation:
OnPlay(self)
OnPause(self)
OnStop(self)
OnFinished(self)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

AnimationEdit

OnPlay(self)
OnPause(self)
OnStop(self)
OnFinished(self)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

AnimationGroupEdit

OnPlay(self)
OnPause(self)
OnStop(self)
OnFinished(self)
OnLoop(self, loopState)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

BrowserEdit

OnButtonUpdate
OnError
OnExternalLink
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

ButtonEdit

OnClick(self, button, down)
OnDoubleClick(self, button)
PostClick(self, button, down)
PreClick(self, button, down)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

CheckButtonEdit

OnDisable
from Button:
OnClick(self, button, down)
OnDoubleClick(self, button)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

ColorSelectEdit

OnColorSelect(self, r, g, b)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

DressUpModelEdit

from Model:
OnAnimFinished(self)
OnUpdateModel(self)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

EditBoxEdit

OnArrowPressed(self, key)
OnCursorChanged(self, x, y, w, h)
OnEditFocusGained(self)
OnEditFocusLost(self)
OnEnterPressed(self)
OnEscapePressed(self)
OnHyperlinkClick(self, link, text, button)
OnHyperlinkEnter(self, link, text)
OnHyperlinkLeave(self, link, text)
OnInputLanguageChanged(self, language)
OnSpacePressed(self)
OnTabPressed(self)
OnTextChanged(self)
OnTextSet(self)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

FrameEdit

OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

GameTooltipEdit

OnTooltipAddMoney(self, cost)
OnTooltipCleared(self)
OnTooltipSetAchievement
OnTooltipSetDefaultAnchor
OnTooltipSetItem(self)
OnTooltipSetSpell(self)
OnTooltipSetUnit(self)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

LootButtonEdit

from Button:
OnClick(self, button, down)
OnDoubleClick(self, button)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

MessageFrameEdit

from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

MinimapEdit

from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

ModelEdit

OnAnimFinished(self)
OnUpdateModel(self)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

PathEdit

from Animation:
OnPlay(self)
OnPause(self)
OnStop(self)
OnFinished(self)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

PlayerModelEdit

from Model:
OnAnimFinished(self)
OnUpdateModel(self)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

QuestPOIFrameEdit

OnAttributeChanged
OnDisable
OnEnable
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

RotationEdit

from Animation:
OnPlay(self)
OnPause(self)
OnStop(self)
OnFinished(self)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

ScaleEdit

from Animation:
OnPlay(self)
OnPause(self)
OnStop(self)
OnFinished(self)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

ScrollFrameEdit

OnHorizontalScroll(self, offset)
OnScrollRangeChanged(self, xrange, yrange)
OnVerticalScroll(self, offset)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

ScrollingMessageFrameEdit

OnHyperlinkClick(self, link, text, button)
OnHyperlinkEnter(self, link, text)
OnHyperlinkLeave(self, link, text)
OnMessageScrollChanged
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

SimpleHTMLEdit

OnHyperlinkClick(self, link, text, button)
OnHyperlinkEnter(self, link, text)
OnHyperlinkLeave(self, link, text)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

SliderEdit

OnValueChanged(self, value)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

StatusBarEdit

OnValueChanged(self, value)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

TabardModelEdit

OnAnimFinished(self)
OnUpdateModel(self)
from Frame:
OnChar(self, text)
OnDragStart(self, button)
OnDragStop(self)
OnEnter(self, motion)
OnEvent(self, event, ...)
OnHide(self)
OnKeyDown(self, key)
OnKeyUp(self, key)
OnLeave(self, motion)
OnLoad(self)
OnMouseDown(self, button)
OnMouseUp(self, button)
OnMouseWheel(self, delta)
OnReceiveDrag(self)
OnShow(self)
OnSizeChanged(self, w, h)
OnUpdate(self, elapsed)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)

TranslationEdit

from Animation:
OnPlay(self)
OnPause(self)
OnStop(self)
OnFinished(self)
from Base:
OnLoad(self)
OnUpdate(self, elapsed)