SplitContainer
A container that splits two child controls horizontally or vertically and provides a grabber for adjusting the split ratio.
SplitContainer.swift:16class SplitContainer
A container that accepts only two child controls, then arranges them horizontally or vertically and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls.
This object emits the following signals:
Superclasses
class Container
Base class for all GUI containers.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
enum DraggerVisibility
class Signal1
Signal support.
Type members
Instance members
var collapsed: Bool
If
true
, the area of the firstControl
will be collapsed and the dragger will be disabled.var dragged: Signal1
Emitted when the dragger is dragged by user.
var draggerVisibility: SplitContainer.DraggerVisibility
Determines the dragger’s visibility. See
DraggerVisibility
for details.var splitOffset: Int32
The initial offset of the splitting between the two
Control
s, with0
being at the end of the firstControl
.var vertical: Bool
If
true
, theSplitContainer
will arrange its children vertically, rather than horizontally.func clampSplitOffset(
) Clamps the
splitOffset
value to not go outside the currently possible minimal and maximum values.
Subclasses
class HSplitContainer
A container that splits two child controls horizontally and provides a grabber for adjusting the split ratio.
class VSplitContainer
A container that splits two child controls vertically and provides a grabber for adjusting the split ratio.