class_flowcontainer.rst 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. Base class for flow containers.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Arranges child :ref:`Control<class_Control>` nodes vertically or horizontally in a left-to-right or top-to-bottom flow.
  16. A line is filled with :ref:`Control<class_Control>` nodes until no more fit on the same line, similar to text in an autowrapped label.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +--------------------------------------------------------+----------------------------------------------------------+-----------+
  23. | :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` | :ref:`alignment<class_FlowContainer_property_alignment>` | ``0`` |
  24. +--------------------------------------------------------+----------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`vertical<class_FlowContainer_property_vertical>` | ``false`` |
  26. +--------------------------------------------------------+----------------------------------------------------------+-----------+
  27. .. rst-class:: classref-reftable-group
  28. Methods
  29. -------
  30. .. table::
  31. :widths: auto
  32. +-----------------------+--------------------------------------------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`get_line_count<class_FlowContainer_method_get_line_count>` **(** **)** |const| |
  34. +-----------------------+--------------------------------------------------------------------------------------+
  35. .. rst-class:: classref-reftable-group
  36. Theme Properties
  37. ----------------
  38. .. table::
  39. :widths: auto
  40. +-----------------------+----------------------------------------------------------------------+-------+
  41. | :ref:`int<class_int>` | :ref:`h_separation<class_FlowContainer_theme_constant_h_separation>` | ``4`` |
  42. +-----------------------+----------------------------------------------------------------------+-------+
  43. | :ref:`int<class_int>` | :ref:`v_separation<class_FlowContainer_theme_constant_v_separation>` | ``4`` |
  44. +-----------------------+----------------------------------------------------------------------+-------+
  45. .. rst-class:: classref-section-separator
  46. ----
  47. .. rst-class:: classref-descriptions-group
  48. Enumerations
  49. ------------
  50. .. _enum_FlowContainer_AlignmentMode:
  51. .. rst-class:: classref-enumeration
  52. enum **AlignmentMode**:
  53. .. _class_FlowContainer_constant_ALIGNMENT_BEGIN:
  54. .. rst-class:: classref-enumeration-constant
  55. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_BEGIN** = ``0``
  56. 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).
  57. .. _class_FlowContainer_constant_ALIGNMENT_CENTER:
  58. .. rst-class:: classref-enumeration-constant
  59. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_CENTER** = ``1``
  60. The child controls will be centered in the container.
  61. .. _class_FlowContainer_constant_ALIGNMENT_END:
  62. .. rst-class:: classref-enumeration-constant
  63. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_END** = ``2``
  64. 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).
  65. .. rst-class:: classref-section-separator
  66. ----
  67. .. rst-class:: classref-descriptions-group
  68. Property Descriptions
  69. ---------------------
  70. .. _class_FlowContainer_property_alignment:
  71. .. rst-class:: classref-property
  72. :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **alignment** = ``0``
  73. .. rst-class:: classref-property-setget
  74. - void **set_alignment** **(** :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` value **)**
  75. - :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **get_alignment** **(** **)**
  76. 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>`).
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_FlowContainer_property_vertical:
  80. .. rst-class:: classref-property
  81. :ref:`bool<class_bool>` **vertical** = ``false``
  82. .. rst-class:: classref-property-setget
  83. - void **set_vertical** **(** :ref:`bool<class_bool>` value **)**
  84. - :ref:`bool<class_bool>` **is_vertical** **(** **)**
  85. If ``true``, the **FlowContainer** will arrange its children vertically, rather than horizontally.
  86. Can't be changed when using :ref:`HFlowContainer<class_HFlowContainer>` and :ref:`VFlowContainer<class_VFlowContainer>`.
  87. .. rst-class:: classref-section-separator
  88. ----
  89. .. rst-class:: classref-descriptions-group
  90. Method Descriptions
  91. -------------------
  92. .. _class_FlowContainer_method_get_line_count:
  93. .. rst-class:: classref-method
  94. :ref:`int<class_int>` **get_line_count** **(** **)** |const|
  95. Returns the current line count.
  96. .. rst-class:: classref-section-separator
  97. ----
  98. .. rst-class:: classref-descriptions-group
  99. Theme Property Descriptions
  100. ---------------------------
  101. .. _class_FlowContainer_theme_constant_h_separation:
  102. .. rst-class:: classref-themeproperty
  103. :ref:`int<class_int>` **h_separation** = ``4``
  104. The horizontal separation of children nodes.
  105. .. rst-class:: classref-item-separator
  106. ----
  107. .. _class_FlowContainer_theme_constant_v_separation:
  108. .. rst-class:: classref-themeproperty
  109. :ref:`int<class_int>` **v_separation** = ``4``
  110. The vertical separation of children nodes.
  111. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  112. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  113. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  114. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  115. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  116. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`