class_boxcontainer.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.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. Base class for box containers.
  11. Description
  12. -----------
  13. Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
  14. Properties
  15. ----------
  16. +-----------------------------------------------+---------------------------------------------------------+---------------------------+
  17. | :ref:`AlignMode<enum_BoxContainer_AlignMode>` | :ref:`alignment<class_BoxContainer_property_alignment>` | ``0`` |
  18. +-----------------------------------------------+---------------------------------------------------------+---------------------------+
  19. | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``1`` *(parent override)* |
  20. +-----------------------------------------------+---------------------------------------------------------+---------------------------+
  21. Methods
  22. -------
  23. +------+---------------------------------------------------------------------------------------------------+
  24. | void | :ref:`add_spacer<class_BoxContainer_method_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
  25. +------+---------------------------------------------------------------------------------------------------+
  26. Enumerations
  27. ------------
  28. .. _enum_BoxContainer_AlignMode:
  29. .. _class_BoxContainer_constant_ALIGN_BEGIN:
  30. .. _class_BoxContainer_constant_ALIGN_CENTER:
  31. .. _class_BoxContainer_constant_ALIGN_END:
  32. enum **AlignMode**:
  33. - **ALIGN_BEGIN** = **0** --- Aligns children with the beginning of the container.
  34. - **ALIGN_CENTER** = **1** --- Aligns children with the center of the container.
  35. - **ALIGN_END** = **2** --- Aligns children with the end of the container.
  36. Property Descriptions
  37. ---------------------
  38. .. _class_BoxContainer_property_alignment:
  39. - :ref:`AlignMode<enum_BoxContainer_AlignMode>` **alignment**
  40. +-----------+----------------------+
  41. | *Default* | ``0`` |
  42. +-----------+----------------------+
  43. | *Setter* | set_alignment(value) |
  44. +-----------+----------------------+
  45. | *Getter* | get_alignment() |
  46. +-----------+----------------------+
  47. 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>`).
  48. Method Descriptions
  49. -------------------
  50. .. _class_BoxContainer_method_add_spacer:
  51. - void **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
  52. Adds a control to the box as a spacer. If ``true``, ``begin`` will insert the spacer control in front of other children.
  53. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  54. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  55. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`