Thread Tools Display Modes
03-12-23, 03:28 AM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
EventButton and EventFrame widgets

Hi all. I was wondering if there are any documentation or wiki articles on these newer `EventFrame` and `EventButton` widgets. Blizzard uses them a lot in their XML files. I was surprised I haven't heard much discussion online about them.

Here's an example of how to create an `EventFrame`, followed by the contents dumped to depth 2:

`/run local a = CreateFrame("EventFrame");`

Lua Code:
  1. ["OnShow_Intrinsic"] = function: 000002106023F200,
  2. ["HasRegistrantsForEvent"] = function: 0000021060BA9730,
  3. ["GetCallbacksByEvent"] = function: 00000210600A3A50,
  4. ["UnregisterEvents"] = function: 00000210600BADF0,
  5. ["OnHide_Intrinsic"] = function: 000002106023F1C8,
  6. ["GenerateCallbackEvents"] = function: 00000210600BB630,
  7. ["DoesFrameHaveEvent"] = function: 00000210600A3BD8,
  8. ["GetCallbackTable"] = function: 00000210600A3A18,
  9. ["callbackTables"] = {
  10.     ["1"] = {},
  11.     ["2"] = {}
  12. },
  13. ["SecureInsertEvent"] = function: 0000021060BA9780,
  14. ["Event"] = {
  15.   ["OnSizeChanged"] = "OnSizeChanged",
  16.   ["OnShow"] = "OnShow",
  17.   ["OnScroll"] = "OnScroll",
  18.   ["OnAllowScrollChanged"] = "OnAllowScrollChanged",
  19.   ["OnHide"] = "OnHide"
  20. },
  21. ["RegisterCallback"] = function: 0000021060122FD0,
  22. ["GetCallbackTables"] = function: 00000210600A39A8,
  23. ["SetUndefinedEventsAllowed"] = function: 00000210600A39E0,
  24. ["UnregisterCallback"] = function: 0000021060BA97D0,
  25. ["TriggerEvent"] = function: 0000021060123050,
  26. ["OnSizeChanged_Intrinsic"] = function: 000002106023F238,
  27. ["RegisterCallbackWithHandle"] = function: 00000210600BB670,
  28. ["OnLoad"] = function: 0000021060BA96E0,
  29. ["OnLoad_Intrinsic"] = function: 000002106023F190

And here's an example of how to create an `EventButton`, followed by the contents dumped to depth 2:

`/run local a = CreateFrame("EventButton");`

Lua Code:
  1. ["OnClick_Intrinsic"] = function: 00000184D802D790,
  2. ["OnMouseUp_Intrinsic"] = function: 00000184D802D590,
  3. ["HasRegistrantsForEvent"] = function: 00000185626BC670,
  4. ["GetCallbacksByEvent"] = function: 00000184D801CB80,
  5. ["UnregisterEvents"] = function: 00000184D8023F10,
  6. ["OnLeave_Intrinsic"] = function: 000001854FD29568,
  7. ["GetCallbackTables"] = function: 00000184D801CAD8,
  8. ["SecureInsertEvent"] = function: 00000185626BC6C0,
  9. ["GenerateCallbackEvents"] = function: 00000184D8024750,
  10. ["TriggerEvent"] = function: 00000184D806C150,
  11. ["OnLoad"] = function: 00000185626BC620,
  12. ["callbackTables"] = {
  13.     ["1"] = {},
  14.     ["2"] = {}
  15. },
  16. ["OnLoad_Intrinsic"] = function: 000001854FD294C0,
  17. ["Event"] = {
  18.   ["OnSizeChanged"] = "OnSizeChanged",
  19.   ["OnEnter"] = "OnEnter",
  20.   ["OnValueChanged"] = "OnValueChanged",
  21.   ["OnMouseDown"] = "OnMouseDown",
  22.   ["OnLeave"] = "OnLeave",
  23.   ["OnClick"] = "OnClick",
  24.   ["OnMouseUp"] = "OnMouseUp"
  25. },
  26. ["RegisterCallback"] = function: 00000184D806C0D0,
  27. ["GetCallbackTable"] = function: 00000184D801CB48,
  28. ["SetUndefinedEventsAllowed"] = function: 00000184D801CB10,
  29. ["UnregisterCallback"] = function: 00000185626BC710,
  30. ["DoesFrameHaveEvent"] = function: 00000184D801CD08,
  31. ["OnSizeChanged_Intrinsic"] = function: 000001854FD295A0,
  32. ["RegisterCallbackWithHandle"] = function: 00000184D8024790,
  33. ["OnEnter_Intrinsic"] = function: 000001854FD29530,
  34. ["OnMouseDown_Intrinsic"] = function: 00000184D802D750
__________________
MayronUI Discord communitymayronui.com

Last edited by Mayron : 03-12-23 at 03:45 AM.
  Reply With Quote
03-12-23, 03:29 AM   #2
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
I can mostly guess how to use them, but I wasn't sure how many other addon devs didn't know about these newer widgets or if there are any additional resources for how to use them correctly. Has anyone tried them before and if so how and why did you use them?

I wasn't sure if these EventFrames were for registering in-game wow events, custom events, or only for frame/button events as shown in the `Event` sub-table (like OnSizeChanged, etc...).

If you can use them for registering game events then I was curious if you could substitute a "Frame" widget that only exists for registering and handling events with "EventFrame".
__________________
MayronUI Discord communitymayronui.com

Last edited by Mayron : 03-12-23 at 03:46 AM.
  Reply With Quote
03-12-23, 06:35 AM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,930
I've seen them while looking at their code while bug fixing addons but not really needed to look further at them. I assumed they were either templates you used in your own frames or something that can only be used by Blizzard frames.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
03-12-23, 08:26 AM   #4
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,877
They're "new" intrinsics, the documentation is basically in their mixins (and inherited mixins).

EventTraceLogEventButtonMixin (Addons\Blizzard_EventTrace\Blizzard_EventTrace.lua which is LOD) and EventFrameMixin (EventFrame.lua).
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 03-12-23 at 08:29 AM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » EventButton and EventFrame widgets


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off