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
orientationOrientation
Properties
AccessibilityRole
public override AccessibilityRole AccessibilityRole { get; }
Property Value
Collapsed
public bool Collapsed { get; set; }
Property Value
DragAreaSize
public float DragAreaSize { get; set; }
Property Value
DraggerVisibility
public SplitContainerDraggerVisibility DraggerVisibility { get; set; }
Property Value
DraggingEnabled
public bool DraggingEnabled { get; set; }
Property Value
DraggingNestedIntersections
public bool DraggingNestedIntersections { get; set; }
Property Value
Orientation
public Orientation Orientation { get; }
Property Value
ResolvedSplitOffset
public float ResolvedSplitOffset { get; }
Property Value
SplitOffset
Offset from the default half-way split, matching Godot's persisted split_offset.
public float SplitOffset { get; set; }
Property Value
SplitOffsets
public IReadOnlyList<float> SplitOffsets { get; }
Property Value
TouchDraggerEnabled
public bool TouchDraggerEnabled { get; set; }
Property Value
TouchDraggerSize
public float TouchDraggerSize { get; set; }
Property Value
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
indexint
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
positionPoint
Returns
GetMinimumSize()
public override Vector2 GetMinimumSize()
Returns
- Vector2
GetResolvedSplitOffset(int)
public float GetResolvedSplitOffset(int index = 0)
Parameters
indexint
Returns
GetSplitOffset(int)
public float GetSplitOffset(int index = 0)
Parameters
indexint
Returns
GetSplitOffsets()
public float[] GetSplitOffsets()
Returns
- float[]
IsDraggingNestedIntersections()
public bool IsDraggingNestedIntersections()
Returns
IsTouchDraggerEnabled()
public bool IsTouchDraggerEnabled()
Returns
PointerMoved(Point)
The pointer moved over this control, in global coordinates.
protected override void PointerMoved(Point point)
Parameters
pointPoint
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
pointPoint
PointerReleased(Point, bool)
The pointer was released, with whether it was still inside this control.
protected override void PointerReleased(Point point, bool isInside)
Parameters
pointPointisInsidebool
SetDraggingNestedIntersections(bool)
public void SetDraggingNestedIntersections(bool enabled)
Parameters
enabledbool
SetSplitOffset(float, int)
public void SetSplitOffset(float offset, int index = 0)
Parameters
SetSplitOffsets(params float[])
public void SetSplitOffsets(params float[] offsets)
Parameters
offsetsfloat[]
SetTouchDraggerEnabled(bool)
public void SetTouchDraggerEnabled(bool enabled)
Parameters
enabledbool