class_boxcontainer.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/BoxContainer.xml.
  6. .. _class_BoxContainer:
  7. BoxContainer
  8. ============
  9. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`ColorPicker<class_ColorPicker>`, :ref:`HBoxContainer<class_HBoxContainer>`, :ref:`VBoxContainer<class_VBoxContainer>`
  11. Base class for box containers.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Arranges child controls vertically or horizontally, and rearranges the controls automatically when their minimum size changes.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`GUI containers <../tutorials/ui/gui_containers>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-----------------------------------------------+---------------------------------------------------------+-----------------------------------------------------------------------+
  26. | :ref:`AlignMode<enum_BoxContainer_AlignMode>` | :ref:`alignment<class_BoxContainer_property_alignment>` | ``0`` |
  27. +-----------------------------------------------+---------------------------------------------------------+-----------------------------------------------------------------------+
  28. | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``1`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) |
  29. +-----------------------------------------------+---------------------------------------------------------+-----------------------------------------------------------------------+
  30. .. rst-class:: classref-reftable-group
  31. Methods
  32. -------
  33. .. table::
  34. :widths: auto
  35. +------+---------------------------------------------------------------------------------------------------+
  36. | void | :ref:`add_spacer<class_BoxContainer_method_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
  37. +------+---------------------------------------------------------------------------------------------------+
  38. .. rst-class:: classref-section-separator
  39. ----
  40. .. rst-class:: classref-descriptions-group
  41. Enumerations
  42. ------------
  43. .. _enum_BoxContainer_AlignMode:
  44. .. rst-class:: classref-enumeration
  45. enum **AlignMode**:
  46. .. _class_BoxContainer_constant_ALIGN_BEGIN:
  47. .. rst-class:: classref-enumeration-constant
  48. :ref:`AlignMode<enum_BoxContainer_AlignMode>` **ALIGN_BEGIN** = ``0``
  49. Aligns children with the beginning of the container.
  50. .. _class_BoxContainer_constant_ALIGN_CENTER:
  51. .. rst-class:: classref-enumeration-constant
  52. :ref:`AlignMode<enum_BoxContainer_AlignMode>` **ALIGN_CENTER** = ``1``
  53. Aligns children with the center of the container.
  54. .. _class_BoxContainer_constant_ALIGN_END:
  55. .. rst-class:: classref-enumeration-constant
  56. :ref:`AlignMode<enum_BoxContainer_AlignMode>` **ALIGN_END** = ``2``
  57. Aligns children with the end of the container.
  58. .. rst-class:: classref-section-separator
  59. ----
  60. .. rst-class:: classref-descriptions-group
  61. Property Descriptions
  62. ---------------------
  63. .. _class_BoxContainer_property_alignment:
  64. .. rst-class:: classref-property
  65. :ref:`AlignMode<enum_BoxContainer_AlignMode>` **alignment** = ``0``
  66. .. rst-class:: classref-property-setget
  67. - void **set_alignment** **(** :ref:`AlignMode<enum_BoxContainer_AlignMode>` value **)**
  68. - :ref:`AlignMode<enum_BoxContainer_AlignMode>` **get_alignment** **(** **)**
  69. 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>`).
  70. .. rst-class:: classref-section-separator
  71. ----
  72. .. rst-class:: classref-descriptions-group
  73. Method Descriptions
  74. -------------------
  75. .. _class_BoxContainer_method_add_spacer:
  76. .. rst-class:: classref-method
  77. void **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
  78. Adds a control to the box as a spacer. If ``true``, ``begin`` will insert the spacer control in front of other children.
  79. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  80. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  81. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  82. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`