-
Notifications
You must be signed in to change notification settings - Fork 26
Container
Alessandro Febretti edited this page Feb 8, 2014
·
8 revisions
Last revision: ver. 4.3.1 - 15 October 2013
module omegaToolkit extends Widget wraps the omegaTookit::ui::Container
Base class for GUI container elements
| Method(s) | Description |
|---|---|
static Container create(Layout layout, Container parent)
|
Creates a new container widget with the specified layout |
Container3Settings get3dSettings() |
Returns the container 3d settings for the container. See Container3dSettings. |
setPixelOutputEnabled(bool) bool isPixelOutputEnabled()
|
Sets pixel output for the container. When enabled, the container will render to a pixel buffer instead of the screen |
PixelData getPixels() |
Returns the pixel data from the container when pixel output is enabled. See PixelData. |
addChild(Widget child) |
Adds a child Widget to this container |
removeChild(Widget child) |
Removes a child Widget from this container |
Widget getChildByIndex(int) |
Returns a child Widget by index. Returns None if index is invalid. |
Widget getChildByName() |
Returns a child Widget by name. Returns None if name is invalid. |
int getNumChildren() |
Returns the number of children of this container |
bool isClippingEnabled(), setClippingEnabled(bool enabled)
|
Gets or sets container clipping mode. If cliping is enabled, children widgets outside of the container bounds are not drawn. |
| Layout | |
ContainerLayout getLayout(), setLayout(ContainerLayout layout)
|
Gets or sets the layout of this container. The ContainerLayout enumeration contains the following values: LayoutFree, LayoutHorizontal, LayoutVertical, LayoutGrid
|
VAlign getVerticalAlign(), setVerticalAlign(VAlign align)
|
Gets or sets the vertical alignment of widgets in the container. Supported values are VAlign.AlignTop, VAlign.AlignMiddle, VAlign.AlignBottom
|
HAlign getHorizontalAlign(), setHorizontalAlign(HAlign align)
|
Gets or sets the horizontal alignment of widgets in the container. Supported values are HAlign.AlignLeft, HAlign.AlignCenter, HAlign.AlignRight
|
int getMargin(), setMargin(int pixels)
|
Gets or sets the margin between the container's content and its borders |
int getPadding(), setPadding(int pixels)
|
Gets or sets the padding space between elements within the container |
| Interaction | |
bool isEventInside(Event e) |
Returns true if the event happens within the container boundaries. This method supports all pointer and ray-generating events, and works with 2D and 3D mode containers. |