Signals a key pressed.
Usage:
Frame.Event:KeyDown(button) |
Parameter | Type | Datatype | Description |
button | parameter | variant | The key, in string form. |
Signals gaining key focus.
Usage:
Frame.Event:KeyFocusGain() |
Signals losing key focus.
Usage:
Frame.Event:KeyFocusLoss() |
Frame.Event:KeyRepeat@summary
Usage:
Frame.Event:KeyRepeat(button) |
Parameter | Type | Datatype | Description |
button | parameter | variant | The key, in string form. |
Signals text typed.
Usage:
Frame.Event:KeyType(typed) |
Parameter | Type | Datatype | Description |
typed | parameter | variant | The text. |
Signals a key released.
Usage:
Frame.Event:KeyUp(button) |
Parameter | Type | Datatype | Description |
button | parameter | variant | The key, in string form. |
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.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
Signals that the mouse's middle button has been released inside the frame. Blocks middle mouse events from frames below this one.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
Signals that the mouse's fourth button has been released inside the frame. Blocks fourth button mouse events from frames below this one.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
Signals that the mouse's fifth button has been released inside the frame. Blocks fifth button mouse events from frames below this one.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
Signals that the frame's vertices have moved.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
Frame.Event:RightUpoutside() |
Signals that the frame's size has changed.
Usage:
Signals that the mousewheel has been moved backward inside the frame. Blocks mousewheel events from frames below this one.
Usage:
Signals that the mousewheel has been moved forward inside the frame. Blocks mousewheel events from frames below this one.
Usage:
Frame.Event:WheelForward() |
Attaches an event handler to an event.
Usage:
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. |
- noSecureFrameAndEnvironment
- true
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.
Usage:
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.
Usage:
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. |
- members
-
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.
Usage:
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.
Usage:
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. |
- requireSecureFrameAndInsecureEnvironment
- true
Gets the alpha multiplier of this frame.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
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".
Usage:
eventTable = Layout:GetEventTable() |
Parameter | Type | Datatype | Description |
eventTable | result | table | The event table of this element. |
Retrieves the height of this element.
Usage:
height = Layout:GetHeight() |
Parameter | Type | Datatype | Description |
height | result | number | The height of this element. |
Gets the key focus status.
Usage:
focus = Element:GetKeyFocus() |
Parameter | Type | Datatype | Description |
focus | result | boolean | Whether this frame is the current key focus. |
Retrieves the X position of the left edge of this element.
Usage:
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.
Usage:
mask = Element:GetMouseMasking() |
Parameter | Type | Datatype | Description |
mask | result | string | The current mouse masking mode. |
Retrieves the name of this element.
Usage:
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.
Usage:
owner = Layout:GetOwner() |
Parameter | Type | Datatype | Description |
owner | result | string | The owner of this element. Given as an addon identifier. |
Retrieves the X position of the right edge of this element.
Usage:
right = Layout:GetRight() |
Parameter | Type | Datatype | Description |
right | result | number | The X position of the right edge of this element. |
Retrieves the Y position of the top edge of this element.
Usage:
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.
Usage:
type = Layout:GetType() |
Parameter | Type | Datatype | Description |
type | result | string | The type of this element. |
Gets the visibility flag for this frame.
Usage:
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.
Usage:
width = Layout:GetWidth() |
Parameter | Type | Datatype | Description |
width | result | number | The width of this element. |
Read all set points and sizes from this frame.
Usage:
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.
Usage:
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.
Usage:
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.
Usage:
width = Layout:ReadWidth() |
Parameter | Type | Datatype | Description |
width | result | number | The parameter passed to SetWidth(), or nil if no such parameter has been passed. |
Sets the alpha transparency multiplier for this frame and its children.
Usage:
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.
Usage:
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 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.
Usage:
Element:SetKeyFocus(focus) |
Parameter | Type | Datatype | Description |
focus | parameter | boolean | The new key focus setting. |
Sets the frame's mouse masking mode.
Usage:
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. |
- noSecureFrameAndEnvironment
- true
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.
Usage:
Element:SetVisible(visible) |
Parameter | Type | Datatype | Description |
visible | parameter | boolean | The new visibility flag. |
- noSecureFrameAndEnvironment
- true