Skip to content

Frame Methods

wutname1 edited this page May 12, 2019 · 1 revision

All widgets inherits at some point from Frame object so here is the list of frame methods:

Frame methods

  • CreateFontString(['name'[,'layer'[,'inheritsFrom']]]) - Create and return FontString as a child of this Frame
  • CreateTexture(['name'[,'layer']][,'inheritsFrom']) - Create and return Texture as a child of this Frame. Good for solid colors.
  • CreateTitleRegion() - Create a title region for the frame if it does not have one.
  • DisableDrawLayer('layer') - Disable rendering of 'regions' (fontstrings, textures) in the specified draw layer.
  • EnableDrawLayer('layer') - Enable rendering of 'regions' (fontstrings, textures) in the specified draw layer.
  • EnableKeyboard(enableFlag) - Set whether this frame will get keyboard input.
  • EnableMouse(enableFlag) - Set whether this frame will get mouse input.
  • EnableMouseWheel(enableFlag) - Set whether this frame will get mouse wheel notifications.
  • GetAttribute(prefix, name, suffix) - Returns the first existing attribute of (prefix..name..suffix), (''..name..suffix), (prefix..name..''), (''..name..''), (name).
  • GetBackdrop() - Creates and returns a backdrop table suitable for use in SetBackdrop
  • GetBackdropBorderColor() - Gets the frame's backdrop border color (r, g, b, a)
  • GetBackdropColor() - Gets the frame's backdrop color (r, g, b, a)
  • GetChildren() - Get the list of 'children' (frames and things derived from frames) of this frame.
  • GetClampRectInsets() - Gets the modifiers to the frame's rectangle used for clamping the frame to screen.
  • GetDepth()
  • GetEffectiveAlpha() - Returns the effective alpha of a frame.
  • GetEffectiveDepth()
  • GetEffectiveScale() - Get the scale factor of this object relative to the root window.
  • GetFrameLevel() - Get the level of this frame.
  • GetFrameStrata() - Get the strata of this frame.
  • GetFrameType() - Get the type of this frame.
  • GetHitRectInsets() - Gets the frame's hit rectangle inset distances (l, r, t, b)
  • GetID() - Get the ID of this frame.
  • GetMaxResize() - Gets the frame's maximum allowed resize bounds (w, h)
  • GetMinResize() - Gets the frame's minimum allowed resize bounds (w, h)
  • GetNumChildren() - Get the number of 'children' (frames and things derived from frames) this frame has.
  • GetNumRegions() - Return the number of 'regions' (fontstrings, textures) belonging to this frame.
  • GetRegions() - Return the 'regions' (fontstrings, textures) of the frame (multiple return values) belonging to this frame.
  • GetScale() - Get the scale factor of this object relative to its parent.
  • GetScript('handler') - Get the function for one of this frame's handlers.
  • GetTitleRegion() - Return the frame's title region.
  • HasScript('handler') - Return true if the frame can be given a handler of the specified type (NOT whether it actually HAS one, use GetScript for that) (added 1.8)
  • HookScript('handler', function) - Hook a secure frame script.
  • IgnoreDepth(ignoreFlag)
  • IsClampedToScreen() - Gets whether the frame is prohibited from being dragged off screen.
  • IsEventRegistered('event') - Returns true if the given event is registered to the frame.
  • IsFrameType('type') - Determine if this frame is of the specified type, or a subclass of that type.
  • IsIgnoringDepth()
  • IsKeyboardEnabled() - Get whether this frame will get keyboard input.
  • IsMouseEnabled() - Get whether this frame will get mouse input.
  • IsMouseWheelEnabled() - Get whether this frame will get mouse wheel notifications.
  • IsMovable() - Determine if the frame can be moved.
  • IsResizable() - Determine if the frame can be resized.
  • IsToplevel() - Get whether the frame is set as toplevel.
  • IsUserPlaced() - Determine if this frame has been relocated by the user.
  • Lower() - Lower this frame behind other frames.
  • Raise() - Raise this frame above other frames.
  • RegisterAllEvents() - Register this frame to receive all events (For debugging purposes only!)
  • RegisterEvent('event') - Indicate that this frame should be notified when event occurs.
  • RegisterForDrag('buttonType'[,'buttonType'...]) - Inidicate that this frame should be notified of drag events for the specified buttons.
  • SetBackdrop([backdropTable]) - Set the backdrop of the frame according to the specification provided.
  • SetBackdropBorderColor(r, g, b[, a]) - Set the frame's backdrop's border's color.
  • SetBackdropColor(r, g, b[, a]) - Set the frame's backdrop color.
  • SetClampedToScreen(clamped) - Set whether the frame is prohibited from being dragged off screen.
  • SetClampRectInsets(left, right, top, bottom) - Modify the frame's rectangle used to prevent dragging offscreen.
  • SetDepth(depth) (added 3.0.8)
  • SetFrameLevel(level) - Set the level of this frame (determines which of overlapping frames shows on top).
  • SetFrameStrata('strata') - Set the strata of this frame.
  • SetHitRectInsets(left, right, top, bottom) - Set the inset distances for the frame's hit rectangle.
  • SetID(id) - Set the ID of this frame.
  • SetMaxResize(maxWidth, maxHeight) - Set the maximum dimensions this frame can be resized to.
  • SetMinResize(minWidth, minHeight) - Set the minimum dimensions this frame can be resized to.
  • SetMovable(isMovable) - Set whether the frame can be moved.
  • SetResizable(isResizable) - Set whether the frame can be resized.
  • SetScale(scale) - Set the scale factor of this frame relative to its parent.
  • SetScript('handler', function) - Set the function to use for a handler on this frame.
  • SetToplevel(isTopLevel) - Set whether the frame should raise itself when clicked.
  • SetUserPlaced(isUserPlaced) - Set whether the frame has been relocated by the user, and will thus be saved in the layout cache.
  • StartMoving() - Start moving this frame.
  • StartSizing('point') - Start sizing this frame using the specified anchor point.
  • StopMovingOrSizing() - Stop moving and/or sizing this frame.
  • UnregisterAllEvents() - Indicate that this frame should no longer be notified when any events occur.
  • UnregisterEvent('event') - Indicate that this frame should no longer be notified when event occurs.

