Class SplitContainer

Namespace
Forma
Assembly
Forma.dll

Partitions children along one axis with pointer- and keyboard-adjustable dividers that preserve child minimum sizes.

public class SplitContainer : TemplatedControl, IAddChild<Control>, IAddChild, INotifyPropertyChanged, IDisposable
Inheritance
SplitContainer
Implements
Derived
Inherited Members

Constructors

SplitContainer(Orientation)

public SplitContainer(Orientation orientation)

Parameters

orientation Orientation

Properties

AccessibilityRole

public override AccessibilityRole AccessibilityRole { get; }

Property Value

AccessibilityRole

Collapsed

public bool Collapsed { get; set; }

Property Value

bool

DragAreaSize

public float DragAreaSize { get; set; }

Property Value

float

DraggerVisibility

public SplitContainerDraggerVisibility DraggerVisibility { get; set; }

Property Value

SplitContainerDraggerVisibility

DraggingEnabled

public bool DraggingEnabled { get; set; }

Property Value

bool

DraggingNestedIntersections

public bool DraggingNestedIntersections { get; set; }

Property Value

bool

Orientation

public Orientation Orientation { get; }

Property Value

Orientation

ResolvedSplitOffset

public float ResolvedSplitOffset { get; }

Property Value

float

SplitOffset

Offset from the default half-way split, matching Godot's persisted split_offset.

public float SplitOffset { get; set; }

Property Value

float

SplitOffsets

public IReadOnlyList<float> SplitOffsets { get; }

Property Value

IReadOnlyList<float>

TouchDraggerEnabled

public bool TouchDraggerEnabled { get; set; }

Property Value

bool

TouchDraggerSize

public float TouchDraggerSize { get; set; }

Property Value

float

Methods

ArrangeChildren()

protected override void ArrangeChildren()

ClampSplitOffset(int)

Clamps the saved offset so both visible children retain their minimum main-axis size.

public void ClampSplitOffset(int index = 0)

Parameters

index int

GetCursorAt(Point)

Shows the axis resize cursor over a dragger, which is the only affordance a thin divider has before it is pressed, and holds it for the whole gesture once one is grabbed, since a drag routinely runs the pointer past the bar it is moving. An explicit Cursor on this container wins, so a host that wants its own cursor still gets it.

public override Cursor GetCursorAt(Point position)

Parameters

position Point

Returns

Cursor

GetMinimumSize()

public override Vector2 GetMinimumSize()

Returns

Vector2

GetResolvedSplitOffset(int)

public float GetResolvedSplitOffset(int index = 0)

Parameters

index int

Returns

float

GetSplitOffset(int)

public float GetSplitOffset(int index = 0)

Parameters

index int

Returns

float

GetSplitOffsets()

public float[] GetSplitOffsets()

Returns

float[]

IsDraggingNestedIntersections()

public bool IsDraggingNestedIntersections()

Returns

bool

IsTouchDraggerEnabled()

public bool IsTouchDraggerEnabled()

Returns

bool

PointerMoved(Point)

The pointer moved over this control, in global coordinates.

protected override void PointerMoved(Point point)

Parameters

point Point

PointerPressed(Point)

A pointer press landed on this control, in global coordinates.

Protected as well as internal so a control defined outside this assembly can take part in pointer input. Without that, an app hosting its own drawing surface has to read raw mouse state instead, which bypasses hit-testing, modal gating and the injection side-channel — so such a surface cannot be driven by a test at all.

protected override void PointerPressed(Point point)

Parameters

point Point

PointerReleased(Point, bool)

The pointer was released, with whether it was still inside this control.

protected override void PointerReleased(Point point, bool isInside)

Parameters

point Point
isInside bool

SetDraggingNestedIntersections(bool)

public void SetDraggingNestedIntersections(bool enabled)

Parameters

enabled bool

SetSplitOffset(float, int)

public void SetSplitOffset(float offset, int index = 0)

Parameters

offset float
index int

SetSplitOffsets(params float[])

public void SetSplitOffsets(params float[] offsets)

Parameters

offsets float[]

SetTouchDraggerEnabled(bool)

public void SetTouchDraggerEnabled(bool enabled)

Parameters

enabled bool