class_container.rst 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 Container.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Container:
  6. Container
  7. =========
  8. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`AspectRatioContainer<class_AspectRatioContainer>`, :ref:`BoxContainer<class_BoxContainer>`, :ref:`CenterContainer<class_CenterContainer>`, :ref:`EditorProperty<class_EditorProperty>`, :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>`
  10. Base node for containers.
  11. Description
  12. -----------
  13. Base node for containers. A ``Container`` contains other controls and automatically arranges them in a certain way.
  14. A Control can inherit this to create custom container classes.
  15. Methods
  16. -------
  17. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`fit_child_in_rect<class_Container_method_fit_child_in_rect>` **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)** |
  19. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`queue_sort<class_Container_method_queue_sort>` **(** **)** |
  21. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  22. Signals
  23. -------
  24. .. _class_Container_signal_sort_children:
  25. - **sort_children** **(** **)**
  26. Emitted when sorting the children is needed.
  27. Constants
  28. ---------
  29. .. _class_Container_constant_NOTIFICATION_SORT_CHILDREN:
  30. - **NOTIFICATION_SORT_CHILDREN** = **50** --- Notification for when sorting the children, it must be obeyed immediately.
  31. Method Descriptions
  32. -------------------
  33. .. _class_Container_method_fit_child_in_rect:
  34. - void **fit_child_in_rect** **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)**
  35. Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
  36. ----
  37. .. _class_Container_method_queue_sort:
  38. - void **queue_sort** **(** **)**
  39. Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
  40. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  41. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  42. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`