Files
godot-docs/classes/class_splitcontainer.rst
Rémi Verschelde 2b4319bc29 Sync classref with current source
Changes order of brief/long descriptions and removes category
as per godotengine/godot#35132.
2020-01-15 00:51:47 +01:00

127 lines
4.7 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the SplitContainer.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_SplitContainer:
SplitContainer
==============
**Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
**Inherited By:** :ref:`HSplitContainer<class_HSplitContainer>`, :ref:`VSplitContainer<class_VSplitContainer>`
Container for splitting and adjusting.
Description
-----------
Container for splitting two :ref:`Control<class_Control>`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
Properties
----------
+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------+
| :ref:`bool<class_bool>` | :ref:`collapsed<class_SplitContainer_property_collapsed>` | false |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------+
| :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` | :ref:`dragger_visibility<class_SplitContainer_property_dragger_visibility>` | 0 |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------+
| :ref:`int<class_int>` | :ref:`split_offset<class_SplitContainer_property_split_offset>` | 0 |
+-----------------------------------------------------------------+-----------------------------------------------------------------------------+-------+
Methods
-------
+------+---------------------------------------------------------------------------------------+
| void | :ref:`clamp_split_offset<class_SplitContainer_method_clamp_split_offset>` **(** **)** |
+------+---------------------------------------------------------------------------------------+
Signals
-------
.. _class_SplitContainer_signal_dragged:
- **dragged** **(** :ref:`int<class_int>` offset **)**
Emitted when the dragger is dragged by user.
Enumerations
------------
.. _enum_SplitContainer_DraggerVisibility:
.. _class_SplitContainer_constant_DRAGGER_VISIBLE:
.. _class_SplitContainer_constant_DRAGGER_HIDDEN:
.. _class_SplitContainer_constant_DRAGGER_HIDDEN_COLLAPSED:
enum **DraggerVisibility**:
- **DRAGGER_VISIBLE** = **0** --- The split dragger is visible when the cursor hovers it.
- **DRAGGER_HIDDEN** = **1** --- The split dragger is never visible.
- **DRAGGER_HIDDEN_COLLAPSED** = **2** --- The split dragger is never visible and its space collapsed.
Property Descriptions
---------------------
.. _class_SplitContainer_property_collapsed:
- :ref:`bool<class_bool>` **collapsed**
+-----------+----------------------+
| *Default* | false |
+-----------+----------------------+
| *Setter* | set_collapsed(value) |
+-----------+----------------------+
| *Getter* | is_collapsed() |
+-----------+----------------------+
If ``true``, the area of the first :ref:`Control<class_Control>` will be collapsed and the dragger will be disabled.
----
.. _class_SplitContainer_property_dragger_visibility:
- :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **dragger_visibility**
+-----------+-------------------------------+
| *Default* | 0 |
+-----------+-------------------------------+
| *Setter* | set_dragger_visibility(value) |
+-----------+-------------------------------+
| *Getter* | get_dragger_visibility() |
+-----------+-------------------------------+
Determines the dragger's visibility. See :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` for details.
----
.. _class_SplitContainer_property_split_offset:
- :ref:`int<class_int>` **split_offset**
+-----------+-------------------------+
| *Default* | 0 |
+-----------+-------------------------+
| *Setter* | set_split_offset(value) |
+-----------+-------------------------+
| *Getter* | get_split_offset() |
+-----------+-------------------------+
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>`.
Method Descriptions
-------------------
.. _class_SplitContainer_method_clamp_split_offset:
- void **clamp_split_offset** **(** **)**
Clamps the :ref:`split_offset<class_SplitContainer_property_split_offset>` value to not go outside the currently possible minimal and maximum values.