public sealed class DockGroupViewA group's tab strip and the panel it is showing.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ The strip scrolls, and it has to. A group is how many panels somebody stacked into one place, and that is unbounded — six tabs in a pane a quarter of the window wide is an ordinary arrangement. Without somewhere for them to go, flexbox either shrinks every tab until none of the titles can be read or pushes the last of them out of the box, and in both cases the panels on the end are ones the user cannot get back to.
Four elements, and the middle one is the only one that moves. The strip is a row holding a previous button, a clipping viewport, a next button; the viewport holds a list that keeps its natural width and is slid sideways by OffsetX. The clipping is overflow: hidden in the theme, which is the draw list's clip stack — the same mechanism ScrollView uses, and deliberately not ScrollView itself, because a tab strip with a scrollbar under it is two rows of chrome to save one.
Fields and properties (12)
public const float PageFractionHow much of the visible width one press of an arrow moves.
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public UiElement StripThe strip along the top: the arrows and the tabs between them.
public UiElement TabsWhere the tabs live. Inside Strip, and what scrolls.
public IconButton PreviousThe arrow that scrolls towards the first tab, shown only when there is one off-screen.
public IconButton NextThe arrow that scrolls towards the last.
public UiElement BodyWhere the panels live.
public DockGroupNode? NodeThe arrangement node this is showing.
public float ScrollLeftHow far the tabs are scrolled, in pixels from the first one.
public float MaximumScrollHow far they can be scrolled.
public bool OverflowsWhether there are tabs the strip is not showing.
Methods (7)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
protected override void OnRemoved()public void Scroll(float delta)Scrolls the tabs by a distance, clamped to what there is.
public void ScrollTo(float offset)Scrolls the tabs to a position, clamped to what there is.
public void Reveal(UiElement tab)Scrolls until a tab is wholly visible, if it is not already.
public void RevealAfterLayout(UiElement? tab)Asks for a tab to be revealed once there are boxes to measure.
public void Refresh()Brings the arrows and the scroll offset up to date with the tabs.
Used by (4)
- DockingHostVixen.Ui.Controls.Advanced
- DockingTestsVixen.Ui.Controls.Advanced.Tests
- DockingWindowTestsVixen.Ui.Controls.Advanced.Tests
- PanelBehaviourTestsVixen.Editor.App.Tests