Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:RestrictedEnvironment
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Frame handle methods == Real frame userdata values may not exists within the restricted environment; instead, it the restricted environment may contain frame references (introduced via the :SetFrameRef("name", frame) method). A limited subset of the widget API can be invoked upon those references; only methods marked with a star may be called on references to non-protected frames. {| class="darktable" |- ! * ! style="width: 12em"| Method !! Purpose |- | colspan="3" style="background: #282828; font-weight: bold; padding: 0.3em" align="center" | Accessor methods |- | align="center" | * || handle:GetName() || Returns frame name. |- | align="center" | * || handle:GetObjectType() || Returns widget type. |- | align="center" | * || handle:IsObjectType("widgetType") || Returns 1 if the frame is of the specified widget type. |- | align="center" | * || handle:IsProtected() || Returns 1 if the frame is protected. |- | || handle:GetID() || Returns the ID value associated with the frame. |- | || handle:IsShown() || Returns 1 if the frame is shown (even if its ancestors are not). |- | || handle:IsVisible() || Returns 1 if the frame is visible (i.e. it and all its ancestors are shown). |- | || handle:GetWidth() || Returns frame width. |- | || handle:GetHeight() || Returns frame height. |- | || handle:GetRect() || Returns left, bottom, width, height specification of the frame's rectangle. |- | || handle:GetScale() || Returns frame scale. |- | || handle:GetEffectiveScale() || Returns effective frame scale (its own scale multiplied with that of all of its ancestors). |- | || handle:GetFrameLevel() || Returns frame level. |- | || handle:GetAttribute("name") || Returns the value of an attribute; name must not begin with an underscore. |- | || handle:GetFrameRef("name") || Retrieve a restricted handle to a frame set by SetFrameRef(). |- | | valign="top" style="text-align: left" | handle:GetEffectiveAttribute("name", "button", "prefix", "suffix") || Returns the effective value of a modified attribute. Attribute name must not begin with an underscore. |- | || handle:GetChildren() || Returns restricted references to the frame's children in a list(?). |- | || handle:GetChildList(tbl) || Returns restricted references to the frame's children in a table(?). |- | || handle:GetParent() || Returns a restricted reference to the frame's parent. |- | || handle:GetMousePosition() || Returns mouse position relative to the frame, where (0,0) is the bottom left corner. |- | | valign="top"| handle:IsUnderMouse(recursive) || Returns 1 if the frame, or, if recursive is true, any of the frame's children (and their children) are under the mouse. |- | || handle:GetNumPoints() || Returns the number of anchoring points used by the frame. |- | || handle:GetPoint(i) || Returns information about an anchoring point. |- | colspan="3" style="background: #282828; font-weight: bold; padding: 0.3em" align="center" | Setter methods |- | || handle:Show(skipAttr) || Shows a frame, and, unless skipAttr is true, set the "statehidden" attribute to nil. |- | || handle:Hide(skipAttr) || Hides a frame, and, unless skipAttr is true, set the "statehidden" attribute to true. |- | || handle:SetID(id) || Sets the ID value associated with the frame |- | || handle:SetWidth(width) || Sets frame width. |- | || handle:SetHeight(height) || Sets frame height. |- | || handle:SetScale(scale) || Sets frame scale |- | || handle:SetAlpha(alpha) || Sets frame alpha |- | || handle:ClearAllPoints() || Clears all anchoring points |- | || handle:SetPoint(point, relframe, relpoint, ofsx, ofsy) || Sets an anchoring point. |- | || handle:SetAllPoints([relframe]) || Sets points to fill relframe, or the frame's parent if relframe is not specified. |- | || handle:SetAttribute("name", value) || Sets an attribute on the frame. Name must not begin with an underscore. |- | || handle:ClearBindings() || Clears all override bindings the frame is registered as an owner of. |- | || handle:ClearBinding(key) || Clears a specific override binding this frame is the registered owner of. |- | | valign="top" style="text-align: left" | handle:SetBindingClick(priority, key, name, button) || Creates an override click binding to click button specified by name (button name or reference), when key is pressed. The handle acts as the override binding's owner |- | | style="text-align: left"| handle:SetBindingSpell(priority, key, spell) || Creates an override spell binding; the handle specifies the binding's owner. |- | | style="text-align: left"| handle:SetBindingMacro(priority, key, macro) || Creates an override macro binding; the handle specifies the binding's owner. |- | | style="text-align: left"| handle:SetBindingItem(priority, key, item) || Creates an override item binding; the handle specifies the binding's owner. |- | || handle:Raise() || Makes frame top-most. |- | || handle:Lower() || Lowers the frame's frame level. |- | || handle:SetFrameLevel(level) || Alters frame level. |- | || handle:SetParent(parent) || Changes frame's parent. |- | || handle:RegisterAutoHide(duration) || Registers the frame to be hidden after the mouse leaves the frame for duration seconds. |- | || handle:UnregisterAutoHide() || Unregisters the frame from automatic hiding. |- | | valign="top"| handle:AddToAutoHide(childFrame) || Adds a child frame to this frame's automatic hiding. The duration now applies to the mouse being out of both the frame and the childFrame. |- | || handle:Disable() || Disables a button, disabling click handling. |- | || handle:Enable() || Enables a button, enabling click handling. |}
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)