Widget script handlers

Widget scripts allow you to respond to user interaction and other types of widget events (such as a frame being shown or hidden). This page lists the available scripts and the list of widget types for which each script is valid. 
Widget_Hierarchy.png|UI.xsd, Documentation
==Example==
Registers for clicks on a widget with the script.
local btn = CreateFrame("Button", nil, UIParent, "UIPanelButtonTemplate")
btn:SetPoint("CENTER")
btn:SetSize(100, 40)
btn:SetText("Click me")
btn:SetScript("OnClick", function(self, button, down)
	print("Pressed", button, down and "down" or "up")
end)
btn:RegisterForClicks("AnyDown", "AnyUp")
-- Pressed LeftButton down
-- Pressed LeftButton up
==Object==
==AnimationGroup==
==Animation==
==ScriptRegion==
==Frame==
===Button===
===ColorSelect===
===Cooldown===
===EditBox===
===FogOfWarFrame===
: OnUiMapChanged(self, uiMapID)
===GameTooltip===
: OnTooltipAddMoney(self, cost, maxcost) - Run when an amount of money should be added to the tooltip.
: OnTooltipCleared(self) - Run when the tooltip is hidden or its content is cleared.
: OnTooltipSetAchievement(self) - Run when the tooltip is filled with information about an achievement.
: OnTooltipSetDefaultAnchor(self) - Run when the tooltip is repositioned to its default anchor location.
: OnTooltipSetEquipmentSet(self) - Run when the tooltip is filled with information about an equipment set.
: OnTooltipSetFramestack(self, highlightFrame) - Run when the tooltip is filled with a list of frames under the mouse cursor.
: OnTooltipSetItem(self) - Run when the tooltip is filled with information about an item.
: OnTooltipSetQuest(self) - Run when the tooltip is filled with information about a quest.
: OnTooltipSetSpell(self) - Run when the tooltip is filled with information about a spell.
: OnTooltipSetUnit(self) - Run when the tooltip is filled with information about a unit.
===Model===
PlayerModel / TabardModel inherit the handlers from Model.
: OnAnimFinished(self) - Run when the model's animation finishes.
: OnAnimStarted(self)
: OnModelLoaded(self)
====CinematicModel====
: OnPanFinished 
====DressUpModel====
: OnDressModel(self)
===MovieFrame===
: OnMovieFinished(self) - Run when a movie frame's movie ends.
: OnMovieHideSubtitle(self) - Runs when the movie's most recently displayed subtitle should be hidden.
: OnMovieShowSubtitle(self, text) - Runs when a subtitle for the playing movie should be displayed.
===ScrollFrame===
===Slider===
: OnMinMaxChanged(self, min, max) - Run when the slider's or status bar's minimum and maximum values change.
: OnValueChanged(self, value, userInput) - Run when the slider's or status bar's value changes.
===StatusBar===
: OnMinMaxChanged(self, min, max) - Run when the slider's or status bar's minimum and maximum values change.
: OnValueChanged(self, value) - Run when the slider's or status bar's value changes.
===ModelScene===
: OnDressModel(self)
===ModelSceneActor===
Scripts for this widget can only be set from XML.
: OnAnimFinished(self)
: OnModelLoaded(self)
: OnModelLoading
==References==
* 
* 
* 
*