12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1258 Part IV ■ <strong>Reference</strong>OnCursorChangedRun when the position <strong>of</strong> the text insertion cursor in the edit box changes.OnCursorChanged(self, x, y, width, height)Also run when the edit box gains or loses keyboard focus.Arguments:self—<strong>Reference</strong> to the widget <strong>for</strong> which the script was run (editbox)x—Horizontal position <strong>of</strong> the cursor relative to the top left corner <strong>of</strong> the edit box(in pixels) (number)y—Vertical position <strong>of</strong> the cursor relative to the top left corner <strong>of</strong> the edit box (inpixels) (number)width—Width <strong>of</strong> the cursor graphic (in pixels) (number)height—Height <strong>of</strong> the cursor graphic (in pixels); matches the height <strong>of</strong> a line <strong>of</strong>text in the edit box (number)This widget script is defined <strong>for</strong> the following widget types: EditBoxOnDisableRun when the frame is disabled.OnDisable(self)Arguments:self—<strong>Reference</strong> to the widget <strong>for</strong> which the script was run (frame)This widget script is defined <strong>for</strong> the following widget types: Button,CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,TabardModelOnDoubleClickRun when the button is double-clicked.OnDoubleClick(self, “button“)Run if the mouse button is clicked twice within 0.3 seconds. (The PreClick,OnClick <strong>and</strong> PostClick h<strong>and</strong>lers are run <strong>for</strong> the first click but not thesecond.)Arguments:self—<strong>Reference</strong> to the widget <strong>for</strong> which the script was run (button)button—Name <strong>of</strong> the mouse button responsible <strong>for</strong> the click action (string)This widget script is defined <strong>for</strong> the following widget types: Button,CheckButtonOnDragStartRun when the mouse is dragged starting in the frame.OnDragStart(self, “button“)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!