123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/FlowContainer.xml.
- .. _class_FlowContainer:
- FlowContainer
- =============
- **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`HFlowContainer<class_HFlowContainer>`, :ref:`VFlowContainer<class_VFlowContainer>`
- A container that arranges its child controls horizontally or vertically and wraps them around at the borders.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- 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.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`Using Containers <../tutorials/ui/gui_containers>`
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+
- | :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` | :ref:`alignment<class_FlowContainer_property_alignment>` | ``0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+
- | :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` | :ref:`last_wrap_alignment<class_FlowContainer_property_last_wrap_alignment>` | ``0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`reverse_fill<class_FlowContainer_property_reverse_fill>` | ``false`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`vertical<class_FlowContainer_property_vertical>` | ``false`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-----------------------+--------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_line_count<class_FlowContainer_method_get_line_count>`\ (\ ) |const| |
- +-----------------------+--------------------------------------------------------------------------------+
- .. rst-class:: classref-reftable-group
- Theme Properties
- ----------------
- .. table::
- :widths: auto
- +-----------------------+----------------------------------------------------------------------+-------+
- | :ref:`int<class_int>` | :ref:`h_separation<class_FlowContainer_theme_constant_h_separation>` | ``4`` |
- +-----------------------+----------------------------------------------------------------------+-------+
- | :ref:`int<class_int>` | :ref:`v_separation<class_FlowContainer_theme_constant_v_separation>` | ``4`` |
- +-----------------------+----------------------------------------------------------------------+-------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_FlowContainer_AlignmentMode:
- .. rst-class:: classref-enumeration
- enum **AlignmentMode**: :ref:`🔗<enum_FlowContainer_AlignmentMode>`
- .. _class_FlowContainer_constant_ALIGNMENT_BEGIN:
- .. rst-class:: classref-enumeration-constant
- :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_BEGIN** = ``0``
- 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).
- .. _class_FlowContainer_constant_ALIGNMENT_CENTER:
- .. rst-class:: classref-enumeration-constant
- :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_CENTER** = ``1``
- The child controls will be centered in the container.
- .. _class_FlowContainer_constant_ALIGNMENT_END:
- .. rst-class:: classref-enumeration-constant
- :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **ALIGNMENT_END** = ``2``
- 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).
- .. rst-class:: classref-item-separator
- ----
- .. _enum_FlowContainer_LastWrapAlignmentMode:
- .. rst-class:: classref-enumeration
- enum **LastWrapAlignmentMode**: :ref:`🔗<enum_FlowContainer_LastWrapAlignmentMode>`
- .. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_INHERIT:
- .. rst-class:: classref-enumeration-constant
- :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_INHERIT** = ``0``
- The last partially filled row or column will wrap aligned to the previous row or column in accordance with :ref:`alignment<class_FlowContainer_property_alignment>`.
- .. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_BEGIN:
- .. rst-class:: classref-enumeration-constant
- :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_BEGIN** = ``1``
- The last partially filled row or column will wrap aligned to the beginning of the previous row or column.
- .. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_CENTER:
- .. rst-class:: classref-enumeration-constant
- :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_CENTER** = ``2``
- The last partially filled row or column will wrap aligned to the center of the previous row or column.
- .. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_END:
- .. rst-class:: classref-enumeration-constant
- :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_END** = ``3``
- The last partially filled row or column will wrap aligned to the end of the previous row or column.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_FlowContainer_property_alignment:
- .. rst-class:: classref-property
- :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **alignment** = ``0`` :ref:`🔗<class_FlowContainer_property_alignment>`
- .. rst-class:: classref-property-setget
- - |void| **set_alignment**\ (\ value\: :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>`\ )
- - :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **get_alignment**\ (\ )
- 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>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_FlowContainer_property_last_wrap_alignment:
- .. rst-class:: classref-property
- :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **last_wrap_alignment** = ``0`` :ref:`🔗<class_FlowContainer_property_last_wrap_alignment>`
- .. rst-class:: classref-property-setget
- - |void| **set_last_wrap_alignment**\ (\ value\: :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>`\ )
- - :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **get_last_wrap_alignment**\ (\ )
- The wrap behavior of the last, partially filled row or column (must be one of :ref:`LAST_WRAP_ALIGNMENT_INHERIT<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_INHERIT>`, :ref:`LAST_WRAP_ALIGNMENT_BEGIN<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_BEGIN>`, :ref:`LAST_WRAP_ALIGNMENT_CENTER<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_CENTER>`, or :ref:`LAST_WRAP_ALIGNMENT_END<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_END>`).
- .. rst-class:: classref-item-separator
- ----
- .. _class_FlowContainer_property_reverse_fill:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **reverse_fill** = ``false`` :ref:`🔗<class_FlowContainer_property_reverse_fill>`
- .. rst-class:: classref-property-setget
- - |void| **set_reverse_fill**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_reverse_fill**\ (\ )
- If ``true``, reverses fill direction. Horizontal **FlowContainer**\ s will fill rows bottom to top, vertical **FlowContainer**\ s will fill columns right to left.
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_FlowContainer_property_vertical:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **vertical** = ``false`` :ref:`🔗<class_FlowContainer_property_vertical>`
- .. rst-class:: classref-property-setget
- - |void| **set_vertical**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_vertical**\ (\ )
- If ``true``, the **FlowContainer** will arrange its children vertically, rather than horizontally.
- Can't be changed when using :ref:`HFlowContainer<class_HFlowContainer>` and :ref:`VFlowContainer<class_VFlowContainer>`.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_FlowContainer_method_get_line_count:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_line_count**\ (\ ) |const| :ref:`🔗<class_FlowContainer_method_get_line_count>`
- Returns the current line count.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Theme Property Descriptions
- ---------------------------
- .. _class_FlowContainer_theme_constant_h_separation:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_FlowContainer_theme_constant_h_separation>`
- The horizontal separation of child nodes.
- .. rst-class:: classref-item-separator
- ----
- .. _class_FlowContainer_theme_constant_v_separation:
- .. rst-class:: classref-themeproperty
- :ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_FlowContainer_theme_constant_v_separation>`
- The vertical separation of child nodes.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|