class_boxcontainer.rst 3.6 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 :ref:`Control<class_Control>` nodes vertically or horizontally, and rearranges them automatically when their minimum size changes.
  14. Properties
  15. ----------
  16. +-------------------------------------------------------+---------------------------------------------------------+-------+
  17. | :ref:`AlignmentMode<enum_BoxContainer_AlignmentMode>` | :ref:`alignment<class_BoxContainer_property_alignment>` | ``0`` |
  18. +-------------------------------------------------------+---------------------------------------------------------+-------+
  19. Methods
  20. -------
  21. +-------------------------------+---------------------------------------------------------------------------------------------------+
  22. | :ref:`Control<class_Control>` | :ref:`add_spacer<class_BoxContainer_method_add_spacer>` **(** :ref:`bool<class_bool>` begin **)** |
  23. +-------------------------------+---------------------------------------------------------------------------------------------------+
  24. Enumerations
  25. ------------
  26. .. _enum_BoxContainer_AlignmentMode:
  27. .. _class_BoxContainer_constant_ALIGNMENT_BEGIN:
  28. .. _class_BoxContainer_constant_ALIGNMENT_CENTER:
  29. .. _class_BoxContainer_constant_ALIGNMENT_END:
  30. enum **AlignmentMode**:
  31. - **ALIGNMENT_BEGIN** = **0**
  32. - **ALIGNMENT_CENTER** = **1**
  33. - **ALIGNMENT_END** = **2**
  34. Property Descriptions
  35. ---------------------
  36. .. _class_BoxContainer_property_alignment:
  37. - :ref:`AlignmentMode<enum_BoxContainer_AlignmentMode>` **alignment**
  38. +-----------+----------------------+
  39. | *Default* | ``0`` |
  40. +-----------+----------------------+
  41. | *Setter* | set_alignment(value) |
  42. +-----------+----------------------+
  43. | *Getter* | get_alignment() |
  44. +-----------+----------------------+
  45. The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN<class_BoxContainer_constant_ALIGNMENT_BEGIN>`, :ref:`ALIGNMENT_CENTER<class_BoxContainer_constant_ALIGNMENT_CENTER>`, or :ref:`ALIGNMENT_END<class_BoxContainer_constant_ALIGNMENT_END>`).
  46. Method Descriptions
  47. -------------------
  48. .. _class_BoxContainer_method_add_spacer:
  49. - :ref:`Control<class_Control>` **add_spacer** **(** :ref:`bool<class_bool>` begin **)**
  50. Adds a :ref:`Control<class_Control>` node to the box as a spacer. If ``begin`` is ``true``, it will insert the :ref:`Control<class_Control>` node in front of all other children.
  51. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  52. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  53. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  54. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  55. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  56. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`