IOverlayContent interface Core
A self-drawn, interactive overlay pane (menu, filter checklist, picker, …).
It draws itself through the backend-neutral IRenderSurface, handles pointer and keyboard input and reports its desired size — so the SAME implementation renders identically on every host. No host or UI-framework types leak in.
All input coordinates are LOCAL to the pane (0,0 = its top-left); the host translates from viewport space before calling. Placement, stacking and dismissal are the OverlayManager's.
public interface IOverlayContent
- Namespace
- ArionUI.Presentation.Overlay
- Package
- ArionUI.Presentation ·
dotnet add package ArionUI.Presentation --prerelease
Properties
AccessibleDescription
string? AccessibleDescription { get; }What a screen reader says when this pane OPENS ("Menü, 5 Einträge"). Null = the generic pane announcement. The self-drawn panes are invisible to assistive technology as pixels — this sentence is their whole existence there.
AccessibleParts
IReadOnlyList<AccessiblePart>? AccessibleParts { get; }The pane's interactive parts as structure for assistive technology — automation peers build child elements from it. Null = the pane exposes no structure (its narration is its whole existence).
CaretRect
LogRect? CaretRect { get; }The caret of the pane's focused text box as last drawn, in the coordinates the pane was placed in; null without one. The input method's candidate window hangs here.
ClosesOnOutsidePress
bool ClosesOnOutsidePress { get; }Does a press OUTSIDE this pane dismiss it? False for a COMPANION pane that belongs to something still being edited: the date calendar must survive clicks in the grid, because those place the caret in the cell's text editor — it closes when the edit ends or a day is picked.
CornerRadius
double CornerRadius { get; }Corner radius of this pane's card. The HOST needs it to shape the drop shadow around the pane (see PaneSurface.DrawElevation); the content uses the same value when it draws the card, so the two never mismatch.
MinSize
LogSize MinSize { get; }Smallest size a RESIZE (or a remembered size) may shrink this pane to. Contents with fixed right-aligned chrome (the column chooser's pin/aggregate/fx chips) override this so their icons can never be clipped off the right edge.
WantsFocus
bool WantsFocus { get; }May this pane take the keyboard when it opens? False for a COMPANION pane that hangs off something still being typed in — the date calendar opens under a cell whose text editor stays live, so the date can be typed or picked; stealing focus there would kill the typing.
WantsTextInput
bool WantsTextInput { get; }IME/text sink target — the host docks its text-input client here when true (same seam the grid's cell/filter editor uses).
WantsTick
bool WantsTick { get; }True while the pane has a running animation (scroll glide, caret blink) — the floating surface keeps its frame tick alive while any pane wants it, then lets it idle.
Methods
AccessiblePartOf
AccessiblePart? AccessiblePartOf(string id);ONE part by id, read live. A peer is asked about ten properties per part, and answering each of them by building the whole list walked the control tree once per question. Default: pick it out of the list, which is right for a pane whose parts are a fixed handful.
AccessibleRangeOf
AccessibleRange? AccessibleRangeOf(string id);The range of a range part (UIA RangeValue); null when the part has none.
AccessibleToggleStateOf
bool? AccessibleToggleStateOf(string id);The checked state of a toggle part (UIA Toggle); null when it does not toggle.
AccessibleValueOf
string? AccessibleValueOf(string id);The text of a text part (UIA Value); null when the part carries no value.
AttachAnnouncer
void AttachAnnouncer(Action<string> announce);The host hands the pane a voice: everything passed to announce is spoken through the grid's screen-reader channels (highlight moves, state changes). Default: mute, for panes that say nothing.
CursorAt
GridCursor CursorAt(LogPoint local);The pointer shape this content asks for at a LOCAL point — Hand over its buttons/chips/rows. Default: the plain arrow. Purely visual; hit-testing for input stays in the OnPointer* handlers.
InvokeAccessiblePart
bool InvokeAccessiblePart(string id);Act on a part by id as a click would (UIA Invoke). False when the part is unknown, disabled or has no action.
Measure
LogSize Measure(double maxWidth, double maxHeight);Desired size given the space available (for placement/clamping).
MoveFocus
bool MoveFocus(bool reverse);Move keyboard focus to the next or previous control inside this pane. Return true when a focus target changed; false lets Tab fall through.
OnKey
bool OnKey(ArionKey key, ArionModifiers mods);Key press. Esc/Enter/arrows etc. Return true if handled.
OnOutsidePress
void OnOutsidePress();A press landed OUTSIDE this pane while it stayed open (only reachable for a pane with IOverlayContent.ClosesOnOutsidePress false). A MODELESS pane uses it to hand the keyboard back — the search bar stays up but stops swallowing keystrokes once you click into the grid.
OnPointerMoved
void OnPointerMoved(LogPoint local, bool buttonDown);
OnPointerPressed
bool OnPointerPressed(LogPoint local, ArionModifiers mods, int clickCount = 1);Pointer press in LOCAL coords. clickCount is 2 for a double-click and 3 for a triple-click, so a text field in a pane selects a word or everything exactly like the grid's own fields do (the grid gets it from InteractionController.OnMultiClick). Return true if handled.
OnPointerReleased
void OnPointerReleased(LogPoint local);
OnTextInput
void OnTextInput(string text);
OnWheel
bool OnWheel(LogPoint local, double delta);Wheel in LOCAL coords (long lists). Return true if handled.
Placed
void Placed(LogRect bounds);Where the overlay manager placed this pane, in grid-logical coordinates — called on the UI thread whenever the layout runs, and before the pane is announced as opened. A pane that reports parts needs it: its boxes are grid-absolute, and taking them from the last DRAW would both come too late for the first query and read a field the render thread writes.
Render
void Render(IRenderSurface surface, LogRect bounds, OverlayFrameState state);Paint into bounds (already placed + clamped). Panes without text input ignore state.
SetAccessibleRangeValueOf
bool SetAccessibleRangeValueOf(string id, double value);Set the value of a range part (UIA RangeValue.SetValue). False when the part has no range.
SetAccessibleValueOf
bool SetAccessibleValueOf(string id, string value);Replace the text of a text part (UIA Value.SetValue). False when the part carries no value.
Tick
void Tick(double dtMs);Advance animations by dtMs milliseconds (called once per frame by the hosting surface while IOverlayContent.WantsTick).
UseClipboard
void UseClipboard(IClipboardText clipboard);The host hands the pane the platform's clipboard for its text boxes. Default: the pane copies and pastes nothing.
Events
CloseRequested
event Action? CloseRequested;Raised when the pane wants to close itself (Enter/apply/pick).
Invalidated
event Action? Invalidated;Raised when the pane needs a repaint (hover, caret, content change).
