Region
From Multiverse
| User Interface Widgets | |
|
Browser
|
Region
|
Region is the base element from which all other widgets are derived. It is an abstract widget type which itself cannot be created.
Property Elements
Region, and thus all widgets, may contain these property elements:
- Anchors - contains one or more Anchor elements that specify the positioning of the widget relative to its parent.
- Size - specifies the size of the widget with an AbsDimension element.
Attributes
Region has the following attributes, and thus all widgets inherit these attributes: All widgets have these attributes that they inherit from Region:
- hidden - Boolean; whether the widget is initially hidden.
- inherits - name of the widget from which to inherit all attribute values. Must be widget of the same type as this widget (or an ancestor type).
- name - name of the widget. The name must be unique across all widgets in the UI.
- setAllPoints - Boolean (Not currently implemented)
- virtual - Boolean; if true, indicates this widget is not actually created, but will be used as a template for other widgets.
Methods
Region has these methods, and thus all widgets do also.
| Method | Description | Parameters |
|---|---|---|
| ClearAllPoints() | Clears all the anchors for the widget | None |
| GetAlpha() | Returns the opacity (alpha) of the texture object, from 0 to 1. This does not include the effect of the alpha values of the parent widgets. | None |
| GetBottom() | Returns the y coordinate of the bottom edge of the frame. NOTE: This method is available on FontString and Texture widgets only with 1.5. | None |
| GetHeight() | Returns the height of the widget | None |
| GetLeft() | Returns the x coordinate of the left edge of the frame.
NOTE: This method is available on FontString and Texture widgets only with 1.5. | None |
| GetName() | Returns the name of the widget. | None |
| GetParent() | Returns the parent widget of the frame. NOTE: This method is available on FontString and Texture widgets only with 1.5. | None |
| GetRight() | Returns the x coordinate of the right edge of the frame. NOTE: This method is available on FontString and Texture widgets only with 1.5. | None |
| GetTop() | Returns the y coordinate of the top of the frame, but inverted so that 0 is the bottom of the screen. NOTE: This method is available on FontString and Texture widgets only with 1.5. | None |
| GetWidth() | Returns the width of the widget | None |
| Hide() | Mark the widget as hidden. If the widget, or any of the widget's parents are hidden, the widget will not be displayed. | None |
| IsVisible() | Returns true if the widget is visible, false otherwise. If the widget, or any of the widget's parents are hidden, the widget will not be displayed. | None |
| SetAlpha(alpha) | Set the alpha value (opacity) of the widget. | alpha - a measure of opacity: zero (0) means transparent, while one (1) means opaque. |
| SetHeight(height) | Set the height of the widget. | height -height in pixels (integer) |
| SetPoint( point,
relativeTo,
| Set an anchor point for the widget. Valid values for point and relativePoint arguments:
| point - Point on the widget that is anchored.
relativeTo - Name of the widget being achored to.
|
| SetWidth(width) | Set the width of the widget | width - width in pixels(integer) |
| Show() | Mark the widget as visible. If the widget, or any of the widget's parents are hidden, the widget will not be displayed. | None
|
