Class Container
Base class for all GUI containers.
- Inheritance
-
Container
- Derived
Remarks
Base class for all GUI containers. A Container automatically arranges its child controls in a certain way. This class can be inherited to make custom container types.
See Also
Fields
NOTIFICATION_PRE_SORT_CHILDREN
Notification just before children are going to be sorted, in case there's something to process beforehand.
const NOTIFICATION_PRE_SORT_CHILDREN = 50
NOTIFICATION_SORT_CHILDREN
Notification for when sorting the children, it must be obeyed immediately.
const NOTIFICATION_SORT_CHILDREN = 51
Methods
_get_allowed_size_flags_horizontal
Qualifiers: virtualconst
Implement to return a list of allowed horizontal SizeFlags for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock.
Note: Having no size flags is equal to having Control.SIZE_SHRINK_BEGIN. As such, this value is always implicitly allowed.
PackedInt32Array _get_allowed_size_flags_horizontal
_get_allowed_size_flags_vertical
Qualifiers: virtualconst
Implement to return a list of allowed vertical SizeFlags for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock.
Note: Having no size flags is equal to having Control.SIZE_SHRINK_BEGIN. As such, this value is always implicitly allowed.
PackedInt32Array _get_allowed_size_flags_vertical
fit_child_in_rect(Control, Rect2)
Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
void fit_child_in_rect(Control child, Rect2 rect)
Parameters
queue_sort
Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
void queue_sort
Events
pre_sort_children
Emitted when children are going to be sorted.
signal pre_sort_children
sort_children
Emitted when sorting the children is needed.
signal sort_children