mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
88 lines
3.6 KiB
ReStructuredText
88 lines
3.6 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the BoxContainer.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_BoxContainer:
|
|
|
|
BoxContainer
|
|
============
|
|
|
|
**Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Inherited By:** :ref:`ColorPicker<class_ColorPicker>`, :ref:`HBoxContainer<class_HBoxContainer>`, :ref:`VBoxContainer<class_VBoxContainer>`
|
|
|
|
Base class for box containers.
|
|
|
|
Description
|
|
-----------
|
|
|
|
Arranges child :ref:`Control<class_Control>` nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+-------------------------------------------------------+---------------------------------------------------------+-------+
|
|
| :ref:`AlignmentMode<enum_BoxContainer_AlignmentMode>` | :ref:`alignment<class_BoxContainer_property_alignment>` | ``0`` |
|
|
+-------------------------------------------------------+---------------------------------------------------------+-------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------------------------------+---------------------------------------------------------------------------------------------------+
|
|
| :ref:`Control<class_Control>` | :ref:`add_spacer<class_BoxContainer_method_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
|
|
+-------------------------------+---------------------------------------------------------------------------------------------------+
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_BoxContainer_AlignmentMode:
|
|
|
|
.. _class_BoxContainer_constant_ALIGNMENT_BEGIN:
|
|
|
|
.. _class_BoxContainer_constant_ALIGNMENT_CENTER:
|
|
|
|
.. _class_BoxContainer_constant_ALIGNMENT_END:
|
|
|
|
enum **AlignmentMode**:
|
|
|
|
- **ALIGNMENT_BEGIN** = **0**
|
|
|
|
- **ALIGNMENT_CENTER** = **1**
|
|
|
|
- **ALIGNMENT_END** = **2**
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_BoxContainer_property_alignment:
|
|
|
|
- :ref:`AlignmentMode<enum_BoxContainer_AlignmentMode>` **alignment**
|
|
|
|
+-----------+----------------------+
|
|
| *Default* | ``0`` |
|
|
+-----------+----------------------+
|
|
| *Setter* | set_alignment(value) |
|
|
+-----------+----------------------+
|
|
| *Getter* | get_alignment() |
|
|
+-----------+----------------------+
|
|
|
|
The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN<class_BoxContainer_constant_ALIGNMENT_BEGIN>`, :ref:`ALIGNMENT_CENTER<class_BoxContainer_constant_ALIGNMENT_CENTER>`, or :ref:`ALIGNMENT_END<class_BoxContainer_constant_ALIGNMENT_END>`).
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_BoxContainer_method_add_spacer:
|
|
|
|
- :ref:`Control<class_Control>` **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
|
|
|
|
Adds a :ref:`Control<class_Control>` node to the box as a spacer. If ``begin`` is ``true``, it will insert the :ref:`Control<class_Control>` node in front of all other children.
|
|
|
|
.. |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.)`
|
|
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
|
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
|
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|