View Single Post
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