Name | Type | Deprecated | Secure | Description |
---|---|---|---|---|
Frame | A UI element of type Frame or derived from Frame. | |||
Frame.Event:KeyDown | Signals a key pressed. | |||
Frame.Event:KeyFocusGain | Signals gaining key focus. | |||
Frame.Event:KeyFocusLoss | Signals losing key focus. | |||
Frame.Event:KeyRepeat | Frame.Event:KeyRepeat@summary | |||
Frame.Event:KeyType | Signals text typed. | |||
Frame.Event:KeyUp | Signals a key released. | |||
Frame.Event:Layer | Signals a change in the item's layer. | |||
Frame.Event:LeftClick | Signals that the mouse's left button has been clicked inside the frame. Blocks left mouse events ... | |||
Frame.Event:LeftDown | Signals that the mouse's left button has been pressed inside the frame. Blocks left mouse events ... | |||
Frame.Event:LeftUp | Signals that the mouse's left button has been released inside the frame. Blocks left mouse events... | |||
Frame.Event:LeftUpoutside | Signals that the mouse's left button has been released outside the frame, after a "Down" message.... | |||
Frame.Event:MiddleClick | Signals that the mouse's middle button has been clicked inside the frame. Blocks middle mouse eve... | |||
Frame.Event:MiddleDown | Signals that the mouse's middle button has been pressed inside the frame. Blocks middle mouse eve... | |||
Frame.Event:MiddleUp | Signals that the mouse's middle button has been released inside the frame. Blocks middle mouse ev... | |||
Frame.Event:MiddleUpoutside | Signals that the mouse's middle button has been released outside the frame, after a "Down" messag... | |||
Frame.Event:Mouse4Click | Signals that the mouse's fourth button has been clicked inside the frame. Blocks fourth button mo... | |||
Frame.Event:Mouse4Down | Signals that the mouse's fourth button has been pressed inside the frame. Blocks fourth button mo... | |||
Frame.Event:Mouse4Up | Signals that the mouse's fourth button has been released inside the frame. Blocks fourth button m... | |||
Frame.Event:Mouse4Upoutside | Signals that the mouse's fourth button has been released outside the frame, after a "Down" messag... | |||
Frame.Event:Mouse5Click | Signals that the mouse's fifth button has been clicked inside the frame. Blocks fifth button mous... | |||
Frame.Event:Mouse5Down | Signals that the mouse's fifth button has been pressed inside the frame. Blocks fifth button mous... | |||
Frame.Event:Mouse5Up | Signals that the mouse's fifth button has been released inside the frame. Blocks fifth button mou... | |||
Frame.Event:Mouse5Upoutside | Signals that the mouse's fifth button has been released outside the frame, after a "Down" message... | |||
Frame.Event:MouseIn | Signals that the mouse cursor has been moved onto the frame. Blocks mouse movement events from fr... | |||
Frame.Event:MouseMove | Signals that the mouse cursor has been moved within the frame. Blocks mouse movement events from ... | |||
Frame.Event:MouseOut | Signals that the mouse cursor has been moved off of the frame. Blocks mouse movement events from ... | |||
Frame.Event:Move | Signals that the frame's vertices have moved. | |||
Frame.Event:RightClick | Signals that the mouse's right button has been clicked inside the frame. Blocks right mouse event... | |||
Frame.Event:RightDown | Signals that the mouse's right button has been pressed inside the frame. Blocks right mouse event... | |||
Frame.Event:RightUp | Signals that the mouse's right button has been released inside the frame. Blocks right mouse even... | |||
Frame.Event:RightUpoutside | Signals that the mouse's right button has been released outside the frame, after a "Down" message... | |||
Frame.Event:Size | Signals that the frame's size has changed. | |||
Frame.Event:Strata | Signals a change in the item's strata. | |||
Frame.Event:WheelBack | Signals that the mousewheel has been moved backward inside the frame. Blocks mousewheel events fr... | |||
Frame.Event:WheelForward | Signals that the mousewheel has been moved forward inside the frame. Blocks mousewheel events fro... | |||
Frame:ClearAll | function | Clear all set points and sizes from this frame. | ||
Frame:ClearHeight | function | Clear a set height from this frame. | ||
Frame:ClearPoint | function | Clear a set point from this frame. | ||
Frame:ClearWidth | function | Clear a set width from this frame. | ||
Frame:EventAttach | function | Attaches an event handler to an event. | ||
Frame:EventDetach | function | Detaches an event handler from an event. Any parameter can be 'nil', and this is interpreted as a... | ||
Frame:EventList | function | Lists the current event handlers for an event. | ||
Frame:EventMacroGet | function | Gets the macro that will be triggered when this event occurs. | ||
Frame:EventMacroSet | function | Sets the macro that will be triggered when this event occurs. | ||
Frame:GetAlpha | function | Gets the alpha multiplier of this frame. | ||
Frame:GetBackgroundColor | function | Retrieves the background color of this frame. | ||
Frame:GetBottom | function | Retrieves the Y position of the bottom edge of this element. | ||
Frame:GetBounds | function | Retrieves the complete bounds of this element. | ||
Frame:GetChildren | function | Returns a table containing all of this element's children. | ||
Frame:GetEventTable | function | Retrieves the event table of this element. By default, this value is also stored in "this.Event". | ||
Frame:GetHeight | function | Retrieves the height of this element. | ||
Frame:GetKeyFocus | function | Gets the key focus status. | ||
Frame:GetLayer | function | Gets the frame's layer order. | ||
Frame:GetLeft | function | Retrieves the X position of the left edge of this element. | ||
Frame:GetMouseMasking | function | Get the current mouse masking mode. See SetMouseMasking for details. | ||
Frame:GetMouseoverUnit | function | Gets the unit that is being represented by this frame. | ||
Frame:GetName | function | Retrieves the name of this element. | ||
Frame:GetOwner | function | Retrieves the owner of this element. | ||
Frame:GetParent | function | Gets the parent of this frame. | ||
Frame:GetRight | function | Retrieves the X position of the right edge of this element. | ||
Frame:GetSecureMode | function | Get the current secure mode. See SetSecureMode for details. | ||
Frame:GetStrata | function | Gets the frame's strata. The strata determines render order on a coarser level than Layer does, a... | ||
Frame:GetStrataList | function | Gets a list of valid stratas for this frame. | ||
Frame:GetTop | function | Retrieves the Y position of the top edge of this element. | ||
Frame:GetType | function | Retrieves the type of this element. | ||
Frame:GetVisible | function | Gets the visibility flag for this frame. | ||
Frame:GetWidth | function | Retrieves the width of this element. | ||
Frame:ReadAll | function | Read all set points and sizes from this frame. | ||
Frame:ReadHeight | function | Read a set height from this frame. | ||
Frame:ReadPoint | function | Read a set point from this frame. Must be given a single-axis coordinate. | ||
Frame:ReadWidth | function | Read a set width from this frame. | ||
Frame:SetAllPoints | function | Pins all the edges of this frame to the edges of a different frame. If no target is given, defaul... | ||
Frame:SetAlpha | function | Sets the alpha transparency multiplier for this frame and its children. | ||
Frame:SetBackgroundColor | function | Sets the background color of this frame. | ||
Frame:SetHeight | function | Sets the height of this frame. Undefined results if the frame already has two pinned Y coordinates. | ||
Frame:SetKeyFocus | function | Sets the key focus status. Note that only one frame can be the key focus at a time. Focusing on a... | ||
Frame:SetLayer | function | Sets the frame layer for this frame. This can be any number. Frames are drawn in ascending order.... | ||
Frame:SetMouseMasking | function | Sets the frame's mouse masking mode. | ||
Frame:SetMouseoverUnit | function | Sets the unit that will be represented by this frame. | ||
Frame:SetParent | function | Sets the parent of this frame. Circular dependencies result in undefined behavior. If this frame'... | ||
Frame:SetPoint | function | Pins a point on this frame to a location on another frame. This is a rather complex function and ... | ||
Frame:SetSecureMode | function | Sets the frame's secure mode. "normal" is the standard mode. It allows for most functionality to ... | ||
Frame:SetStrata | function | Sets the strata for this frame. | ||
Frame:SetVisible | function | Sets the frame's visibility flag. If set to false, then this frame and all its children will not ... | ||
Frame:SetWidth | function | Sets the width of this frame. Undefined results if the frame already has two pinned X coordinates. |
A UI element of type Frame or derived from Frame.
Signals a key pressed.
Frame.Event:KeyDown(button) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
button | parameter | variant | The key, in string form. |
Signals gaining key focus.
Frame.Event:KeyFocusGain() |
Signals losing key focus.
Frame.Event:KeyFocusLoss() |
Frame.Event:KeyRepeat@summary
Frame.Event:KeyRepeat(button) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
button | parameter | variant | The key, in string form. |
Signals text typed.
Frame.Event:KeyType(typed) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
typed | parameter | variant | The text. |
Signals a key released.
Frame.Event:KeyUp(button) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
button | parameter | variant | The key, in string form. |
Signals a change in the item's layer.
Frame.Event:Layer() |
Signals that the mouse's left button has been clicked inside the frame. Blocks left mouse events and mouse movement events from frames below this one. May block right mouse events depending on the MouseMasking mode.
Frame.Event:LeftClick() |
Signals that the mouse's left button has been pressed inside the frame. Blocks left mouse events and mouse movement events from frames below this one. May block right mouse events depending on the MouseMasking mode.
Frame.Event:LeftDown() |
Signals that the mouse's left button has been released inside the frame. Blocks left mouse events and mouse movement events from frames below this one. May block right mouse events depending on the MouseMasking mode.
Frame.Event:LeftUp() |
Signals that the mouse's left button has been released outside the frame, after a "Down" message. Blocks left mouse events and mouse movement events from frames below this one. May block right mouse events depending on the MouseMasking mode.
Frame.Event:LeftUpoutside() |
Signals that the mouse's middle button has been clicked inside the frame. Blocks middle mouse events from frames below this one.
Frame.Event:MiddleClick() |
Signals that the mouse's middle button has been pressed inside the frame. Blocks middle mouse events from frames below this one.
Frame.Event:MiddleDown() |
Signals that the mouse's middle button has been released inside the frame. Blocks middle mouse events from frames below this one.
Frame.Event:MiddleUp() |
Signals that the mouse's middle button has been released outside the frame, after a "Down" message. Blocks middle mouse events from frames below this one.
Frame.Event:MiddleUpoutside() |
Signals that the mouse's fourth button has been clicked inside the frame. Blocks fourth button mouse events from frames below this one.
Frame.Event:Mouse4Click() |
Signals that the mouse's fourth button has been pressed inside the frame. Blocks fourth button mouse events from frames below this one.
Frame.Event:Mouse4Down() |
Signals that the mouse's fourth button has been released inside the frame. Blocks fourth button mouse events from frames below this one.
Frame.Event:Mouse4Up() |
Signals that the mouse's fourth button has been released outside the frame, after a "Down" message. Blocks fourth button mouse events from frames below this one.
Frame.Event:Mouse4Upoutside() |
Signals that the mouse's fifth button has been clicked inside the frame. Blocks fifth button mouse events from frames below this one.
Frame.Event:Mouse5Click() |
Signals that the mouse's fifth button has been pressed inside the frame. Blocks fifth button mouse events from frames below this one.
Frame.Event:Mouse5Down() |
Signals that the mouse's fifth button has been released inside the frame. Blocks fifth button mouse events from frames below this one.
Frame.Event:Mouse5Up() |
Signals that the mouse's fifth button has been released outside the frame, after a "Down" message. Blocks fifth button mouse events from frames below this one.
Frame.Event:Mouse5Upoutside() |
Signals that the mouse cursor has been moved onto the frame. Blocks mouse movement events from frames below this one. May block left and right events depending on the MouseMasking mode.
Frame.Event:MouseIn() |
Signals that the mouse cursor has been moved within the frame. Blocks mouse movement events from frames below this one. May block left and right events depending on the MouseMasking mode.
Frame.Event:MouseMove(x, y) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
x | parameter | variant | X coordinate. |
y | parameter | <nope> | Y coordinate. |
Signals that the mouse cursor has been moved off of the frame. Blocks mouse movement events from frames below this one. May block left and right events depending on the MouseMasking mode.
Frame.Event:MouseOut() |
Signals that the frame's vertices have moved.
Layout.Event:Move() |
Signals that the mouse's right button has been clicked inside the frame. Blocks right mouse events and mouse movement events from frames below this one. May block left mouse events depending on the MouseMasking mode.
Frame.Event:RightClick() |
Signals that the mouse's right button has been pressed inside the frame. Blocks right mouse events and mouse movement events from frames below this one. May block left mouse events depending on the MouseMasking mode.
Frame.Event:RightDown() |
Signals that the mouse's right button has been released inside the frame. Blocks right mouse events and mouse movement events from frames below this one. May block left mouse events depending on the MouseMasking mode.
Frame.Event:RightUp() |
Signals that the mouse's right button has been released outside the frame, after a "Down" message. Blocks right mouse events and mouse movement events from frames below this one. May block left mouse events depending on the MouseMasking mode.
Frame.Event:RightUpoutside() |
Signals that the frame's size has changed.
Layout.Event:Size() |
Signals a change in the item's strata.
Frame.Event:Strata() |
Signals that the mousewheel has been moved backward inside the frame. Blocks mousewheel events from frames below this one.
Frame.Event:WheelBack() |
Signals that the mousewheel has been moved forward inside the frame. Blocks mousewheel events from frames below this one.
Frame.Event:WheelForward() |
Clear all set points and sizes from this frame.
Frame:ClearAll() |
Clear a set height from this frame.
Frame:ClearHeight() |
Clear a set point from this frame.
Frame:ClearPoint(coordinate) | |||
Frame:ClearPoint(x, y) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
coordinate | parameter | string | Named coordinate. |
x | parameter | number/nil | X coordinate of the point. |
y | parameter | number/nil | Y coordinate of the point. |
Clear a set width from this frame.
Frame:ClearWidth() |
Attaches an event handler to an event.
Layout:EventAttach(handle, callback, label) | |||
Layout:EventAttach(handle, callback, label, priority) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | function | A global event handler function. This will be called when the event fires. The first parameter will be the standard frame event handle, any other parameters will follow that. |
handle | parameter | eventFrame | A handle to a frame event, usually pulled out of the "Event.UI." hierarchy. |
label | parameter | string | Human-readable label used to identify the handler in error reports, performance reports, and for later detaching. |
priority | parameter | number | Priority of the event handler. Higher numbers trigger first. |
Detaches an event handler from an event. Any parameter can be 'nil', and this is interpreted as a wildcard. If multiple events match the constraints, only one will be detached.
Layout:EventDetach(handle, callback) | |||
Layout:EventDetach(handle, callback, label) | |||
Layout:EventDetach(handle, callback, label, priority) | |||
Layout:EventDetach(handle, callback, label, priority, owner) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | function/nil | A callback function to search for. |
handle | parameter | eventFrame | A handle to a frame event, usually pulled out of the "Event.UI." hierarchy. |
label | parameter | string/nil | Human-readable label used to identify the handler in error reports, performance reports, and for later detaching. |
owner | parameter | string/nil | Owner to search for. |
priority | parameter | number/nil | Priority of the event handler. Higher numbers trigger first. |
Lists the current event handlers for an event.
result = Layout:EventList(handle) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
handle | parameter | eventFrame | A handle to a frame event, usually pulled out of the "Event.UI." hierarchy. |
result | result | table | A table of event handlers for this event. |
handler | The handler that will be called when the event fires. |
---|---|
label | Human-readable label used to identify the handler in error reports, performance reports, and for later detaching. |
macro | The macro that will run when the event fires. |
owner | Owner to search for. |
priority | Priority of the event handler. Higher numbers trigger first. |
Gets the macro that will be triggered when this event occurs.
macro = Layout:EventMacroGet(handle) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
handle | parameter | eventFrame | A handle to a frame event, usually pulled out of the "Event.UI." hierarchy. |
macro | result | string/nil | The macro that will be triggered. |
Sets the macro that will be triggered when this event occurs.
Layout:EventMacroSet(handle, macro) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
handle | parameter | eventFrame | A handle to a frame event, usually pulled out of the "Event.UI." hierarchy. |
macro | parameter | string/nil | The macro to trigger. nil to clear the macro. |
Gets the alpha multiplier of this frame.
alpha = Element:GetAlpha() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
alpha | result | number | The alpha multiplier of this frame. 1 is fully opaque, 0 is fully transparent. This does not include multiplied alphas from this frame's parent - it's the exact value passed to SetAlpha. |
Retrieves the background color of this frame.
r, g, b, a = Element:GetBackgroundColor() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
a | result | number | Alpha. 1 is fully opaque, 0 is fully transparent. |
b | result | number | Blue. |
g | result | number | Green. |
r | result | number | Red. |
Retrieves the Y position of the bottom edge of this element.
bottom = Layout:GetBottom() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
bottom | result | number | The Y position of the bottom edge of this element. |
Retrieves the complete bounds of this element.
left, top, right, bottom = Layout:GetBounds() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
bottom | result | number | The Y position of the bottom edge of this element. |
left | result | number | The X position of the left edge of this element. |
right | result | number | The X position of the right edge of this element. |
top | result | number | The Y position of the top edge of this element. |
Returns a table containing all of this element's children.
children = Element:GetChildren() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
children | result | table | A table containing this element's children. |
Retrieves the event table of this element. By default, this value is also stored in "this.Event".
eventTable = Layout:GetEventTable() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
eventTable | result | table | The event table of this element. |
Retrieves the height of this element.
height = Layout:GetHeight() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
height | result | number | The height of this element. |
Gets the key focus status.
focus = Element:GetKeyFocus() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
focus | result | boolean | Whether this frame is the current key focus. |
Gets the frame's layer order.
layer = Frame:GetLayer() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
layer | result | number | The render layer of this frame. See Frame:SetLayer for details. |
Retrieves the X position of the left edge of this element.
left = Layout:GetLeft() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
left | result | number | The X position of the left edge of this element. |
Get the current mouse masking mode. See SetMouseMasking for details.
mask = Element:GetMouseMasking() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
mask | result | string | The current mouse masking mode. |
Gets the unit that is being represented by this frame.
unit = Frame:GetMouseoverUnit() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
unit | result | string | The current mouseover unit. May be nil if there is no mouseover unit. |
Retrieves the name of this element.
name = Layout:GetName() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
name | result | string | The name of this element, as provided by the addon that created it. |
Retrieves the owner of this element.
owner = Layout:GetOwner() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
owner | result | string | The owner of this element. Given as an addon identifier. |
Gets the parent of this frame.
parent = Frame:GetParent() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
parent | result | Element | The parent element of this frame. |
Retrieves the X position of the right edge of this element.
right = Layout:GetRight() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
right | result | number | The X position of the right edge of this element. |
Get the current secure mode. See SetSecureMode for details.
secure = Frame:GetSecureMode() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
secure | result | string | The current secure mode. |
Gets the frame's strata. The strata determines render order on a coarser level than Layer does, as well as determining how far an element is brought to the front when clicked on.
strata = Frame:GetStrata() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
strata | result | string | The item's current strata. |
Gets a list of valid stratas for this frame.
stratas = Frame:GetStrataList() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
stratas | result | table | An array of valid stratas, in order. |
Retrieves the Y position of the top edge of this element.
top = Layout:GetTop() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
top | result | number | The Y position of the top edge of this element. |
Retrieves the type of this element.
type = Layout:GetType() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
type | result | string | The type of this element. |
Gets the visibility flag for this frame.
visible = Element:GetVisible() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
visible | result | boolean | This frame's visibility flag, as set by SetVisible. Does not check the visibility flags of the frame's parents. |
Retrieves the width of this element.
width = Layout:GetWidth() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
width | result | number | The width of this element. |
Read all set points and sizes from this frame.
results = Layout:ReadAll() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
results | result | table | Result table. Contains data in the following format: {x = {size = (size), [(position)] = {layout = (layout), position = (position), offset = (offset)}}, y = (the same thing)}. |
Read a set height from this frame.
height = Layout:ReadHeight() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
height | result | number | The parameter passed to SetHeight(), or nil if no such parameter has been passed. |
Read a set point from this frame. Must be given a single-axis coordinate.
layout, position, offset = Layout:ReadPoint(coordinate) | |||
layout, position, offset = Layout:ReadPoint(x, y) | |||
origin, offset = Layout:ReadPoint(coordinate) | |||
origin, offset = Layout:ReadPoint(x, y) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
coordinate | parameter | string | Named coordinate. Must be a one-axis coordinate. |
x | parameter | number/nil | X coordinate of the point. Either this or Y must be nil. |
y | parameter | number/nil | Y coordinate of the point. Either this or X must be nil. |
layout | result | Layout | The table that this point is pinned to. |
offset | result | number | The offset in pixels from the source location to the actual location. |
origin | result | string | The string "origin". |
position | result | number | The position on "layout" that this point is pinned. 0 refers to the top or left edge, 1 refers to the bottom or right edge. |
Read a set width from this frame.
width = Layout:ReadWidth() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
width | result | number | The parameter passed to SetWidth(), or nil if no such parameter has been passed. |
Pins all the edges of this frame to the edges of a different frame. If no target is given, defaults to this frame's parent.
Frame:SetAllPoints() | |||
Frame:SetAllPoints(target) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
target | parameter | Layout | Target Layout to pin this frame's edges to. |
Sets the alpha transparency multiplier for this frame and its children.
Element:SetAlpha(alpha) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
alpha | parameter | number | The new alpha multiplier. 1 is fully opaque, 0 is fully transparent. |
Sets the background color of this frame.
Element:SetBackgroundColor(r, g, b) | |||
Element:SetBackgroundColor(r, g, b, a) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
a | parameter | number | Alpha. 1 is fully opaque, 0 is fully transparent. Defaults to 1. |
b | parameter | number | Blue. |
g | parameter | number | Green. |
r | parameter | number | Red. |
Sets the height of this frame. Undefined results if the frame already has two pinned Y coordinates.
Frame:SetHeight(height) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
height | parameter | number | The new height of this frame. |
Sets the key focus status. Note that only one frame can be the key focus at a time. Focusing on another frame will automatically unset the current focus.
Element:SetKeyFocus(focus) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
focus | parameter | boolean | The new key focus setting. |
Sets the frame layer for this frame. This can be any number. Frames are drawn in ascending order. If two frames have the same layer number, then the order of those frames is undefined, but guarantees no Z-fighting. Frames are always drawn after their parents.
Frame:SetLayer(layer) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
layer | parameter | number | The new layer for this frame. |
Sets the frame's mouse masking mode.
Element:SetMouseMasking(mask) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
mask | parameter | string | The new mouse masking mode. "full" is the standard mode, and means that creating any Left, Right, or movement-related mouse event will cause the frame to accept and consume any event from any of those types. "limited" causes the frame to accept and consume only events for buttons that have been hooked, so that hooking "LeftDown" will still pass Right mouse events through the frame. Note that hooking any mouse event will still consume MouseMove/In/Out events. |
Sets the unit that will be represented by this frame.
Frame:SetMouseoverUnit(unit) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
unit | parameter | nil, unit | The new mouseover unit. May be a unit ID or a unit specifier. Pass in nil to disable the mouseover effect. |
Sets the parent of this frame. Circular dependencies result in undefined behavior. If this frame's secure mode is "restricted", then its parent must also have a secure mode of "restricted".
Frame:SetParent(parent) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
parent | parameter | Element | The new parent for this frame. |
Pins a point on this frame to a location on another frame. This is a rather complex function and you should look at examples to see how to use it.
This function can take many different forms. In general, it looks like this: SetPoint(point_on_this_frame, target_frame, point_on_target_frame [, x_offset, y_offset]).
The first part is the point on this frame that will be attached. Usually, these are string identifiers. "TOPLEFT", "TOPCENTER", "TOPRIGHT", "CENTERLEFT", "CENTER", "CENTERRIGHT", "BOTTOMLEFT", "BOTTOMCENTER", "BOTTOMRIGHT". You may also use a string identifier that refers to a single axis - "TOP", "BOTTOM", "LEFT", "RIGHT", "CENTERX", "CENTERY". If you want more direct numeric control you can use number pairs. 0,0 is equivalent to "TOPLEFT", 1,1 is equivalent to "BOTTOMRIGHT", 0.5,nil is equivalent to "CENTERX".
The second part is the frame to attach to, as well as the point on that frame to attach to. The frame is simply passing in the frame table. The point is the same identifier or number pair as the first parameter.
Optionally, you may include an X or Y offset to the point.
This connection is permanent, and if the target frame moves, this frame will move along with it.
Caveat: If the target is a frame set to the "restricted" SecureMode, and the client is currently in "secure" mode, then unexpected behavior may occur.
Frame:SetPoint(...) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
... | parameter | ... | This function's parameters are complicated. Read the above summary for details. |
Sets the frame's secure mode.
"normal" is the standard mode. It allows for most functionality to be used and does not restrict frames in combat. "restricted" allows for certain sensitive functions to be called, but disables a significant amount of functionality in combat. In order to change a frame to "restricted", its parent must already be "restricted". Note that a "restricted" frame can still have "normal" children.
If you are not planning to use any restricted functions, your frame should remain in normal mode.
At the moment, it is not possible to change from "restricted" back to "normal".
Frame:SetSecureMode(secure) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
secure | parameter | string | The new secure mode. Valid inputs are "normal" and "restricted". |
Sets the strata for this frame.
Frame:SetStrata(strata) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
strata | parameter | string | The item's new strata. Must be one of the elements returned by :GetStrataList(). |
Sets the frame's visibility flag. If set to false, then this frame and all its children will not be rendered or accept mouse input.
Element:SetVisible(visible) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
visible | parameter | boolean | The new visibility flag. |
Sets the width of this frame. Undefined results if the frame already has two pinned X coordinates.
Frame:SetWidth(width) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
width | parameter | number | The new width of this frame. |