class_boxcontainer.rst 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the BoxContainer.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_BoxContainer:
  6. BoxContainer
  7. ============
  8. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`ColorPicker<class_ColorPicker>`, :ref:`HBoxContainer<class_HBoxContainer>`, :ref:`VBoxContainer<class_VBoxContainer>`
  10. **Category:** Core
  11. Brief Description
  12. -----------------
  13. Base class for box containers.
  14. Properties
  15. ----------
  16. +-----------------------------------------------+---------------------------------------------------------+---+
  17. | :ref:`AlignMode<enum_BoxContainer_AlignMode>` | :ref:`alignment<class_BoxContainer_property_alignment>` | 0 |
  18. +-----------------------------------------------+---------------------------------------------------------+---+
  19. Methods
  20. -------
  21. +------+---------------------------------------------------------------------------------------------------+
  22. | void | :ref:`add_spacer<class_BoxContainer_method_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
  23. +------+---------------------------------------------------------------------------------------------------+
  24. Enumerations
  25. ------------
  26. .. _enum_BoxContainer_AlignMode:
  27. .. _class_BoxContainer_constant_ALIGN_BEGIN:
  28. .. _class_BoxContainer_constant_ALIGN_CENTER:
  29. .. _class_BoxContainer_constant_ALIGN_END:
  30. enum **AlignMode**:
  31. - **ALIGN_BEGIN** = **0** --- Aligns children with the beginning of the container.
  32. - **ALIGN_CENTER** = **1** --- Aligns children with the center of the container.
  33. - **ALIGN_END** = **2** --- Aligns children with the end of the container.
  34. Description
  35. -----------
  36. Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
  37. Property Descriptions
  38. ---------------------
  39. .. _class_BoxContainer_property_alignment:
  40. - :ref:`AlignMode<enum_BoxContainer_AlignMode>` **alignment**
  41. +-----------+----------------------+
  42. | *Default* | 0 |
  43. +-----------+----------------------+
  44. | *Setter* | set_alignment(value) |
  45. +-----------+----------------------+
  46. | *Getter* | get_alignment() |
  47. +-----------+----------------------+
  48. 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>`).
  49. Method Descriptions
  50. -------------------
  51. .. _class_BoxContainer_method_add_spacer:
  52. - void **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
  53. Adds a control to the box as a spacer. If ``true``, ``begin`` will insert the spacer control in front of other children.