virtualx-engine-docs/_sources/classes/class_container.rst.txt
2024-10-23 09:41:33 -07:00

115 lines
4 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/Container.xml.
.. _class_Container:
Container
=========
**Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`AspectRatioContainer<class_AspectRatioContainer>`, :ref:`BoxContainer<class_BoxContainer>`, :ref:`CenterContainer<class_CenterContainer>`, :ref:`EditorProperty<class_EditorProperty>`, :ref:`FlowContainer<class_FlowContainer>`, :ref:`GraphNode<class_GraphNode>`, :ref:`GridContainer<class_GridContainer>`, :ref:`MarginContainer<class_MarginContainer>`, :ref:`PanelContainer<class_PanelContainer>`, :ref:`ScrollContainer<class_ScrollContainer>`, :ref:`SplitContainer<class_SplitContainer>`, :ref:`TabContainer<class_TabContainer>`, :ref:`ViewportContainer<class_ViewportContainer>`
Base node for containers.
.. rst-class:: classref-introduction-group
Description
-----------
Base node for containers. A **Container** contains other controls and automatically arranges them in a certain way.
A Control can inherit this to create custom container classes.
.. rst-class:: classref-introduction-group
Tutorials
---------
- :doc:`GUI containers <../tutorials/ui/gui_containers>`
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`fit_child_in_rect<class_Container_method_fit_child_in_rect>` **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`queue_sort<class_Container_method_queue_sort>` **(** **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Signals
-------
.. _class_Container_signal_sort_children:
.. rst-class:: classref-signal
**sort_children** **(** **)**
Emitted when sorting the children is needed.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Constants
---------
.. _class_Container_constant_NOTIFICATION_SORT_CHILDREN:
.. rst-class:: classref-constant
**NOTIFICATION_SORT_CHILDREN** = ``50``
Notification for when sorting the children, it must be obeyed immediately.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_Container_method_fit_child_in_rect:
.. rst-class:: classref-method
void **fit_child_in_rect** **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)**
Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
.. rst-class:: classref-item-separator
----
.. _class_Container_method_queue_sort:
.. rst-class:: classref-method
void **queue_sort** **(** **)**
Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`