class_boxcontainer.rst 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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:`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. Member Variables
  22. ----------------
  23. - :ref:`int<class_int>` **alignment**
  24. Numeric Constants
  25. -----------------
  26. - **ALIGN_BEGIN** = **0** --- Align children with beginning of the container.
  27. - **ALIGN_CENTER** = **1** --- Align children with center of the container.
  28. - **ALIGN_END** = **2** --- Align children with end of the container.
  29. Description
  30. -----------
  31. Base class for Box containers. It arranges children controls vertically or horizontally, and rearranges them automatically when their minimum size changes.
  32. Member Function Description
  33. ---------------------------
  34. .. _class_BoxContainer_add_spacer:
  35. - void **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
  36. Add a control to the box as a spacer.
  37. If *begin* is true the spacer control will be inserted in front of other children.
  38. .. _class_BoxContainer_get_alignment:
  39. - :ref:`int<class_int>` **get_alignment** **(** **)** const
  40. Return the alignment of children in the container.
  41. .. _class_BoxContainer_set_alignment:
  42. - void **set_alignment** **(** :ref:`int<class_int>` alignment **)**
  43. Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END).