class_splitcontainer.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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/SplitContainer.xml.
  6. .. _class_SplitContainer:
  7. SplitContainer
  8. ==============
  9. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`HSplitContainer<class_HSplitContainer>`, :ref:`VSplitContainer<class_VSplitContainer>`
  11. Container for splitting and adjusting.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Container for splitting two :ref:`Control<class_Control>`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`GUI containers <../tutorials/ui/gui_containers>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  26. | :ref:`bool<class_bool>` | :ref:`collapsed<class_SplitContainer_property_collapsed>` | ``false`` |
  27. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  28. | :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` | :ref:`dragger_visibility<class_SplitContainer_property_dragger_visibility>` | ``0`` |
  29. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  30. | :ref:`int<class_int>` | :ref:`split_offset<class_SplitContainer_property_split_offset>` | ``0`` |
  31. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  32. .. rst-class:: classref-reftable-group
  33. Methods
  34. -------
  35. .. table::
  36. :widths: auto
  37. +------+---------------------------------------------------------------------------------------+
  38. | void | :ref:`clamp_split_offset<class_SplitContainer_method_clamp_split_offset>` **(** **)** |
  39. +------+---------------------------------------------------------------------------------------+
  40. .. rst-class:: classref-section-separator
  41. ----
  42. .. rst-class:: classref-descriptions-group
  43. Signals
  44. -------
  45. .. _class_SplitContainer_signal_dragged:
  46. .. rst-class:: classref-signal
  47. **dragged** **(** :ref:`int<class_int>` offset **)**
  48. Emitted when the dragger is dragged by user.
  49. .. rst-class:: classref-section-separator
  50. ----
  51. .. rst-class:: classref-descriptions-group
  52. Enumerations
  53. ------------
  54. .. _enum_SplitContainer_DraggerVisibility:
  55. .. rst-class:: classref-enumeration
  56. enum **DraggerVisibility**:
  57. .. _class_SplitContainer_constant_DRAGGER_VISIBLE:
  58. .. rst-class:: classref-enumeration-constant
  59. :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **DRAGGER_VISIBLE** = ``0``
  60. The split dragger is visible when the cursor hovers it.
  61. .. _class_SplitContainer_constant_DRAGGER_HIDDEN:
  62. .. rst-class:: classref-enumeration-constant
  63. :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **DRAGGER_HIDDEN** = ``1``
  64. The split dragger is never visible.
  65. .. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED:
  66. .. rst-class:: classref-enumeration-constant
  67. :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **DRAGGER_HIDDEN_COLLAPSED** = ``2``
  68. The split dragger is never visible and its space collapsed.
  69. .. rst-class:: classref-section-separator
  70. ----
  71. .. rst-class:: classref-descriptions-group
  72. Property Descriptions
  73. ---------------------
  74. .. _class_SplitContainer_property_collapsed:
  75. .. rst-class:: classref-property
  76. :ref:`bool<class_bool>` **collapsed** = ``false``
  77. .. rst-class:: classref-property-setget
  78. - void **set_collapsed** **(** :ref:`bool<class_bool>` value **)**
  79. - :ref:`bool<class_bool>` **is_collapsed** **(** **)**
  80. If ``true``, the area of the first :ref:`Control<class_Control>` will be collapsed and the dragger will be disabled.
  81. .. rst-class:: classref-item-separator
  82. ----
  83. .. _class_SplitContainer_property_dragger_visibility:
  84. .. rst-class:: classref-property
  85. :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **dragger_visibility** = ``0``
  86. .. rst-class:: classref-property-setget
  87. - void **set_dragger_visibility** **(** :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` value **)**
  88. - :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **get_dragger_visibility** **(** **)**
  89. Determines the dragger's visibility. See :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` for details.
  90. .. rst-class:: classref-item-separator
  91. ----
  92. .. _class_SplitContainer_property_split_offset:
  93. .. rst-class:: classref-property
  94. :ref:`int<class_int>` **split_offset** = ``0``
  95. .. rst-class:: classref-property-setget
  96. - void **set_split_offset** **(** :ref:`int<class_int>` value **)**
  97. - :ref:`int<class_int>` **get_split_offset** **(** **)**
  98. The initial offset of the splitting between the two :ref:`Control<class_Control>`\ s, with ``0`` being at the end of the first :ref:`Control<class_Control>`.
  99. .. rst-class:: classref-section-separator
  100. ----
  101. .. rst-class:: classref-descriptions-group
  102. Method Descriptions
  103. -------------------
  104. .. _class_SplitContainer_method_clamp_split_offset:
  105. .. rst-class:: classref-method
  106. void **clamp_split_offset** **(** **)**
  107. Clamps the :ref:`split_offset<class_SplitContainer_property_split_offset>` value to not go outside the currently possible minimal and maximum values.
  108. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  109. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  110. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  111. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`