class_container.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Container:
  4. Container
  5. =========
  6. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Inherited By:** :ref:`PanelContainer<class_panelcontainer>`, :ref:`GridContainer<class_gridcontainer>`, :ref:`ScrollContainer<class_scrollcontainer>`, :ref:`MarginContainer<class_margincontainer>`, :ref:`CenterContainer<class_centercontainer>`, :ref:`GraphNode<class_graphnode>`, :ref:`SplitContainer<class_splitcontainer>`, :ref:`BoxContainer<class_boxcontainer>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Base node for containers.
  12. Member Functions
  13. ----------------
  14. +-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`fit_child_in_rect<class_Container_fit_child_in_rect>` **(** :ref:`Control<class_control>` child, :ref:`Rect2<class_rect2>` rect **)** |
  16. +-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`queue_sort<class_Container_queue_sort>` **(** **)** |
  18. +-------+-----------------------------------------------------------------------------------------------------------------------------------------------+
  19. Signals
  20. -------
  21. - **sort_children** **(** **)**
  22. Emitted when sorting the children is needed.
  23. Numeric Constants
  24. -----------------
  25. - **NOTIFICATION_SORT_CHILDREN** = **50** --- Notification for when sorting the children, it must be obeyed immediately.
  26. Description
  27. -----------
  28. Base node for containers. A :ref:`Container<class_container>` contains other controls and automatically arranges them in a certain way.
  29. A Control can inherit this to create custom container classes.
  30. Member Function Description
  31. ---------------------------
  32. .. _class_Container_fit_child_in_rect:
  33. - void **fit_child_in_rect** **(** :ref:`Control<class_control>` child, :ref:`Rect2<class_rect2>` rect **)**
  34. Fit a child control in a given rect. This is mainly a helper for creating custom container classes.
  35. .. _class_Container_queue_sort:
  36. - void **queue_sort** **(** **)**
  37. Queue resort of the contained children. This is called automatically anyway, but can be called upon request.