:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SplitContainer.xml. .. _class_SplitContainer: SplitContainer ============== **Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`HSplitContainer`, :ref:`VSplitContainer` Container for splitting and adjusting. Description ----------- Container for splitting two :ref:`Control`\ s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. Tutorials --------- - :doc:`GUI containers <../tutorials/ui/gui_containers>` Properties ---------- +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`collapsed` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`DraggerVisibility` | :ref:`dragger_visibility` | ``0`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`split_offset` | ``0`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`vertical` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ Methods ------- +------+---------------------------------------------------------------------------------------+ | void | :ref:`clamp_split_offset` **(** **)** | +------+---------------------------------------------------------------------------------------+ Theme Properties ---------------- +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`int` | :ref:`autohide` | ``1`` | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`int` | :ref:`separation` | ``12`` | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`Texture2D` | :ref:`h_grabber` | | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`Texture2D` | :ref:`v_grabber` | | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ Signals ------- .. _class_SplitContainer_signal_dragged: - **dragged** **(** :ref:`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` **collapsed** +-----------+----------------------+ | *Default* | ``false`` | +-----------+----------------------+ | *Setter* | set_collapsed(value) | +-----------+----------------------+ | *Getter* | is_collapsed() | +-----------+----------------------+ If ``true``, the area of the first :ref:`Control` will be collapsed and the dragger will be disabled. ---- .. _class_SplitContainer_property_dragger_visibility: - :ref:`DraggerVisibility` **dragger_visibility** +-----------+-------------------------------+ | *Default* | ``0`` | +-----------+-------------------------------+ | *Setter* | set_dragger_visibility(value) | +-----------+-------------------------------+ | *Getter* | get_dragger_visibility() | +-----------+-------------------------------+ Determines the dragger's visibility. See :ref:`DraggerVisibility` for details. ---- .. _class_SplitContainer_property_split_offset: - :ref:`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`\ s, with ``0`` being at the end of the first :ref:`Control`. ---- .. _class_SplitContainer_property_vertical: - :ref:`bool` **vertical** +-----------+---------------------+ | *Default* | ``false`` | +-----------+---------------------+ | *Setter* | set_vertical(value) | +-----------+---------------------+ | *Getter* | is_vertical() | +-----------+---------------------+ If ``true``, the ``SplitContainer`` will arrange its children vertically, rather than horizontally. Can't be changed when using :ref:`HSplitContainer` and :ref:`VSplitContainer`. Method Descriptions ------------------- .. _class_SplitContainer_method_clamp_split_offset: - void **clamp_split_offset** **(** **)** Clamps the :ref:`split_offset` value to not go outside the currently possible minimal and maximum values. Theme Property Descriptions --------------------------- .. _class_SplitContainer_theme_constant_autohide: - :ref:`int` **autohide** +-----------+-------+ | *Default* | ``1`` | +-----------+-------+ Boolean value. If 1 (``true``), the grabber will hide automatically when it isn't under the cursor. If 0 (``false``), it's always visible. ---- .. _class_SplitContainer_theme_constant_minimum_grab_thickness: - :ref:`int` **minimum_grab_thickness** +-----------+-------+ | *Default* | ``6`` | +-----------+-------+ The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation` or :ref:`h_grabber` / :ref:`v_grabber`'s thickness are too small, this ensure that the splitting line can still be dragged. ---- .. _class_SplitContainer_theme_constant_separation: - :ref:`int` **separation** +-----------+--------+ | *Default* | ``12`` | +-----------+--------+ The space between sides of the container. ---- .. _class_SplitContainer_theme_icon_h_grabber: - :ref:`Texture2D` **h_grabber** The icon used for the grabber drawn in the middle area when :ref:`vertical` is ``false``. ---- .. _class_SplitContainer_theme_icon_v_grabber: - :ref:`Texture2D` **v_grabber** The icon used for the grabber drawn in the middle area when :ref:`vertical` is ``true``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`