Back to index...

NameTypeDeprecatedSecureDescription
LayoutA UI element of type Layout or derived from Layout.
Layout.Event:MoveSignals that the frame's vertices have moved.
Layout.Event:SizeSignals that the frame's size has changed.
Layout:EventAttachfunctionAttaches an event handler to an event.
Layout:EventDetachfunctionDetaches an event handler from an event. Any parameter can be 'nil', and this is interpreted as a...
Layout:EventListfunctionLists the current event handlers for an event.
Layout:EventMacroGetfunctionGets the macro that will be triggered when this event occurs.
Layout:EventMacroSetfunctionSets the macro that will be triggered when this event occurs.
Layout:GetBottomfunctionRetrieves the Y position of the bottom edge of this element.
Layout:GetBoundsfunctionRetrieves the complete bounds of this element.
Layout:GetEventTablefunctionRetrieves the event table of this element. By default, this value is also stored in "this.Event".
Layout:GetHeightfunctionRetrieves the height of this element.
Layout:GetLeftfunctionRetrieves the X position of the left edge of this element.
Layout:GetNamefunctionRetrieves the name of this element.
Layout:GetOwnerfunctionRetrieves the owner of this element.
Layout:GetRightfunctionRetrieves the X position of the right edge of this element.
Layout:GetTopfunctionRetrieves the Y position of the top edge of this element.
Layout:GetTypefunctionRetrieves the type of this element.
Layout:GetWidthfunctionRetrieves the width of this element.
Layout:ReadAllfunctionRead all set points and sizes from this frame.
Layout:ReadHeightfunctionRead a set height from this frame.
Layout:ReadPointfunctionRead a set point from this frame. Must be given a single-axis coordinate.
Layout:ReadWidthfunctionRead a set width from this frame.

Layout

A UI element of type Layout or derived from Layout.

Layout.Event:Move

Signals that the frame's vertices have moved.

Usage:

Layout.Event:Move()

Layout.Event:Size

Signals that the frame's size has changed.

Usage:

Layout.Event:Size()

Layout:EventAttach

Attaches an event handler to an event.

Usage:

Layout:EventAttach(handle, callback, label)
Layout:EventAttach(handle, callback, label, priority)
ParameterTypeDatatypeDescription
callbackparameterfunctionA 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.
handleparametereventFrameA handle to a frame event, usually pulled out of the "Event.UI." hierarchy.
labelparameterstringHuman-readable label used to identify the handler in error reports, performance reports, and for later detaching.
priorityparameternumberPriority of the event handler. Higher numbers trigger first.
noSecureFrameAndEnvironment
true

Layout:EventDetach

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)
ParameterTypeDatatypeDescription
callbackparameterfunction/nilA callback function to search for.
handleparametereventFrameA handle to a frame event, usually pulled out of the "Event.UI." hierarchy.
labelparameterstring/nilHuman-readable label used to identify the handler in error reports, performance reports, and for later detaching.
ownerparameterstring/nilOwner to search for.
priorityparameternumber/nilPriority of the event handler. Higher numbers trigger first.

Layout:EventList

Lists the current event handlers for an event.

Usage:

result = Layout:EventList(handle)
ParameterTypeDatatypeDescription
handleparametereventFrameA handle to a frame event, usually pulled out of the "Event.UI." hierarchy.
resultresulttableA 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.

Layout:EventMacroGet

Gets the macro that will be triggered when this event occurs.

Usage:

macro = Layout:EventMacroGet(handle)
ParameterTypeDatatypeDescription
handleparametereventFrameA handle to a frame event, usually pulled out of the "Event.UI." hierarchy.
macroresultstring/nilThe macro that will be triggered.

Layout:EventMacroSet

Sets the macro that will be triggered when this event occurs.

Usage:

Layout:EventMacroSet(handle, macro)
ParameterTypeDatatypeDescription
handleparametereventFrameA handle to a frame event, usually pulled out of the "Event.UI." hierarchy.
macroparameterstring/nilThe macro to trigger. nil to clear the macro.
requireSecureFrameAndInsecureEnvironment
true

