class_container.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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/Container.xml.
  6. .. _class_Container:
  7. Container
  8. =========
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`AspectRatioContainer<class_AspectRatioContainer>`, :ref:`BoxContainer<class_BoxContainer>`, :ref:`CenterContainer<class_CenterContainer>`, :ref:`EditorProperty<class_EditorProperty>`, :ref:`FlowContainer<class_FlowContainer>`, :ref:`GraphNode<class_GraphNode>`, :ref:`GridContainer<class_GridContainer>`, :ref:`MarginContainer<class_MarginContainer>`, :ref:`PanelContainer<class_PanelContainer>`, :ref:`ScrollContainer<class_ScrollContainer>`, :ref:`SplitContainer<class_SplitContainer>`, :ref:`TabContainer<class_TabContainer>`, :ref:`ViewportContainer<class_ViewportContainer>`
  11. Base node for containers.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Base node for containers. A **Container** contains other controls and automatically arranges them in a certain way.
  16. A Control can inherit this to create custom container classes.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`GUI containers <../tutorials/ui/gui_containers>`
  21. .. rst-class:: classref-reftable-group
  22. Methods
  23. -------
  24. .. table::
  25. :widths: auto
  26. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`fit_child_in_rect<class_Container_method_fit_child_in_rect>` **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)** |
  28. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`queue_sort<class_Container_method_queue_sort>` **(** **)** |
  30. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Signals
  35. -------
  36. .. _class_Container_signal_sort_children:
  37. .. rst-class:: classref-signal
  38. **sort_children** **(** **)**
  39. Emitted when sorting the children is needed.
  40. .. rst-class:: classref-section-separator
  41. ----
  42. .. rst-class:: classref-descriptions-group
  43. Constants
  44. ---------
  45. .. _class_Container_constant_NOTIFICATION_SORT_CHILDREN:
  46. .. rst-class:: classref-constant
  47. **NOTIFICATION_SORT_CHILDREN** = ``50``
  48. Notification for when sorting the children, it must be obeyed immediately.
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Method Descriptions
  53. -------------------
  54. .. _class_Container_method_fit_child_in_rect:
  55. .. rst-class:: classref-method
  56. void **fit_child_in_rect** **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)**
  57. Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
  58. .. rst-class:: classref-item-separator
  59. ----
  60. .. _class_Container_method_queue_sort:
  61. .. rst-class:: classref-method
  62. void **queue_sort** **(** **)**
  63. Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
  64. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  65. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  66. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  67. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`