class_splitcontainer.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the SplitContainer.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_SplitContainer:
  6. SplitContainer
  7. ==============
  8. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`HSplitContainer<class_HSplitContainer>`, :ref:`VSplitContainer<class_VSplitContainer>`
  10. Container for splitting and adjusting.
  11. Description
  12. -----------
  13. Container for splitting two :ref:`Control<class_Control>`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
  14. Properties
  15. ----------
  16. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  17. | :ref:`bool<class_bool>` | :ref:`collapsed<class_SplitContainer_property_collapsed>` | ``false`` |
  18. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  19. | :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` | :ref:`dragger_visibility<class_SplitContainer_property_dragger_visibility>` | ``0`` |
  20. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  21. | :ref:`int<class_int>` | :ref:`split_offset<class_SplitContainer_property_split_offset>` | ``0`` |
  22. +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+
  23. Methods
  24. -------
  25. +------+---------------------------------------------------------------------------------------+
  26. | void | :ref:`clamp_split_offset<class_SplitContainer_method_clamp_split_offset>` **(** **)** |
  27. +------+---------------------------------------------------------------------------------------+
  28. Signals
  29. -------
  30. .. _class_SplitContainer_signal_dragged:
  31. - **dragged** **(** :ref:`int<class_int>` offset **)**
  32. Emitted when the dragger is dragged by user.
  33. Enumerations
  34. ------------
  35. .. _enum_SplitContainer_DraggerVisibility:
  36. .. _class_SplitContainer_constant_DRAGGER_VISIBLE:
  37. .. _class_SplitContainer_constant_DRAGGER_HIDDEN:
  38. .. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED:
  39. enum **DraggerVisibility**:
  40. - **DRAGGER_VISIBLE** = **0** --- The split dragger is visible when the cursor hovers it.
  41. - **DRAGGER_HIDDEN** = **1** --- The split dragger is never visible.
  42. - **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is never visible and its space collapsed.
  43. Property Descriptions
  44. ---------------------
  45. .. _class_SplitContainer_property_collapsed:
  46. - :ref:`bool<class_bool>` **collapsed**
  47. +-----------+----------------------+
  48. | *Default* | ``false`` |
  49. +-----------+----------------------+
  50. | *Setter* | set_collapsed(value) |
  51. +-----------+----------------------+
  52. | *Getter* | is_collapsed() |
  53. +-----------+----------------------+
  54. If ``true``, the area of the first :ref:`Control<class_Control>` will be collapsed and the dragger will be disabled.
  55. ----
  56. .. _class_SplitContainer_property_dragger_visibility:
  57. - :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **dragger_visibility**
  58. +-----------+-------------------------------+
  59. | *Default* | ``0`` |
  60. +-----------+-------------------------------+
  61. | *Setter* | set_dragger_visibility(value) |
  62. +-----------+-------------------------------+
  63. | *Getter* | get_dragger_visibility() |
  64. +-----------+-------------------------------+
  65. Determines the dragger's visibility. See :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` for details.
  66. ----
  67. .. _class_SplitContainer_property_split_offset:
  68. - :ref:`int<class_int>` **split_offset**
  69. +-----------+-------------------------+
  70. | *Default* | ``0`` |
  71. +-----------+-------------------------+
  72. | *Setter* | set_split_offset(value) |
  73. +-----------+-------------------------+
  74. | *Getter* | get_split_offset() |
  75. +-----------+-------------------------+
  76. 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>`.
  77. Method Descriptions
  78. -------------------
  79. .. _class_SplitContainer_method_clamp_split_offset:
  80. - void **clamp_split_offset** **(** **)**
  81. Clamps the :ref:`split_offset<class_SplitContainer_property_split_offset>` value to not go outside the currently possible minimal and maximum values.
  82. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  83. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  84. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`