UIOBJECT Frame

Frame (inherits from and, created with ) provides the basis for interaction with the user, and registering and responding to game events.

Other types of widget derivatives such as s, s and s can only be created attached to a Frame or other derivative of a Frame.

When an addon needs to respond to game events or state changes and needs no visible components, this is typically accomplished using a Frame. Visibly, widgets that display game information such as threat or cooldowns and aren't directly interactive beyond being draggable are typically Frames. They are also commonly used as ways to group other related frames, either visibly (such as the way the Talents pane groups the buttons representing your character's talents) or invisibly (such as the way MultiBarRight groups twelve action buttons).

Defined Methods
{{#switch:{{{t|wm}}}|w|wm|widgetmethod=
 * Events
 * {{api|t=w|Frame:RegisterEvent(event)}} - Register for notifications when an event occurs.
 * {{api|t=w|Frame:RegisterUnitEvent(event, unit1 [, unit2])}} - Register for notifications when events apply to certain units.
 * {{api|t=w|Frame:RegisterAllEvents}} - Register this frame to receive all events (For debugging only!)
 * {{api|t=w|Frame:UnregisterEvent(event)}} - Indicate that this frame should no longer be notified when event occurs.
 * {{api|t=w|Frame:UnregisterAllEvents}} - Indicate that this frame should no longer be notified when any events occur.
 * {{api|t=w|Frame:IsEventRegistered(event)}} - Returns true if the given event is registered to the frame.


 * Position & Visibility
 * {{api|t=w|Frame:DesaturateHierarchy(desaturation)}}
 * {{api|t=w|Frame:DisableDrawLayer(layer)}} - Disables the specified draw layer.
 * {{api|t=w|Frame:EnableDrawLayer(layer)}} - Enables the specified draw layer.
 * {{api|t=w|Frame:GetBoundsRect}}
 * {{api|t=w|Frame:GetClampRectInsets}} - Gets the modifiers used for limiting the frame from leaving the screen..
 * {{api|t=w|Frame:GetDepth}}
 * {{api|t=w|Frame:GetDontSavePosition}}
 * {{api|t=w|Frame:GetEffectiveAlpha}} - Returns the effective alpha of a frame.
 * {{api|t=w|Frame:GetEffectiveDepth}}
 * {{api|t=w|Frame:GetEffectivelyFlattensRenderLayers}}
 * {{api|t=w|Frame:GetFlattensRenderLayers}}
 * {{api|t=w|Frame:GetFrameLevel}} - Returns the level of this frame.
 * {{api|t=w|Frame:GetFrameStrata}} - Returns the strata of this frame.
 * {{api|t=w|Frame:GetHitRectInsets(l, r, t, b)}} - Gets the frame's hit rectangle inset distances
 * {{api|t=w|Frame:GetMaxResize(w, h)}} - Returns the frame's maximum allowed resize bounds
 * {{api|t=w|Frame:GetMinResize(w, h)}} - Returns the frame's minimum allowed resize bounds
 * {{api|t=w|Frame:HasFixedFrameLevel}} : boolean
 * {{api|t=w|Frame:HasFixedFrameStrata}} : boolean
 * {{api|t=w|Frame:IgnoreDepth(ignoreFlag)}}
 * {{api|t=w|Frame:IsClampedToScreen}} - Returns if the frame is prohibited from being dragged off screen.
 * {{api|t=w|Frame:IsIgnoringDepth}}
 * {{api|t=w|Frame:IsToplevel}} - Returns if the frame is set as top level.
 * {{api|t=w|Frame:Lower}} - Lowers this frame behind other frames.
 * {{api|t=w|Frame:Raise}} - Raises this frame above other frames.
 * {{api|t=w|Frame:RotateTextures(angleRadians [, pivotX, pivotY])}}
 * {{api|t=w|Frame:SetClampedToScreen(clamped)}} - Sets whether the frame is prohibited from being dragged off screen.
 * {{api|t=w|Frame:SetClampRectInsets(left, right, top, bottom)}} - Modify how much the frame may be dragged offscreen.
 * {{api|t=w|Frame:SetDepth(depth)}}
 * {{api|t=w|Frame:SetDontSavePosition}}
 * {{api|t=w|Frame:SetDrawLayerEnabled(layer, mouseOver)}}
 * {{api|t=w|Frame:SetFixedFrameLevel(bool)}}
 * {{api|t=w|Frame:SetFixedFrameStrata(bool)}}
 * {{api|t=w|Frame:SetFlattensRenderLayers}}
 * {{api|t=w|Frame:SetFrameLevel(level)}} - Positions the frame within a subdivision of its z-axis interval
 * {{api|t=w|Frame:SetFrameStrata(strata)}} - Positions the frame within a z-axis interval.
 * {{api|t=w|Frame:SetHitRectInsets(left, right, top, bottom)}} - Set the inset distances for the frame's hit rectangle.
 * {{api|t=w|Frame:SetMaxResize(maxWidth, maxHeight)}} - Sets the maximum dimensions this frame can be resized to.
 * {{api|t=w|Frame:SetMinResize(minWidth, minHeight)}} - Sets the minimum dimensions this frame can be resized to.
 * {{api|t=w|Frame:SetToplevel(isTopLevel)}} - Sets whether the frame should raise itself when clicked


 * Children
 * {{api|t=w|Frame:GetChildren}} - Returns child Frames as multiple return values.
 * {{api|t=w|Frame:GetNumChildren}} - Returns the number of child Frames.
 * {{api|t=w|Frame:DoesClipChildren}}
 * {{api|t=w|Frame:SetClipsChildren(clipped)}} - Sets the frame clipping its children.


 * Regions
 * {{api|t=w|Frame:GetNumRegions}} - Returns the number of regions.
 * {{api|t=w|Frame:GetRegions}} - Returns the regions.


 * {{api|t=w|Frame:CreateFontString}} - Creates a {{api|t=o|FontString}}
 * {{api|t=w|Frame:CreateLine}}{) - Creates a {{api|t=o|Line}}
 * {{api|t=w|Frame:CreateMaskTexture}} - Creates a {{api|t=o|MaskTexture}}
 * {{api|t=w|Frame:CreateTexture}} - Creates a {{api|t=o|Texture}}


 * User Input
 * {{api|t=w|Frame:EnableKeyboard(enableFlag)}} - Whether to receive keyboard input.
 * {{api|t=w|Frame:EnableMouse(enableFlag)}} - Whether to receives mouse input.
 * {{api|t=w|Frame:EnableMouseWheel(enableFlag)}} - Whether to receive mouse wheel notifications.
 * {{api|t=w|Frame:GetHyperlinksEnabled}}
 * {{api|t=w|Frame:GetPropagateKeyboardInput}} - Returns if keyboard inputs propagate.
 * {{api|t=w|Frame:IsKeyboardEnabled}} - Returns if receiving keyboard input.
 * {{api|t=w|Frame:IsMouseClickEnabled}} - Returns if receiving mouse click inputs.
 * {{api|t=w|Frame:IsMouseEnabled}} - Returns if receiving mouse input.
 * {{api|t=w|Frame:IsMouseMotionEnabled}} - Returns if receiving mouse enter/hover notifications.
 * {{api|t=w|Frame:IsMouseWheelEnabled}} - Returns if receiving mouse wheel notifications.
 * {{api|t=w|Frame:IsMovable}} - Returns if the frame can be moved.
 * {{api|t=w|Frame:IsResizable}} - Returns if the frame can be resized.
 * {{api|t=w|Frame:IsUserPlaced}} - Returns if this frame has been relocated by the user.
 * {{api|t=w|Frame:RegisterForDrag(buttonType[,buttonType...])}} - Direct the frame to monitor for mouse-dragging.
 * {{api|t=w|Frame:SetHyperlinksEnabled}}
 * {{api|t=w|Frame:SetMouseClickEnabled}}
 * {{api|t=w|Frame:SetMouseMotionEnabled}}
 * {{api|t=w|Frame:SetMovable(isMovable)}} - Whether the frame should be moved.
 * {{api|t=w|Frame:SetPropagateKeyboardInput(propagate)}} - Whether to propagate keyboard input to other frames.
 * {{api|t=w|Frame:SetResizable(isResizable)}} - Whether the frame should be resized.
 * {{api|t=w|Frame:SetUserPlaced(isUserPlaced)}} - Whether the frame is user-defined in the layout cache.
 * {{api|t=w|Frame:StartMoving}} - Starts moving this frame.
 * {{api|t=w|Frame:StartSizing(point)}} - Starts sizing this frame using the specified anchor point.
 * {{api|t=w|Frame:StopMovingOrSizing}} - Stops moving and/or sizing this frame.


 * {{api|t=w|Frame:EnableGamePadButton(enabled)}}
 * {{api|t=w|Frame:EnableGamePadStick(enabled)}}
 * {{api|t=w|Frame:IsGamePadButtonEnabled}}
 * {{api|t=w|Frame:IsGamePadStickEnabled}}


 * Attributes
 * {{api|t=w|Frame:GetAttribute(prefix, name, suffix)}} - Returns the current value of an attribute matching a given pattern.
 * {{api|t=w|Frame:SetAttribute(name, value)}} - Sets an attribute on the frame.
 * {{api|t=w|Frame:ExecuteAttribute(name [, ...])}}
 * {{api|t=w|Frame:CanChangeAttribute}}


 * {{api|t=w|Frame:GetID}} - Returns the frame ID.
 * {{api|t=w|Frame:SetID(id)}} - Sets an ID on this frame.

The Backdrop API was moved to BackdropTemplate in Patch 9.0.1
 * Backdrop
 * {{api|t=w|Frame:GetBackdrop}} - Creates and returns a backdrop table suitable for use in SetBackdrop
 * {{api|t=w|Frame:GetBackdropBorderColor(r, g, b, a)}} - Gets the frame's backdrop border color
 * {{api|t=w|Frame:GetBackdropColor(r, g, b, a)}} - Gets the frame's backdrop color
 * {{api|t=w|Frame:SetBackdrop([backdropTable])}} - Set the backdrop of the frame according to the specification provided.
 * {{api|t=w|Frame:SetBackdropBorderColor(r, g, b [, a])}} - Set the frame's backdrop's border's color.
 * {{api|t=w|Frame:SetBackdropColor(r, g, b [, a])}} - Set the frame's backdrop color.

}}

Examples
Creates a simple frame with widget scripts ( and ) to respond when mousing over a in the middle of the screen.

Or with a element in an XML file.