Layout:GetBottom

Retrieves the Y position of the bottom edge of this element.

Usage:

bottom = Layout:GetBottom()
ParameterTypeDatatypeDescription
bottomresultnumberThe Y position of the bottom edge of this element.

Layout:GetBounds

Retrieves the complete bounds of this element.

Usage:

left, top, right, bottom = Layout:GetBounds()
ParameterTypeDatatypeDescription
bottomresultnumberThe Y position of the bottom edge of this element.
leftresultnumberThe X position of the left edge of this element.
rightresultnumberThe X position of the right edge of this element.
topresultnumberThe Y position of the top edge of this element.

Layout:GetEventTable

Retrieves the event table of this element. By default, this value is also stored in "this.Event".

Usage:

eventTable = Layout:GetEventTable()
ParameterTypeDatatypeDescription
eventTableresulttableThe event table of this element.

Layout:GetHeight

Retrieves the height of this element.

Usage:

height = Layout:GetHeight()
ParameterTypeDatatypeDescription
heightresultnumberThe height of this element.

Layout:GetLeft

Retrieves the X position of the left edge of this element.

Usage:

left = Layout:GetLeft()
ParameterTypeDatatypeDescription
leftresultnumberThe X position of the left edge of this element.

Layout:GetName

Retrieves the name of this element.

Usage:

name = Layout:GetName()
ParameterTypeDatatypeDescription
nameresultstringThe name of this element, as provided by the addon that created it.

Layout:GetOwner

Retrieves the owner of this element.

Usage:

owner = Layout:GetOwner()
ParameterTypeDatatypeDescription
ownerresultstringThe owner of this element. Given as an addon identifier.

Layout:GetRight

Retrieves the X position of the right edge of this element.

Usage:

right = Layout:GetRight()
ParameterTypeDatatypeDescription
rightresultnumberThe X position of the right edge of this element.

Layout:GetTop

Retrieves the Y position of the top edge of this element.

Usage:

top = Layout:GetTop()
ParameterTypeDatatypeDescription
topresultnumberThe Y position of the top edge of this element.

Layout:GetType

Retrieves the type of this element.

Usage:

type = Layout:GetType()
ParameterTypeDatatypeDescription
typeresultstringThe type of this element.

Layout:GetWidth

Retrieves the width of this element.

Usage:

width = Layout:GetWidth()
ParameterTypeDatatypeDescription
widthresultnumberThe width of this element.

Layout:ReadAll

Read all set points and sizes from this frame.

Usage:

results = Layout:ReadAll()
ParameterTypeDatatypeDescription
resultsresulttableResult table. Contains data in the following format: {x = {size = (size), [(position)] = {layout = (layout), position = (position), offset = (offset)}}, y = (the same thing)}.

Layout:ReadHeight

Read a set height from this frame.

Usage:

height = Layout:ReadHeight()
ParameterTypeDatatypeDescription
heightresultnumberThe parameter passed to SetHeight(), or nil if no such parameter has been passed.

Layout:ReadPoint

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)
ParameterTypeDatatypeDescription
coordinateparameterstringNamed coordinate. Must be a one-axis coordinate.
xparameternumber/nilX coordinate of the point. Either this or Y must be nil.
yparameternumber/nilY coordinate of the point. Either this or X must be nil.
layoutresultLayoutThe table that this point is pinned to.
offsetresultnumberThe offset in pixels from the source location to the actual location.
originresultstringThe string "origin".
positionresultnumberThe position on "layout" that this point is pinned. 0 refers to the top or left edge, 1 refers to the bottom or right edge.

Layout:ReadWidth

Read a set width from this frame.

Usage:

width = Layout:ReadWidth()
ParameterTypeDatatypeDescription
widthresultnumberThe parameter passed to SetWidth(), or nil if no such parameter has been passed.

Back to index...