Inherited from Region:

  • ClearAllPoints() - Clear all attachment points for this object.
  • CreateAnimationGroup(['name'[,'inheritsFrom']]) - Create and return a new AnimationGroup as a child of this Region.
  • GetAnimationGroups() - Returns all AnimationGroups that are children of this Region.
  • GetBottom() - Get the y location of the bottom edge of this frame.
  • GetCenter() - Get the coordinates of the center of this frame.
  • GetHeight() - Get the height of this object.
  • GetLeft() - Get the x location of the left edge of this frame.
  • GetNumPoints() - Get the number of anchor points for this frame.
  • GetPoint(pointNum) - Get details for an anchor point for this frame (point, relativeTo, relativePoint, xofs, yofs)
  • GetRect() - Get frame's left, bottom, width, height.
  • GetRight() - Get the x location of the right edge of this frame.
  • GetSize() - Get the width and height of the frame
  • GetTop() - Get the y location of the top edge of this frame.
  • GetWidth() - Get the width of this object.
  • Hide() - Set this object to hidden (it and all of its children will disappear).
  • IsDragging() - True if this Region or its Parent is being dragged.
  • IsProtected() - Determine if this object can be manipulated in certain ways by tainted code in combat or not
  • IsShown() - Determine if this object is shown (would be visible if its parent was visible).
  • IsVisible() - Get whether the object is visible on screen (logically (IsShown() and GetParent():IsVisible()));
  • SetAllPoints(frame or 'frameName') - Set all anchors to match edges of specified frame.
  • SetHeight(height) - Set the height of the object.
  • SetParent(parent or 'parentName') - Set the parent for this frame.
  • SetPoint('point','relativeFrame' or relativeObject,'relativePoint'[, xOfs, yOfs]) - Set an attachment point of this object.
  • SetSize(width, height) - Set the region's width and height
  • SetWidth(width) - Set the width of the object.
  • Show() - Set this object to shown (it will appear if its parent is visible).
  • StopAnimating() - Stops any active animations on the Region and its children.

Inherited from UIObject:

  • GetAlpha() - Return this object's alpha (transparency) value.
  • GetName() - Return the name of the object.
  • GetObjectType() - Get the type of this object.
  • IsForbidden() - Return bool indicating is secure widget instance.
  • IsObjectType('type') - Determine if this object is of the specified type, or a subclass of that type.
  • SetAlpha(alpha) - Set the object's alpha (transparency) value.