class_boxcontainer.rst 2.8 KB

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