API EnumerateFrames

Returns frame which follows current frame, or first frame if argument is nil. The order of iteration follows the order that the frames were created in. nextFrame = EnumerateFrames([currentFrame])

Arguments

 * currentFrame : Table (Frame) - current frame or nil to get first frame.

Returns

 * nextFrame : Table (Frame) - the frame following currentFrame or nil if no more frames

Example
The following snippet prints the names of all visible frames under the mouse cursor to the default chat frame. local frame = EnumerateFrames while frame do    if frame:IsVisible and MouseIsOver(frame) then DEFAULT_CHAT_FRAME:AddMessage(frame:GetName or "Anonymous Frame") end frame = EnumerateFrames(frame) end