class_container.rst 2.6 KB

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