class_flowcontainer.rst 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/FlowContainer.xml.
  6. .. _class_FlowContainer:
  7. FlowContainer
  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:`HFlowContainer<class_HFlowContainer>`, :ref:`VFlowContainer<class_VFlowContainer>`
  11. A container that arranges its child controls horizontally or vertically and wraps them around at the borders.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. A container that arranges its child controls horizontally or vertically and wraps them around at the borders. This is similar to how text in a book wraps around when no more words can fit on a line.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Using Containers <../tutorials/ui/gui_containers>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +--------------------------------------------------------+----------------------------------------------------------------+-----------+
  26. | :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` | :ref:`alignment<class_FlowContainer_property_alignment>` | ``0`` |
  27. +--------------------------------------------------------+----------------------------------------------------------------+-----------+
  28. | :ref:`bool<class_bool>` | :ref:`reverse_fill<class_FlowContainer_property_reverse_fill>` | ``false`` |
  29. +--------------------------------------------------------+----------------------------------------------------------------+-----------+
  30. | :ref:`bool<class_bool>` | :ref:`vertical<class_FlowContainer_property_vertical>` | ``false`` |
  31. +--------------------------------------------------------+----------------------------------------------------------------+-----------+
  32. .. rst-class:: classref-reftable-group
  33. Methods
  34. -------
  35. .. table::
  36. :widths: auto
  37. +-----------------------+--------------------------------------------------------------------------------------+
  38. | :ref:`int<class_int>` | :ref:`get_line_count<class_FlowContainer_method_get_line_count>` **(** **)** |const| |
  39. +-----------------------+--------------------------------------------------------------------------------------+
  40. .. rst-class:: classref-reftable-group
  41. Theme Properties
  42. ----------------
  43. .. table::
  44. :widths: auto
  45. +-----------------------+----------------------------------------------------------------------+-------+
  46. | :ref:`int<class_int>` | :ref:`h_separation<class_FlowContainer_theme_constant_h_separation>` | ``4`` |
  47. +-----------------------+----------------------------------------------------------------------+-------+
  48. | :ref:`int<class_int>` | :ref:`v_separation<class_FlowContainer_theme_constant_v_separation>` | ``4`` |
  49. +-----------------------+----------------------------------------------------------------------+-------+
  50. .. rst-class:: classref-section-separator
  51. ----
  52. .. rst-class:: classref-descriptions-group
  53. Enumerations
  54. ------------
  55. .. _enum_FlowContainer_AlignmentMode:
  56. .. rst-class:: classref-enumeration
  57. enum **AlignmentMode**:
  58. .. _class_FlowContainer_constant_ALIGNMENT_BEGIN:
  59. .. rst-class:: classref-enumeration-constant
  60. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_BEGIN** = ``0``
  61. The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).
  62. .. _class_FlowContainer_constant_ALIGNMENT_CENTER:
  63. .. rst-class:: classref-enumeration-constant
  64. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_CENTER** = ``1``
  65. The child controls will be centered in the container.
  66. .. _class_FlowContainer_constant_ALIGNMENT_END:
  67. .. rst-class:: classref-enumeration-constant
  68. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_END** = ``2``
  69. The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).
  70. .. rst-class:: classref-section-separator
  71. ----
  72. .. rst-class:: classref-descriptions-group
  73. Property Descriptions
  74. ---------------------
  75. .. _class_FlowContainer_property_alignment:
  76. .. rst-class:: classref-property
  77. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **alignment** = ``0``
  78. .. rst-class:: classref-property-setget
  79. - void **set_alignment** **(** :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` value **)**
  80. - :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **get_alignment** **(** **)**
  81. The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN<class_FlowContainer_constant_ALIGNMENT_BEGIN>`, :ref:`ALIGNMENT_CENTER<class_FlowContainer_constant_ALIGNMENT_CENTER>`, or :ref:`ALIGNMENT_END<class_FlowContainer_constant_ALIGNMENT_END>`).
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_FlowContainer_property_reverse_fill:
  85. .. rst-class:: classref-property
  86. :ref:`bool<class_bool>` **reverse_fill** = ``false``
  87. .. rst-class:: classref-property-setget
  88. - void **set_reverse_fill** **(** :ref:`bool<class_bool>` value **)**
  89. - :ref:`bool<class_bool>` **is_reverse_fill** **(** **)**
  90. If ``true``, reverses fill direction. Horizontal **FlowContainer**\ s will fill rows bottom to top, vertical **FlowContainer**\ s will fill columns right to left.
  91. When using a vertical **FlowContainer** with a right to left :ref:`Control.layout_direction<class_Control_property_layout_direction>`, columns will fill left to right instead.
  92. .. rst-class:: classref-item-separator
  93. ----
  94. .. _class_FlowContainer_property_vertical:
  95. .. rst-class:: classref-property
  96. :ref:`bool<class_bool>` **vertical** = ``false``
  97. .. rst-class:: classref-property-setget
  98. - void **set_vertical** **(** :ref:`bool<class_bool>` value **)**
  99. - :ref:`bool<class_bool>` **is_vertical** **(** **)**
  100. If ``true``, the **FlowContainer** will arrange its children vertically, rather than horizontally.
  101. Can't be changed when using :ref:`HFlowContainer<class_HFlowContainer>` and :ref:`VFlowContainer<class_VFlowContainer>`.
  102. .. rst-class:: classref-section-separator
  103. ----
  104. .. rst-class:: classref-descriptions-group
  105. Method Descriptions
  106. -------------------
  107. .. _class_FlowContainer_method_get_line_count:
  108. .. rst-class:: classref-method
  109. :ref:`int<class_int>` **get_line_count** **(** **)** |const|
  110. Returns the current line count.
  111. .. rst-class:: classref-section-separator
  112. ----
  113. .. rst-class:: classref-descriptions-group
  114. Theme Property Descriptions
  115. ---------------------------
  116. .. _class_FlowContainer_theme_constant_h_separation:
  117. .. rst-class:: classref-themeproperty
  118. :ref:`int<class_int>` **h_separation** = ``4``
  119. The horizontal separation of children nodes.
  120. .. rst-class:: classref-item-separator
  121. ----
  122. .. _class_FlowContainer_theme_constant_v_separation:
  123. .. rst-class:: classref-themeproperty
  124. :ref:`int<class_int>` **v_separation** = ``4``
  125. The vertical separation of children nodes.
  126. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  127. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  128. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  129. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  130. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  131. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  132. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`