Container
继承: Control
< CanvasItem
< Node
< Object
派生: AspectRatioContainer
, BoxContainer
, CenterContainer
, EditorProperty
, FlowContainer
, GraphElement
, GridContainer
, MarginContainer
, PanelContainer
, ScrollContainer
, SplitContainer
, SubViewportContainer
, TabContainer
Base class for all GUI containers.
描述
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.
属性
MouseFilter | mouse_filter |
方法
PackedInt32Array | _get_allowed_size_flags_horizontal ( ) virtual1 const2 |
PackedInt32Array | _get_allowed_size_flags_vertical ( ) virtual1 const2 |
void | fit_child_in_rect ( child: Control , rect: Rect2 ) |
void | queue_sort ( ) |
信号
pre_sort_children ( )
Emitted when children are going to be sorted.
sort_children ( )
Emitted when sorting the children is needed.
常量
NOTIFICATION_PRE_SORT_CHILDREN = 50
Notification just before children are going to be sorted, in case there's something to process beforehand.
NOTIFICATION_SORT_CHILDREN = 51
Notification for when sorting the children, it must be obeyed immediately.
方法说明
PackedInt32Array
_get_allowed_size_flags_horizontal ( ) virtual1 const2
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_vertical ( ) virtual1 const2
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.
void
fit_child_in_rect ( child: Control
, rect: Rect2
)
Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
void
queue_sort ( )
Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。