Region is the basic type for anything that can occupy an area of the screen. As such, Frames, Textures and FontStrings are all various kinds of Region. Region provides most of the functions that support size, position and anchoring, including animation. It is a "real virtual" type; it cannot be instantiated, but objects can return true when asked if they are Regions.
Defined Methods
- canChange = Region:CanChangeProtectedState() - Returns whether protected properties of the region can be changed by non-secure scripts
- Region:ClearAllPoints() - Removes all anchor points from the region
- animationGroup = Region:CreateAnimationGroup(["name" [, "inheritsFrom"]]) - Creates a new AnimationGroup as a child of the region
- ... = Region:GetAnimationGroups() - Returns a list of animation groups belonging to the region
- bottom = Region:GetBottom() - Returns the distance from the bottom of the screen to the bottom of the region
- x, y = Region:GetCenter() - Returns the screen coordinates of the region's center
- height = Region:GetHeight() - Returns the height of the region
- left = Region:GetLeft() - Returns the distance from the left edge of the screen to the left edge of the region
- numPoints = Region:GetNumPoints() - Returns the number of anchor points defined for the region
- point, relativeTo, relativePoint, xOffset, yOffset = Region:GetPoint(index) - Returns information about one of the region's anchor points
- left, bottom, width, height = Region:GetRect() - Returns the position and dimensions of the region
- right = Region:GetRight() - Returns the distance from the left edge of the screen to the right edge of the region
- width, height = Region:GetSize() - Returns the width and height of the region
- top = Region:GetTop() - Returns the distance from the bottom of the screen to the top of the region
- width = Region:GetWidth() - Returns the width of the region
- isDragging = Region:IsDragging() - Returns whether the region is currently being dragged
- isOver = Region:IsMouseOver([topOffset [, leftOffset [, bottomOffset [, rightOffset]]]]) - Returns whether the mouse cursor is over the given region
- isProtected, explicit = Region:IsProtected() - Returns whether the region is protected
- Region:SetAllPoints([region]) or Region:SetAllPoints(["name"]) - Sets all anchor points of the region to match those of another region
- Region:SetHeight(height) - Sets the region's height
- Region:SetParent(frame) or Region:SetParent("name") - Makes another frame the parent of this region
- Region:SetPoint("point" [, relativeTo [, "relativePoint" [, xOffset [, yOffset]]]]) - Sets an anchor point for the region
- Region:SetSize(width, height) - Sets the size of the region to the specified values
- Region:SetWidth(width) - Sets the region's width
- Region:StopAnimating() - Stops any active animations involving the region or its children
Inherited Methods
- name = Region:GetName() - Returns the widget object's name
- type = Region:GetObjectType() - Returns the object's widget type
- parent = Region:GetParent() - Returns the object's parent object
- isType = Region:IsObjectType("type") - Returns whether the object belongs to a given widget type