mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
When a frame finishes loading from XML, CSimpleFrame::PostLoadXML (0x0076A2F0) clears the loading flag and, for a visible frame, ends the layout deferral of the frame, its title region and its registered regions with 0x00768060(0). That call resolves a pending layout at once (0x007680E0 with force 1), so OnSizeChanged runs before the frame's OnLoad, and before its children, built next, run theirs. Building the children first does not help: resolving a child ends the deferral of the frame it anchors to and lays that frame out too (0x007A2F90). Retail lays these frames out later, from its end-of-frame resize list. Its EventFrame, ScrollBox and scroll bars trigger callbacks from OnSizeChanged on the registry their OnLoad creates, so a retail window that loads visible raised "executingEvents (a nil value)" from each of them. The three calls (0x0076A310, 0x0076A324, 0x0076A35B) now go to EndLoadDeferral: it clears the deferred bit (0x02 of the layout flags at +0x3C) the same way, and sends a pending layout (0x00768310) to the engine's layout queue with 0x007680E0(0), the path SetPoint takes. The queue drains on the top's update and in the interface build, after every OnLoad of the load. A script that reads a size or an edge still lays its frame out at once. The minimap and tooltip finalizers call the base first and read no rect after it. Each redirect checks the call's target first, so a site another DLL has patched keeps its code.