class_boxcontainer.rst 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_BoxContainer:
  4. BoxContainer
  5. ============
  6. **Inherits:** :ref:`Container<class_container>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Inherited By:** :ref:`VBoxContainer<class_vboxcontainer>`, :ref:`ButtonGroup<class_buttongroup>`, :ref:`HBoxContainer<class_hboxcontainer>`, :ref:`ColorPicker<class_colorpicker>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Base class for Box containers.
  12. Member Functions
  13. ----------------
  14. +------------------------+------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`add_spacer<class_BoxContainer_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
  16. +------------------------+------------------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_alignment<class_BoxContainer_get_alignment>` **(** **)** const |
  18. +------------------------+------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_alignment<class_BoxContainer_set_alignment>` **(** :ref:`int<class_int>` alignment **)** |
  20. +------------------------+------------------------------------------------------------------------------------------------------+
  21. Numeric Constants
  22. -----------------
  23. - **ALIGN_BEGIN** = **0** --- Align children with beginning of the container.
  24. - **ALIGN_CENTER** = **1** --- Align children with center of the container.
  25. - **ALIGN_END** = **2** --- Align children with end of the container.
  26. Description
  27. -----------
  28. Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes.
  29. Member Function Description
  30. ---------------------------
  31. .. _class_BoxContainer_add_spacer:
  32. - void **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
  33. Add a control to the box as a spacer.
  34. If *begin* is true the spacer control will be inserted in front of other children.
  35. .. _class_BoxContainer_get_alignment:
  36. - :ref:`int<class_int>` **get_alignment** **(** **)** const
  37. Return the alignment of children in the container.
  38. .. _class_BoxContainer_set_alignment:
  39. - void **set_alignment** **(** :ref:`int<class_int>` alignment **)**
  40. Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END).