123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- :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/BoxContainer.xml.
- .. _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.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`GUI containers <../tutorials/ui/gui_containers>`
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-----------------------------------------------+---------------------------------------------------------+-----------------------------------------------------------------------+
- | :ref:`AlignMode<enum_BoxContainer_AlignMode>` | :ref:`alignment<class_BoxContainer_property_alignment>` | ``0`` |
- +-----------------------------------------------+---------------------------------------------------------+-----------------------------------------------------------------------+
- | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``1`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) |
- +-----------------------------------------------+---------------------------------------------------------+-----------------------------------------------------------------------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +------+---------------------------------------------------------------------------------------------------+
- | void | :ref:`add_spacer<class_BoxContainer_method_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
- +------+---------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_BoxContainer_AlignMode:
- .. rst-class:: classref-enumeration
- enum **AlignMode**:
- .. _class_BoxContainer_constant_ALIGN_BEGIN:
- .. rst-class:: classref-enumeration-constant
- :ref:`AlignMode<enum_BoxContainer_AlignMode>` **ALIGN_BEGIN** = ``0``
- Aligns children with the beginning of the container.
- .. _class_BoxContainer_constant_ALIGN_CENTER:
- .. rst-class:: classref-enumeration-constant
- :ref:`AlignMode<enum_BoxContainer_AlignMode>` **ALIGN_CENTER** = ``1``
- Aligns children with the center of the container.
- .. _class_BoxContainer_constant_ALIGN_END:
- .. rst-class:: classref-enumeration-constant
- :ref:`AlignMode<enum_BoxContainer_AlignMode>` **ALIGN_END** = ``2``
- Aligns children with the end of the container.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_BoxContainer_property_alignment:
- .. rst-class:: classref-property
- :ref:`AlignMode<enum_BoxContainer_AlignMode>` **alignment** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_alignment** **(** :ref:`AlignMode<enum_BoxContainer_AlignMode>` value **)**
- - :ref:`AlignMode<enum_BoxContainer_AlignMode>` **get_alignment** **(** **)**
- The alignment of the container's children (must be one of :ref:`ALIGN_BEGIN<class_BoxContainer_constant_ALIGN_BEGIN>`, :ref:`ALIGN_CENTER<class_BoxContainer_constant_ALIGN_CENTER>` or :ref:`ALIGN_END<class_BoxContainer_constant_ALIGN_END>`).
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_BoxContainer_method_add_spacer:
- .. rst-class:: classref-method
- void **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
- Adds a control to the box as a spacer. If ``true``, ``begin`` will insert the spacer control in front of 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.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|