Chapter 29
Widget Reference 1259
In order for adrag action to begin, the mouse buttonmust be pressed down
withinthe frame and moved more than several (∼10) pixelsinany direction
without being released.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(button)
button—Nameofthemousebuttonresponsibleforthedragaction(string)
Example:
--Illustratesscript handlersinvolvedin dragging. Dragging to or
--from eitherbutton willdisplaymessagesdetailing the process.
localnextNum= 1
locallast
localhandlers= {
“OnMouseDown“, “OnMouseUp“, “OnDragStart“, “OnDragStop“,i
“OnReceiveDrag“
}
localfunctionCreateButton()
localcurNum =nextNum
localb = CreateFrame(“Button“, “Test“..curNum,UIParent,i
“UIPanelButtonTemplate2“)
ifcurNum == 1then
b:SetPoint(“CENTER“)
else
b:SetPoint(“LEFT“, last, “RIGHT“, 5, 0)
end
b:SetText(curNum)
b:RegisterForDrag(“LeftButton“,“RightButton“)
for _, handlerinipairs(handlers) do
b:SetScript(handler,function(self,button)
button =buttonand “, “..buttonor““
DEFAULT_CHAT_FRAME:AddMessage(format(“%s: %d%s“,handler,
i
curNum,button))
end)
end
nextNum= nextNum +1
last= b
end
CreateButton()
CreateButton()
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnDragStop
Run whenthe mouse buttonisreleased after a drag started inthe frame.
OnDragStop(self)
Pdf change page order acrobat - re-order PDF pages in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Customizing Page Order of PDF Document in C# Project
move pdf pages online; rearrange pages in pdf document
Pdf change page order acrobat - VB.NET PDF Page Move Library: re-order PDF pages in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Sort PDF Document Pages Using VB.NET Demo Code
how to reorder pages in a pdf document; move pages in a pdf
1260 Part IV
Reference
Thisscript is run only for drags started withinthe frame, regardless of the
cursor’spositionat the end of the drag. For further details, see the example
underOnDragStart.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(button)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnEditFocusGained
Runwhen the edit box becomes focused for keyboard input.
OnEditFocusGained(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(editbox)
Thiswidget script isdefined for the following widget types: EditBox
OnEditFocusLost
Run when the edit box loseskeyboardinput focus.
OnEditFocusLost(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(exitbox)
Thiswidget script isdefined for the following widget types: EditBox
OnEnable
Run when the frame is enabled.
OnEnable(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnEnter
Run when the mouse cursor entersthe frame’s interactive area.
OnEnter(self,motion)
Note that aframe’s mouse-interactive areacan be changed viaits
:SetHitRectInsets()method.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
.NET PDF Document Viewing, Annotation, Conversion & Processing
Insert, delete PDF pages. Re-order, rotate PDF pages. PDF Read. Print. Support for all the print modes in Acrobat PDF. Print only specified page ranges.
rearrange pdf pages in preview; how to reorder pages in pdf
VB.NET PDF: How to Create Watermark on PDF Document within
create a watermark to PDF file in order to help or image (such as business's logo) on any desired PDF page. And with our PDF Watermark Creator, users need no
pdf rearrange pages online; move pages within pdf
Chapter 29
Widget Reference 1261
motionTrueifthehandlerisbeingrunduetoactualmousemove-
ment;false if the cursor entered the frame due to other circumstances
(such as the frame being created underneath the cursor) (boolean)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnEnterPressed
Run whenthe Enter (or Return) key is pressed while the edit boxhaskeyboard
focus.
OnEnterPressed(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(editbox)
Thiswidget script isdefined for the following widget types: EditBox
OnEscapePressed
Run whenthe Escape key is pressed while the edit boxhas keyboard focus.
OnEscapePressed(self)
By default, anEditBox provides no way to clear keyboard input focus(though
clicking inanother edit boxwill focus it instead)—providing an
OnEscapePressedhandlertocall:ClearFocus()(orinheritingfromthe
default UI’sInputBoxTemplate, which does so) may prove
useful.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(editbox)
Thiswidget script isdefined for the following widget types: EditBox
OnEvent
Run whenever anevent firesfor which the frame is registered.
OnEvent(self,“event“,...)
In order for this script to be run, the frame must be registered for at least one
event viaits:RegisterEvent() method. See the EventsReference for details
of each event.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
event—Nameoftheevent(string)
...—Argumentsspecific totheevent(list)
Thiswidget script isdefined for the following widget types: Alpha, Animation,
AnimationGroup, Button, CheckButton, ColorSelect, Cooldown,
DressUpModel, EditBox, Frame, GameTooltip, MessageFrame, Minimap,
Model, MovieFrame, Path, PlayerModel, Rotation, Scale, ScrollFrame,
GIF to PDF Converter | Convert GIF to PDF, Convert PDF to GIF
as easy as printing; Support both single-page and batch Drop image to process GIF to PDF image conversion; Provide filter option to change brightness, color and
reordering pdf pages; move pages in pdf online
JPEG to PDF Converter | Convert JPEG to PDF, Convert PDF to JPEG
It can be used standalone. JPEG to PDF Converter is able to convert image files to PDF directly without the software Adobe Acrobat Reader for conversion.
change page order pdf preview; reverse page order pdf online
1262 Part IV
Reference
ScrollingMessageFrame, SimpleHTML, Slider, StatusBar, TabardModel,
Translation
OnFinished
Run when the animation (or animation group) finishesanimating.
OnFinished(self,requested)
Doesnot run for an animation group set to loop unless the group’s:Finish()
method is called.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(animation)
requestedTrueifanimationfinishedbecauseofacallto AnimationGroup:
Finish(); falseotherwise(boolean)
Thiswidget script isdefined for the following widget types: Alpha, Animation,
AnimationGroup, Path, Rotation, Scale, Translation
OnHide
Run when the frame’svisibility changesto hidden.
OnHide(self)
Thisscript handler runs whether the frame was directly hidden (viaits
:Hide()method)orimplicitlyhiddenduetoaparentframebeinghidden.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnHorizontalScroll
Run when the scroll frame’s horizontalscroll positionchanges.
OnHorizontalScroll(self,offset)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(scrollframe)
offset—Newhorizontalscrollposition(inpixels,measuredfromtheleftmost
scroll position) (number)
Thiswidget script isdefined for the following widget types: ScrollFrame
OnHyperlinkClick
Run when the mouse clicks ahyperlink inthe scrolling message frame or
SimpleHTML frame.
OnHyperlinkClick(self,“linkData“, “link“,“button“)
Thisscript handler isrun when the mouse buttonisreleasedwhile the mouse
cursor is over the same hyperlink text inwhichthe mouse buttonwas pressed.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
PDF to WORD Converter | Convert PDF to Word, Convert Word to PDF
PDF to Word Converter has accurate output, and PDF to Word Converter doesn't need the support of Adobe Acrobat & Microsoft Word.
how to move pages in pdf files; reorder pages in pdf preview
TIFF to PDF Converter | Convert TIFF to PDF, Convert PDF to TIFF
PDF to TIFF Converter doesn't require other third-party such as Adobe Acrobat. Completely free for use and upgrade; Easy to convert multi-page PDF files to multi
reorder pages pdf file; reorder pdf pages in preview
Chapter 29
Widget Reference 1263
linkData—Essentialdata(linktype:linkdataportion)ofthehyperlink(e.g.
“quest:982:17“)(string)
link—Completehyperlinktext(e.g.“|cffffff00|Hquest:982:17|
h[Deep Ocean, Vast Sea]|h|r“)(string,hyperlink)
button—Nameofthemousebuttonresponsiblefortheclickaction(string)
Example:
--Printinformationabouta clicked hyperlink
localsomeMessageFrame= WowLuaFrameOutput
someMessageFrame:SetScript(“OnHyperlinkClick“, function(self,i
linkData, link, button)
self:AddMessage(format(“Youclickedon%swith %s“,link,button))
end)
Thiswidget script isdefined for the following widget types:
ScrollingMessageFrame, SimpleHTML
OnHyperlinkEnter
Run whenthe mouse moves over ahyperlink inthe scrolling message frame or
SimpleHTML frame.
OnHyperlinkEnter(self,“linkData“, “link“)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
linkData—Essentialdata(linktype:linkdataportion)ofthehyperlink(e.g.
“quest:982:17“)(string)
link—Completehyperlinktext(e.g.“|cffffff00|Hquest:982:17|
h[Deep Ocean, Vast Sea]|h|r“)(string,hyperlink)
Example:
--Printsdataaboutthehyperlinkyouenterinthedefaultchatframe
DEFAULT_CHAT_FRAME:SetScript(“OnHyperlinkEnter“,function(self,i
linkData, link)
localcolor =link:match(“|c%x%x%x%x%x%x%x%x“)or““
self:AddMessage(“linkData:“..linkData)
self:AddMessage(format(“link: %s%s“, color,link:gsub(“|“,“||“)))
end)
Thiswidget script isdefined for the following widget types:
ScrollingMessageFrame, SimpleHTML
OnHyperlinkLeave
Run whenthe mouse moves away from a hyperlink in the scrolling message
frame or SimpleHTML frame.
OnHyperlinkLeave(self,“linkData“, “link“)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
linkData—Essentialdata(linktype:linkdataportion)ofthehyperlink(e.g.
“quest:982:17“)(string)
link—Completehyperlinktext(e.g.“|cffffff00|Hquest:982:17|h
[Deep Ocean, Vast Sea]|h|r“)(string,hyperlink)
DICOM to PDF Converter | Convert DICOM to PDF, Convert PDF to
Adobe Acrobat or any other print drivers when they use DICOM to PDF Converter. Additionally, high-quality image conversion of DICOM & PDF files in single page
how to reverse pages in pdf; how to rearrange pdf pages online
BMP to PDF Converter | Convert Bitmap to PDF, Convert PDF to BMP
interface; Powerful image converter for Bitmap and PDF files; No need for Adobe Acrobat Reader & print driver during conversion; Support
how to reorder pdf pages in; move pages in pdf reader
1264 Part IV
Reference
Example:
-- Printsdata aboutthehyperlink youleaveinthedefaultchat frame
DEFAULT_CHAT_FRAME:SetScript(“OnHyperlinkLeave“,i
function(self,linkData,link)
localcolor= link:match(“|c%x%x%x%x%x%x%x%x“)or ““
self:AddMessage(“linkData:“..linkData)
self:AddMessage(format(“link:%s%s“, color,link:gsub(“|“,“||“)))
end)
Thiswidget script isdefined for the following widget types:
ScrollingMessageFrame, SimpleHTML
OnInputLanguageChanged
Run when the edit box’s language input mode changes.
OnInputLanguageChanged(self,“language“)
Applies to keyboard input methods, not in-game languages or client
locales—only relevant for internationalclientsthat allow multiple input
languages.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(editbox)
language—Nameofthenewinputlanguage(see:GetInputLanguage())
(string)
Thiswidget script isdefined for the following widget types: EditBox
OnKeyDown
Run when akeyboardkey is pressed if the frame is keyboard enabled.
OnKeyDown(self,“key“)
Doesnot run for focusedEditBoxes.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
key—Nameofthekeypressed(string,binding)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnKeyUp
Run when akeyboard key is released if the frame is keyboard enabled.
OnKeyUp(self,“key“)
Doesnot run for focusedEditBoxes.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
key—Nameofthekeypressed(string,binding)
Chapter 29
Widget Reference 1265
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnLeave
Run whenthe mouse cursor leavesthe frame’s interactive area.
OnLeave(self,motion)
Note that aframe’smouse-interactive areacan be changedvia its
:SetHitRectInsets()method.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
motionTrueifthehandlerisbeingrunduetoactualmousemove-
ment;false if the cursor left the frame due to other circumstances
(such as the frame being created underneath the cursor) (boolean)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnLoad
Run whenthe frame is created.
OnLoad(self)
In practice, this handler is only applicable when defined inXML (either for
framescreated in XML or for XML templates inherited by dynamically created
frames). A frame createdviaCreateFrame() will have already runits
(non-existent)OnLoad script by the time that functionreturns, leaving no
opportunity to runanOnLoad handler set later.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
Thiswidget script isdefined for the following widget types: Alpha, Animation,
AnimationGroup, Button, CheckButton, ColorSelect, Cooldown,
DressUpModel, EditBox, Frame, GameTooltip, MessageFrame, Minimap,
Model, MovieFrame, Path, PlayerModel, Rotation, Scale, ScrollFrame,
ScrollingMessageFrame, SimpleHTML, Slider, StatusBar, TabardModel,
Translation
OnLoop
Run whenthe animation group’s loop state changes.
OnLoop(self,“loopState“)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(animgroup)
1266 Part IV
Reference
loopState—Tokenidentifyingthenewloopstate(string)
Thiswidget script isdefined for the following widget types: AnimationGroup
OnMessageScrollChanged
Run when the scrolling message frame’sscrollpositionchanges.
OnMessageScrollChanged(self)
AScrollingMessageFrame’sscroll position canchange not only when it is
scrolled, but also when amessage is added to the frame; both cases cause this
script handler to be run.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun
(scrollingmessageframe)
Thiswidget script isdefined for the following widget types:
ScrollingMessageFrame
OnMinMaxChanged
Run when the slider’sor statusbar’sminimum and maximum values change.
OnMinMaxChanged(self,min, max)
Run when the minimum/maximum values are set programmatically with
Slider:SetMinMaxValues()orStatusBar:SetMinMaxValues().
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
min—Newminimumvalueofthesliderorthestatusbar(number)
max—Newmaximumvalueofthesliderorthestatusbar(number)
Thiswidget script isdefined for the following widget types: Slider, StatusBar
OnMouseDown
Run when amouse button ispressed while the cursor isover the frame.
OnMouseDown(self, “button“)
For further details, see the example underOnClick.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
button—Nameofthemousebuttonresponsiblefortheclickaction(string)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnMouseUp
Runwhen the mouse button isreleasedfollowing a mouse down action inthe
frame.
OnMouseUp(self,“button“)
Chapter 29
Widget Reference 1267
Thisscript isalwaysrunfor the frame which received the initialmouse button
down event (unlessthe frame is registered for drag actions anda drag actionis
started before the button isreleased). For further details, see the example under
OnClick.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
button—Nameofthemousebuttonresponsiblefortheclickaction(string)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnMouseWheel
Run whenthe frame receives amouse wheel scrolling action.
OnMouseWheel(self,delta)
In order for this handler to be run, the frame must be mouse wheel enabled
and the mouse cursor must be within the frame while the scrollwheel (or
equivalent device) isused.
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(frame)
delta1forascroll-upaction, -1forascroll-downaction(number)
Example:
--Printthemousewheeldeltafor abutton
CreateFrame(“Frame“, “test“, UIParent,“UIPanelButtonTemplate2“)
test:SetPoint(“CENTER“)
test:EnableMouseWheel(true)
test:SetScript(“OnMouseWheel“, function(self,delta)
DEFAULT_CHAT_FRAME:AddMessage(delta)
end)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
OnMovieFinished
Run whena movie frame’smovie ends.
OnMovieFinished(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(movieframe)
Thiswidget script isdefined for the following widget types: MovieFrame
1268 Part IV
Reference
OnMovieHideSubtitle
Runs whenthe movie’s most recently displayedsubtitle should be hidden.
OnMovieHideSubtitle(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(movieframe)
Thiswidget script isdefined for the following widget types: MovieFrame
OnMovieShowSubtitle
Runs whena subtitle for the playing movie should be displayed.
OnMovieShowSubtitle(self,“text“)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(movieframe)
text—Subtitletexttobedisplayed(string)
Thiswidget script isdefined for the following widget types: MovieFrame
OnPause
Run when the animation(or animation group) ispaused.
OnPause(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(animation)
Thiswidget script isdefined for the following widget types: Alpha, Animation,
AnimationGroup, Path, Rotation, Scale, Translation
OnPlay
Run when the animation (or animation group) begins to play.
OnPlay(self)
Arguments:
self—Referencetothewidgetforwhichthescriptwasrun(animation)
Thiswidget script isdefined for the following widget types: Alpha, Animation,
AnimationGroup, Path, Rotation, Scale, Translation
OnReceiveDrag
Run when the mouse button isreleasedafter dragging into the frame.
OnReceiveDrag(self)
Thisscript is run for the frame under the cursor at the end of adrag, regardless
of which started the drag. For further details, see the example under
OnDragStart.
Arguments:
self—Theframeobjectthatthishandlerwascalledfor.(frame)
Thiswidget script isdefined for the following widget types: Button,
CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,
GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,
ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,
TabardModel
Documents you may be interested
Documents you may be interested