summaryrefslogtreecommitdiff
path: root/doc/classes/SplitContainer.xml
blob: f5646e9e973e7e47f337d7b6a162f7ae0880796f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SplitContainer" inherits="Container" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		Container for splitting and adjusting.
	</brief_description>
	<description>
		Container for splitting two [Control]s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio.
	</description>
	<tutorials>
		<link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link>
	</tutorials>
	<methods>
		<method name="clamp_split_offset">
			<return type="void" />
			<description>
				Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values.
			</description>
		</method>
	</methods>
	<members>
		<member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" default="false">
			If [code]true[/code], the area of the first [Control] will be collapsed and the dragger will be disabled.
		</member>
		<member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility" default="0">
			Determines the dragger's visibility. See [enum DraggerVisibility] for details.
		</member>
		<member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" default="0">
			The initial offset of the splitting between the two [Control]s, with [code]0[/code] being at the end of the first [Control].
		</member>
		<member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false">
			If [code]true[/code], the [SplitContainer] will arrange its children vertically, rather than horizontally.
			Can't be changed when using [HSplitContainer] and [VSplitContainer].
		</member>
	</members>
	<signals>
		<signal name="dragged">
			<param index="0" name="offset" type="int" />
			<description>
				Emitted when the dragger is dragged by user.
			</description>
		</signal>
	</signals>
	<constants>
		<constant name="DRAGGER_VISIBLE" value="0" enum="DraggerVisibility">
			The split dragger is visible when the cursor hovers it.
		</constant>
		<constant name="DRAGGER_HIDDEN" value="1" enum="DraggerVisibility">
			The split dragger is never visible.
		</constant>
		<constant name="DRAGGER_HIDDEN_COLLAPSED" value="2" enum="DraggerVisibility">
			The split dragger is never visible and its space collapsed.
		</constant>
	</constants>
	<theme_items>
		<theme_item name="autohide" data_type="constant" type="int" default="1">
			Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
		</theme_item>
		<theme_item name="separation" data_type="constant" type="int" default="12">
			The space between sides of the container.
		</theme_item>
		<theme_item name="h_grabber" data_type="icon" type="Texture2D">
			The icon used for the grabber drawn in the middle area when [member vertical] is [code]false[/code].
		</theme_item>
		<theme_item name="v_grabber" data_type="icon" type="Texture2D">
			The icon used for the grabber drawn in the middle area when [member vertical] is [code]true[/code].
		</theme_item>
	</theme_items>
</class>