class_container.rst 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.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:`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. **Category:** Core
  11. Brief Description
  12. -----------------
  13. Base node for containers.
  14. Methods
  15. -------
  16. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`fit_child_in_rect<class_Container_method_fit_child_in_rect>` **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)** |
  18. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`queue_sort<class_Container_method_queue_sort>` **(** **)** |
  20. +------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  21. Signals
  22. -------
  23. .. _class_Container_signal_sort_children:
  24. - **sort_children** **(** **)**
  25. Emitted when sorting the children is needed.
  26. Constants
  27. ---------
  28. .. _class_Container_constant_NOTIFICATION_SORT_CHILDREN:
  29. - **NOTIFICATION_SORT_CHILDREN** = **50** --- Notification for when sorting the children, it must be obeyed immediately.
  30. Description
  31. -----------
  32. Base node for containers. A ``Container`` contains other controls and automatically arranges them in a certain way.
  33. A Control can inherit this to create custom container classes.
  34. Method Descriptions
  35. -------------------
  36. .. _class_Container_method_fit_child_in_rect:
  37. - void **fit_child_in_rect** **(** :ref:`Control<class_Control>` child, :ref:`Rect2<class_Rect2>` rect **)**
  38. Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
  39. ----
  40. .. _class_Container_method_queue_sort:
  41. - void **queue_sort** **(** **)**
  42. Queue resort of the contained children. This is called automatically anyway, but can be called upon request.