class_splitcontainer.rst 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/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. Description
  13. -----------
  14. Container for splitting two :ref:`Control<class_Control>`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
  15. Tutorials
  16. ---------
  17. - :doc:`GUI containers <../tutorials/ui/gui_containers>`
  18. Properties
  19. ----------
  20. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`collapsed<class_SplitContainer_property_collapsed>` | ``false`` |
  22. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  23. | :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` | :ref:`dragger_visibility<class_SplitContainer_property_dragger_visibility>` | ``0`` |
  24. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  25. | :ref:`int<class_int>` | :ref:`split_offset<class_SplitContainer_property_split_offset>` | ``0`` |
  26. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  27. Methods
  28. -------
  29. +------+---------------------------------------------------------------------------------------+
  30. | void | :ref:`clamp_split_offset<class_SplitContainer_method_clamp_split_offset>` **(** **)** |
  31. +------+---------------------------------------------------------------------------------------+
  32. Signals
  33. -------
  34. .. _class_SplitContainer_signal_dragged:
  35. - **dragged** **(** :ref:`int<class_int>` offset **)**
  36. Emitted when the dragger is dragged by user.
  37. Enumerations
  38. ------------
  39. .. _enum_SplitContainer_DraggerVisibility:
  40. .. _class_SplitContainer_constant_DRAGGER_VISIBLE:
  41. .. _class_SplitContainer_constant_DRAGGER_HIDDEN:
  42. .. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED:
  43. enum **DraggerVisibility**:
  44. - **DRAGGER_VISIBLE** = **0** --- The split dragger is visible when the cursor hovers it.
  45. - **DRAGGER_HIDDEN** = **1** --- The split dragger is never visible.
  46. - **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is never visible and its space collapsed.
  47. Property Descriptions
  48. ---------------------
  49. .. _class_SplitContainer_property_collapsed:
  50. - :ref:`bool<class_bool>` **collapsed**
  51. +-----------+----------------------+
  52. | *Default* | ``false`` |
  53. +-----------+----------------------+
  54. | *Setter* | set_collapsed(value) |
  55. +-----------+----------------------+
  56. | *Getter* | is_collapsed() |
  57. +-----------+----------------------+
  58. If ``true``, the area of the first :ref:`Control<class_Control>` will be collapsed and the dragger will be disabled.
  59. ----
  60. .. _class_SplitContainer_property_dragger_visibility:
  61. - :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **dragger_visibility**
  62. +-----------+-------------------------------+
  63. | *Default* | ``0`` |
  64. +-----------+-------------------------------+
  65. | *Setter* | set_dragger_visibility(value) |
  66. +-----------+-------------------------------+
  67. | *Getter* | get_dragger_visibility() |
  68. +-----------+-------------------------------+
  69. Determines the dragger's visibility. See :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` for details.
  70. ----
  71. .. _class_SplitContainer_property_split_offset:
  72. - :ref:`int<class_int>` **split_offset**
  73. +-----------+-------------------------+
  74. | *Default* | ``0`` |
  75. +-----------+-------------------------+
  76. | *Setter* | set_split_offset(value) |
  77. +-----------+-------------------------+
  78. | *Getter* | get_split_offset() |
  79. +-----------+-------------------------+
  80. 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>`.
  81. Method Descriptions
  82. -------------------
  83. .. _class_SplitContainer_method_clamp_split_offset:
  84. - void **clamp_split_offset** **(** **)**
  85. Clamps the :ref:`split_offset<class_SplitContainer_property_split_offset>` value to not go outside the currently possible minimal and maximum values.
  86. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  87. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  88. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  89. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  90. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  91. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`