#!/usr/bin/env dub
/+ dub.sdl:
name "anchored_overlays_dismissal_policy"
targetPath "build"
dependency "sparkles:ui" path="../../../.."
dflags "-preview=in" "-preview=dip1000"
buildType "checked" {
buildOptions "optimize" "inline" "debugInfo"
}
+/
/**
* Dismissal as **one value**: a flags word ANDed with a router-offered cause.
*
* The survey found dismissal decomposed into three separable things that most
* implementations tangle — a POLICY (which causes may close this surface), a
* CAUSE detector (how each cause is recognised), and a CASCADE (how far down a
* nested stack one close propagates). Only Qt Quick Controls has all three as
* data: `QQuickPopup::ClosePolicy` is a flags enum and `tryClose(pos, phase)`
* is one boolean expression, `closePolicy & (phase & outsideFlags)`. Uno/WinUI
* reached the same shape independently and it rotted into dead code for want of
* a default. This program is that value form, written the way
* [8-dismissal](../index.md) and the [proposal](../proposal.md) § 3.6
* (`DismissPolicy` / `DismissReason`, item `P4`) recommend it for sparkles:
*
* 1. **The router names the cause in the policy's own vocabulary** and the
* surface answers `dismisses(policy, event, hit)`. Nobody else decides.
* 2. **A separate class of MANDATORY causes bypasses the word entirely** —
* anchor removed, unplaceable, parent closing. An orphan cannot survive.
* 3. **The two hard parts are pairing and cascade**, and both are shown here
* failing as well as working: § 4 pairs press with release (Qt's
* `outsidePressed` latch, HTML's two-phase light dismiss), § 5 exempts the
* frame an overlay opened on (Slint's `had_popup_on_press`, Turbo Vision's
* `firstEvent`), and § 6 truncates a nested chain to an endpoint index
* (Blink's `HideAllPopoversUntil`).
*
* Companion to docs/research/anchored-overlays/index.md § "Dismissal" and to
* proposal.md § 3.6.
*
* Run with: dub run --single dismissal-policy.d
*
* Portability: pure computation over integer cells — no OS, no clock, no
* display, no input device. Every decision here is assertable on the recording
* canvas, which is the point of making dismissal a value.
*/
module (module) anchored_overlays_dismissal_policyDismissal as one value: a flags word ANDed with a router-offered cause.
The survey found dismissal decomposed into three separable things that most
implementations tangle — a POLICY (which causes may close this surface), a
CAUSE detector (how each cause is recognised), and a CASCADE (how far down a
nested stack one close propagates). Only Qt Quick Controls has all three as
data: QQuickPopup::ClosePolicy is a flags enum and tryClose(pos, phase)
is one boolean expression, closePolicy & (phase & outsideFlags). Uno/WinUI
reached the same shape independently and it rotted into dead code for want of
a default. This program is that value form, written the way
8-dismissal and the proposal § 3.6
(DismissPolicy / DismissReason, item P4) recommend it for sparkles:
The router names the cause in the policy's own vocabulary and the
surface answers dismisses(policy, event, hit). Nobody else decides.
A separate class of MANDATORY causes bypasses the word entirely —
anchor removed, unplaceable, parent closing. An orphan cannot survive.
The two hard parts are pairing and cascade, and both are shown here
failing as well as working: § 4 pairs press with release (Qt's
outsidePressed latch, HTML's two-phase light dismiss), § 5 exempts the
frame an overlay opened on (Slint's had_popup_on_press, Turbo Vision's
firstEvent), and § 6 truncates a nested chain to an endpoint index
(Blink's HideAllPopoversUntil).
Companion to docs/research/anchored-overlays/index.md § "Dismissal" and to
proposal.md § 3.6.
Run with: dub run --single dismissal-policy.d
Portability
pure computation over integer cells — no OS, no clock, no
display, no input device. Every decision here is assertable on the recording
canvas, which is the point of making dismissal a value.
anchored_overlays_dismissal_policy;
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) anchored_overlays_dismissal_policy.writefln = std.stdio.writefln(alias fmt, A...)(A args) if (isSomeString!(typeof(fmt)))Equivalent to writef(fmt, args, '\n').
writefln, (alias template) anchored_overlays_dismissal_policy.writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln;
import (package) sparklessparkles.(package) sparkles.basebase.(module) sparkles.base.smallbufferA @nogc container with Small Buffer Optimization (SBO).
Provides an append-only buffer that stores small amounts of data inline
(avoiding heap allocation) and automatically switches to heap storage
when capacity is exceeded.
Primary use case: appending elements in a temporary scope where GC
allocation is not desired.
smallbuffer : (alias struct) anchored_overlays_dismissal_policy.SmallBuffer = sparkles.base.smallbuffer.SmallBuffer(T, ulong N = max(size_t(1), (T[]).sizeof / T.sizeof), bool unique = false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer;
import (package) sparklessparkles.(package) sparkles.inputinput.(module) sparkles.input.eventsThe shared input vocabulary of sparkles:input (INP1–INP4): input is
values — one Event sum type over KeyEvent,
PointerEvent, WheelEvent, FocusEvent and
ResizeEvent — not callbacks registered on widgets. A sum type rather
than a kind + dead fields record, so an illegal combination (a key event with
a mouse button) is unrepresentable and == compares only what is live.
Every event is a Regular value — copyable, comparable — so interaction tests
record byte streams, decode them, and assert on plain equality with no live
terminal or window in sight.
Positions are Point — the same sparkles:math instantiation the
toolkit's geometry uses (INP3) — in the toolkit's 0-based cell convention, so
no conversion happens at the widget boundary. Producers convert their native
coordinates (the SGR mouse wire is 1-based; a pixel backend divides by the cell
size) when they construct the event.
events : (enum) sparkles.input.events.KeyA decoded key. char_ carries a printable code point in KeyEvent.ch; the
rest are named keys.
Key, (enum) sparkles.input.events.KeyActionWhat a key did (INP15).
A terminal cannot report release at all, so a consumer that needs the level of
a held key must ask InputCapabilities.keyRelease and offer another route where
it is absent — the TGT5 rule, applied to keys. press is the default, so a
producer that has not thought about this reports what it always did.
KeyAction, (struct) sparkles.input.events.KeyEventA key event: a named key, or a printable code point (key == Key.char_, code
point in ch) — which is also how text input arrives.
unshifted and text exist for the one consumer that cannot work without
them: a terminal emulator's key encoder, which reports the layout-independent
key that was struck and the characters it produced, together. Delivering
the text as a separate event cannot express that pairing — which keystroke
produced which text — so it rides here.
The three fields are appended, so every existing construction and helper keeps
its meaning; KeyAction.press and a zero unshifted describe what producers
reported before.
KeyEvent, (alias) anchored_overlays_dismissal_policy.isDismiss = bool sparkles.input.events.isDismiss(in sparkles.input.events.KeyEvent k) pure nothrow @nogc @safetrue for the platform spellings of "go back / dismiss" (INP13): Escape
on desktop and in the terminal, the system back key on Android.
The framework owns the equivalence; the application owns the chain. hue
dismisses a hover popup, then the explorer, then quits — that ordering is
hue's, and a different app would nest differently. q is deliberately not
here: "q quits" is a keybinding, not a platform spelling of dismiss.
isDismiss;
import (package) sparklessparkles.(package) sparkles.uiui.(module) sparkles.ui.geometryAbstract geometry for sparkles.ui: points, sizes, rectangles, and insets
measured in abstract cells — the monospace column/row grid every backend
shares. An interpreter scales cells to pixels (GUI), keeps them 1:1 (TUI cell
grid), or maps them to ch/em (HTML). Nothing here knows about a specific
backend.
Also the sizing vocabulary (SizeSpec: fit / grow / fixed / percent with
min/max) the layout pass (sparkles.ui.layout) resolves, and
cellsOf — the one width authority: the display-column width of a
string, counting one column per codepoint to match the grid advance the GUI
painter (drawText) and the terminal both use. (Proper wide/combining width is
the deferred grapheme-width upgrade; see the hue FNT6/DEF7 roadmap item.)
The 2-D types specialize sparkles.math.vector's numeric Vector, the same
way TermSize/TermPosition do for the
terminal — one vector implementation and one field vocabulary across the stack.
geometry : (alias) anchored_overlays_dismissal_policy.cellsOf = ulong sparkles.ui.geometry.cellsOf(scope const(char)[] s) pure nothrow @nogc @safeThe display-column width of s — the one width authority for the whole
library, so the GUI painter, the TUI cell grid, and the layout pass never drift
sub-cell.
Counts one column per codepoint (a UTF-8 lead byte, i.e. every byte whose top
two bits are not 10), matching the grid advance drawText and the terminal
use today. @safe pure nothrow @nogc; invalid UTF-8 degrades to a lead-byte
count rather than throwing.
cellsOf, (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point, (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect;
// ---------------------------------------------------------------------------
// The policy value
// ---------------------------------------------------------------------------
/**
Every cause a surface can be closed by, one bit each — the shape of
`QQuickPopup::ClosePolicyFlag` and of Uno's `DismissalTriggerFlags`. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
`anchorClipped` is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (`position-visibility: anchor-visible` is the initial value), and the
proposal keeps that distinction.
*/
enum (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn : ushort
{
(enum value) anchored_overlays_dismissal_policy.DismissOn.nothing = cast(ushort)0unothing = 0,
(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest = 1 << 0, /// `isDismiss` — Escape and the Android back key (INP13)
(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside = 1 << 1,
(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside = 1 << 2,
(enum value) anchored_overlays_dismissal_policy.DismissOn.outsideAnchor = cast(ushort)8uthe anchor's own cells count as OUTSIDE, not inside
outsideAnchor = 1 << 3, /// the anchor's own cells count as OUTSIDE, not inside
(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate = 1 << 4,
(enum value) anchored_overlays_dismissal_policy.DismissOn.focusOutside = cast(ushort)32ufocusOutside = 1 << 5,
(enum value) anchored_overlays_dismissal_policy.DismissOn.surfaceBlur = cast(ushort)64uwindow/app deactivation — not detectable on the TUI
surfaceBlur = 1 << 6, /// window/app deactivation — not detectable on the TUI
(enum value) anchored_overlays_dismissal_policy.DismissOn.anchorGone = cast(ushort)128umandatory: bypasses the policy word
anchorGone = 1 << 7, /// mandatory: bypasses the policy word
(enum value) anchored_overlays_dismissal_policy.DismissOn.anchorClipped = cast(ushort)256uHIDES, does not close
anchorClipped = 1 << 8, /// HIDES, does not close
(enum value) anchored_overlays_dismissal_policy.DismissOn.unplaceable = cast(ushort)512umandatory: the placement solver returned nothing
unplaceable = 1 << 9, /// mandatory: the placement solver returned nothing
(enum value) anchored_overlays_dismissal_policy.DismissOn.resize = cast(ushort)1024uresize = 1 << 10,
(enum value) anchored_overlays_dismissal_policy.DismissOn.scroll = cast(ushort)2048uscroll = 1 << 11,
(enum value) anchored_overlays_dismissal_policy.DismissOn.siblingOpened = cast(ushort)4096usiblingOpened = 1 << 12,
(enum value) anchored_overlays_dismissal_policy.DismissOn.cascade = cast(ushort)8192umandatory: an ancestor is closing
cascade = 1 << 13, /// mandatory: an ancestor is closing
(enum value) anchored_overlays_dismissal_policy.DismissOn.timeout = cast(ushort)16384uthe notify band's clock
timeout = 1 << 14, /// the notify band's clock
}
/// Why a surface closed. `xdg-shell`'s argument-less `popup_done` is the named
/// anti-pattern: a client that cannot tell Escape from a click outside cannot
/// implement "restore focus only when dismissed by keyboard".
enum (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason : ubyte
{
(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone,
(enum value) anchored_overlays_dismissal_policy.DismissReason.programmatic = 1programmatic,
(enum value) anchored_overlays_dismissal_policy.DismissReason.closeRequest = 2closeRequest,
(enum value) anchored_overlays_dismissal_policy.DismissReason.pressOutside = 3pressOutside,
(enum value) anchored_overlays_dismissal_policy.DismissReason.releaseOutside = 4releaseOutside,
(enum value) anchored_overlays_dismissal_policy.DismissReason.outsideAnchor = 5outsideAnchor,
(enum value) anchored_overlays_dismissal_policy.DismissReason.triggerReactivate = 6triggerReactivate,
(enum value) anchored_overlays_dismissal_policy.DismissReason.focusOutside = 7focusOutside,
(enum value) anchored_overlays_dismissal_policy.DismissReason.surfaceBlur = 8surfaceBlur,
(enum value) anchored_overlays_dismissal_policy.DismissReason.anchorGone = 9anchorGone,
(enum value) anchored_overlays_dismissal_policy.DismissReason.unplaceable = 10unplaceable,
(enum value) anchored_overlays_dismissal_policy.DismissReason.resize = 11resize,
(enum value) anchored_overlays_dismissal_policy.DismissReason.scroll = 12scroll,
(enum value) anchored_overlays_dismissal_policy.DismissReason.siblingOpened = 13siblingOpened,
(enum value) anchored_overlays_dismissal_policy.DismissReason.parentClosed = 14parentClosed,
(enum value) anchored_overlays_dismissal_policy.DismissReason.timeout = 15timeout,
}
/// The whole dimension, per surface. `group` is Flutter's `groupId`: a menu
/// chain is ONE dismiss target, so "inside" is group membership rather than
/// geometric descent of a widget tree.
struct (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy
{
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissPolicy.onon;
(alias) object.size_t = ulongsize_t (field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group; /// 0 is the bare page — never a surface's own group
bool (field) bool anchored_overlays_dismissal_policy.DismissPolicy.passThroughdoes the dismissing press also reach what it hit?
passThrough; /// does the dismissing press also reach what it hit?
}
/// What the router says happened, in the policy's vocabulary. Exactly one cause
/// bit per call — the router owns "what happened", the surface owns "do I care".
struct (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent
{
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause;
uint (field) uint anchored_overlays_dismissal_policy.DismissEvent.framethe frame this event is being routed on
frame; /// the frame this event is being routed on
bool (field) bool anchored_overlays_dismissal_policy.DismissEvent.openGuardhonour the one-frame open exemption (§ 5)
openGuard = true; /// honour the one-frame open exemption (§ 5)
}
/// What the router resolved about this event with respect to THIS surface. All
/// of it comes from the last painted frame's hit list; none of it needs a grab,
/// a capture, a scrim or a platform popup.
struct (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit
{
(alias) object.size_t = ulongsize_t (field) ulong anchored_overlays_dismissal_policy.OverlayHit.groupgroup the CURRENT pointer phase resolved to (0 = bare page)
group; /// group the CURRENT pointer phase resolved to (0 = bare page)
(alias) object.size_t = ulongsize_t (field) ulong anchored_overlays_dismissal_policy.OverlayHit.pressGroupgroup the PRESS phase resolved to — Qt's latch, Blink's t0
pressGroup; /// group the PRESS phase resolved to — Qt's latch, Blink's `t0`
bool (field) bool anchored_overlays_dismissal_policy.OverlayHit.insideAnchorthe point lies in this surface's anchor cells
insideAnchor; /// the point lies in this surface's anchor cells
uint (field) uint anchored_overlays_dismissal_policy.OverlayHit.openedFramethe frame this surface opened on
openedFrame; /// the frame this surface opened on
}
/// The causes the policy word does not get a vote on. An orphaned surface, a
/// surface whose anchor is gone, and a surface the solver cannot place are all
/// unreachable by any dismissal path — ImGui's sticky-orphan bug is what
/// happens when they are not mandatory.
enum (constant) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.mandatoryCauses = cast(DismissOn)cast(ushort)8832uThe causes the policy word does not get a vote on. An orphaned surface, a
surface whose anchor is gone, and a surface the solver cannot place are all
unreachable by any dismissal path — ImGui's sticky-orphan bug is what
happens when they are not mandatory.
mandatoryCauses = anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.anchorGone = cast(ushort)128umandatory: bypasses the policy word
anchorGone, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.unplaceable = cast(ushort)512umandatory: the placement solver returned nothing
unplaceable, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.cascade = cast(ushort)8192umandatory: an ancestor is closing
cascade);
/// The causes that must be tested against the hit list before they count.
enum (constant) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.outsideCauses = cast(DismissOn)cast(ushort)14uThe causes that must be tested against the hit list before they count.
outsideCauses = anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.outsideAnchor = cast(ushort)8uthe anchor's own cells count as OUTSIDE, not inside
outsideAnchor);
/// The causes a surface opened this very frame is exempt from.
enum (constant) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.guardedCauses = cast(DismissOn)cast(ushort)30uThe causes a surface opened this very frame is exempt from.
guardedCauses = anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine((constant) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.outsideCauses = cast(DismissOn)cast(ushort)14uThe causes that must be tested against the hit list before they count.
outsideCauses, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate);
/**
The whole decision, as one expression per clause.
This is `tryClose` with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (`D8.C1`).
*/
(enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy(in (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) policypolicy, in (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent, in (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hithit) @safe pure nothrow @nogc
in (bool anchored_overlays_dismissal_policy.isSingleCause(in anchored_overlays_dismissal_policy.DismissOn c) pure nothrow @nogc @safeisSingleCause((parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause), "the router offers exactly one cause per call")
{
// 1. Mandatory causes bypass the word.
if (bool anchored_overlays_dismissal_policy.has(in anchored_overlays_dismissal_policy.DismissOn set, in anchored_overlays_dismissal_policy.DismissOn bit) pure nothrow @nogc @safehas((constant) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.mandatoryCauses = cast(DismissOn)cast(ushort)8832uThe causes the policy word does not get a vote on. An orphaned surface, a
surface whose anchor is gone, and a surface the solver cannot place are all
unreachable by any dismissal path — ImGui's sticky-orphan bug is what
happens when they are not mandatory.
mandatoryCauses, (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause))
return anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.reasonOf(in anchored_overlays_dismissal_policy.DismissOn cause) pure nothrow @nogc @safereasonOf((parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause);
// 2. Qt's `tryClose`: the policy word ANDed with the offered cause.
if (!bool anchored_overlays_dismissal_policy.has(in anchored_overlays_dismissal_policy.DismissOn set, in anchored_overlays_dismissal_policy.DismissOn bit) pure nothrow @nogc @safehas((parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) policypolicy.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissPolicy.onon, (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause))
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone;
// 3. A surface opened by the very press being routed is exempt from it
// (Slint's `had_popup_on_press`, Turbo Vision's `firstEvent` guard).
if ((parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) bool anchored_overlays_dismissal_policy.DismissEvent.openGuardhonour the one-frame open exemption (§ 5)
openGuard && bool anchored_overlays_dismissal_policy.has(in anchored_overlays_dismissal_policy.DismissOn set, in anchored_overlays_dismissal_policy.DismissOn bit) pure nothrow @nogc @safehas((constant) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.guardedCauses = cast(DismissOn)cast(ushort)30uThe causes a surface opened this very frame is exempt from.
guardedCauses, (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause) && (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hithit.(field) uint anchored_overlays_dismissal_policy.OverlayHit.openedFramethe frame this surface opened on
openedFrame == (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) uint anchored_overlays_dismissal_policy.DismissEvent.framethe frame this event is being routed on
frame)
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone;
// 4. "Outside" is group membership. The anchor's cells are inside the group
// unless the surface opted into the wider scope (the inverse spelling of
// Qt's `CloseOnPressOutsideParent`) — which is why pressing an open
// popover's own trigger is `triggerReactivate` and never `pressOutside`.
if (bool anchored_overlays_dismissal_policy.has(in anchored_overlays_dismissal_policy.DismissOn set, in anchored_overlays_dismissal_policy.DismissOn bit) pure nothrow @nogc @safehas((constant) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.outsideCauses = cast(DismissOn)cast(ushort)14uThe causes that must be tested against the hit list before they count.
outsideCauses, (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause))
{
if ((parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hithit.(field) ulong anchored_overlays_dismissal_policy.OverlayHit.groupgroup the CURRENT pointer phase resolved to (0 = bare page)
group == (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) policypolicy.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group)
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone;
if ((parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hithit.(field) bool anchored_overlays_dismissal_policy.OverlayHit.insideAnchorthe point lies in this surface's anchor cells
insideAnchor && !bool anchored_overlays_dismissal_policy.has(in anchored_overlays_dismissal_policy.DismissOn set, in anchored_overlays_dismissal_policy.DismissOn bit) pure nothrow @nogc @safehas((parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) policypolicy.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissPolicy.onon, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.outsideAnchor = cast(ushort)8uthe anchor's own cells count as OUTSIDE, not inside
outsideAnchor))
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone;
// 5. The pairing: a release only dismisses if the press was outside too
// (Blink's `t0 == t1`, Qt's `!contains(pressPoint)`).
if ((parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause == (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside && (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hithit.(field) ulong anchored_overlays_dismissal_policy.OverlayHit.pressGroupgroup the PRESS phase resolved to — Qt's latch, Blink's t0
pressGroup == (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) policypolicy.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group)
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone;
}
return anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.reasonOf(in anchored_overlays_dismissal_policy.DismissOn cause) pure nothrow @nogc @safereasonOf((parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissEvent.causecause);
}
/// The boolean face of $(LREF dismissedBy) — the predicate the router calls when
/// it only needs to know whether to plan a close.
bool bool anchored_overlays_dismissal_policy.dismisses(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe boolean face of dismissedBy — the predicate the router calls when
it only needs to know whether to plan a close.
dismisses(in (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) policypolicy, in (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent, in (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hithit) @safe pure nothrow @nogc
=> anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) policypolicy, (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) eventevent, (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hithit) != (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone;
// ---------------------------------------------------------------------------
// Flag plumbing (an enum's `|` promotes to `int`, so combining needs a helper)
// ---------------------------------------------------------------------------
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine(scope const (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn[] (parameter) const(anchored_overlays_dismissal_policy.DismissOn[]) flagsflags...) @safe pure nothrow @nogc
{
ushort (local variable) ushort accacc;
foreach ((parameter) const(anchored_overlays_dismissal_policy.DismissOn) ff; (parameter) const(anchored_overlays_dismissal_policy.DismissOn[]) flagsflags)
(local variable) ushort accacc |= cast(ushort) (local variable) const(anchored_overlays_dismissal_policy.DismissOn) ff;
return cast((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn) (local variable) ushort accacc;
}
bool bool anchored_overlays_dismissal_policy.has(in anchored_overlays_dismissal_policy.DismissOn set, in anchored_overlays_dismissal_policy.DismissOn bit) pure nothrow @nogc @safehas(in (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (parameter) const(anchored_overlays_dismissal_policy.DismissOn) setset, in (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (parameter) const(anchored_overlays_dismissal_policy.DismissOn) bitbit) @safe pure nothrow @nogc
=> (cast(ushort) (parameter) const(anchored_overlays_dismissal_policy.DismissOn) setset & cast(ushort) (parameter) const(anchored_overlays_dismissal_policy.DismissOn) bitbit) != 0;
bool bool anchored_overlays_dismissal_policy.isSingleCause(in anchored_overlays_dismissal_policy.DismissOn c) pure nothrow @nogc @safeisSingleCause(in (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (parameter) const(anchored_overlays_dismissal_policy.DismissOn) cc) @safe pure nothrow @nogc
{
const (local variable) const(ushort) vv = cast(ushort) (parameter) const(anchored_overlays_dismissal_policy.DismissOn) cc;
return (local variable) const(ushort) vv != 0 && ((local variable) const(ushort) vv & ((local variable) const(ushort) vv - 1)) == 0;
}
(enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.reasonOf(in anchored_overlays_dismissal_policy.DismissOn cause) pure nothrow @nogc @safereasonOf(in (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (parameter) const(anchored_overlays_dismissal_policy.DismissOn) causecause) @safe pure nothrow @nogc
{
switch ((parameter) const(anchored_overlays_dismissal_policy.DismissOn) causecause)
{
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.closeRequest = 2closeRequest;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.pressOutside = 3pressOutside;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.releaseOutside = 4releaseOutside;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.outsideAnchor = cast(ushort)8uthe anchor's own cells count as OUTSIDE, not inside
outsideAnchor:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.outsideAnchor = 5outsideAnchor;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.triggerReactivate = 6triggerReactivate;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.focusOutside = cast(ushort)32ufocusOutside:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.focusOutside = 7focusOutside;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.surfaceBlur = cast(ushort)64uwindow/app deactivation — not detectable on the TUI
surfaceBlur:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.surfaceBlur = 8surfaceBlur;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.anchorGone = cast(ushort)128umandatory: bypasses the policy word
anchorGone:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.anchorGone = 9anchorGone;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.unplaceable = cast(ushort)512umandatory: the placement solver returned nothing
unplaceable:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.unplaceable = 10unplaceable;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.resize = cast(ushort)1024uresize:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.resize = 11resize;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.scroll = cast(ushort)2048uscroll:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.scroll = 12scroll;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.siblingOpened = cast(ushort)4096usiblingOpened:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.siblingOpened = 13siblingOpened;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.cascade = cast(ushort)8192umandatory: an ancestor is closing
cascade:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.parentClosed = 14parentClosed;
case (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.timeout = cast(ushort)16384uthe notify band's clock
timeout:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.timeout = 15timeout;
// `anchorClipped` hides the surface; it never closes it.
default:
return (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone;
}
}
/// The short label a matrix cell prints for a reason.
(alias) object.string = stringstring string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(in (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason (parameter) const(anchored_overlays_dismissal_policy.DismissReason) rr) @safe pure nothrow @nogc
{
final switch ((parameter) const(anchored_overlays_dismissal_policy.DismissReason) rr)
{
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.none = cast(ubyte)0unone:
return "·";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.programmatic = 1programmatic:
return "prog";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.closeRequest = 2closeRequest:
return "esc";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.pressOutside = 3pressOutside:
return "press";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.releaseOutside = 4releaseOutside:
return "rel";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.outsideAnchor = 5outsideAnchor:
return "outanc";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.triggerReactivate = 6triggerReactivate:
return "trig";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.focusOutside = 7focusOutside:
return "focus";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.surfaceBlur = 8surfaceBlur:
return "blur";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.anchorGone = 9anchorGone:
return "GONE";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.unplaceable = 10unplaceable:
return "NOFIT";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.resize = 11resize:
return "resize";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.scroll = 12scroll:
return "scroll";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.siblingOpened = 13siblingOpened:
return "sib";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.parentClosed = 14parentClosed:
return "PARENT";
case (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.timeout = 15timeout:
return "time";
}
}
private struct (struct) anchored_overlays_dismissal_policy.FlagNameFlagName
{
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.FlagName.bitbit;
(alias) object.string = stringstring (field) string anchored_overlays_dismissal_policy.FlagName.namename;
}
private immutable (struct) anchored_overlays_dismissal_policy.FlagNameFlagName[] (immutable global) immutable(anchored_overlays_dismissal_policy.FlagName[]) anchored_overlays_dismissal_policy.flagNamesflagNames = [
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest, "closeRequest"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, "pressOutside"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside, "releaseOutside"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.outsideAnchor = cast(ushort)8uthe anchor's own cells count as OUTSIDE, not inside
outsideAnchor, "outsideAnchor"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate, "triggerReactivate"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.focusOutside = cast(ushort)32ufocusOutside, "focusOutside"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.surfaceBlur = cast(ushort)64uwindow/app deactivation — not detectable on the TUI
surfaceBlur, "surfaceBlur"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.anchorGone = cast(ushort)128umandatory: bypasses the policy word
anchorGone, "anchorGone"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.anchorClipped = cast(ushort)256uHIDES, does not close
anchorClipped, "anchorClipped"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.unplaceable = cast(ushort)512umandatory: the placement solver returned nothing
unplaceable, "unplaceable"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.resize = cast(ushort)1024uresize, "resize"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.scroll = cast(ushort)2048uscroll, "scroll"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.siblingOpened = cast(ushort)4096usiblingOpened, "siblingOpened"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.cascade = cast(ushort)8192umandatory: an ancestor is closing
cascade, "cascade"),
(struct) anchored_overlays_dismissal_policy.FlagNameFlagName((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.timeout = cast(ushort)16384uthe notify band's clock
timeout, "timeout"),
];
/// Render a flags word as `a|b|c`. A template, so the writer's attributes infer.
void void anchored_overlays_dismissal_policy.writeFlags!(sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false))(in anchored_overlays_dismissal_policy.DismissOn on, ref sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) w) pure nothrow @nogc @safeRender a flags word as a|b|c. A template, so the writer's attributes infer.
writeFlags(Writer)(in (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (parameter) const(anchored_overlays_dismissal_policy.DismissOn) onon, ref (alias) Writer = sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false)Writer (parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww)
{
bool (local variable) bool firstfirst = true;
foreach ((parameter) immutable(anchored_overlays_dismissal_policy.FlagName) fnfn; (immutable global) immutable(anchored_overlays_dismissal_policy.FlagName[]) anchored_overlays_dismissal_policy.flagNamesflagNames)
if (bool anchored_overlays_dismissal_policy.has(in anchored_overlays_dismissal_policy.DismissOn set, in anchored_overlays_dismissal_policy.DismissOn bit) pure nothrow @nogc @safehas((parameter) const(anchored_overlays_dismissal_policy.DismissOn) onon, (local variable) immutable(anchored_overlays_dismissal_policy.FlagName) fnfn.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.FlagName.bitbit))
{
if (!(local variable) bool firstfirst)
(parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww ~= '|';
(parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww ~= void sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false).opOpAssign!"~"(in char[] elements) pure nothrow @nogc @safeAppends elements from a slice using ~= operator.
fn.void sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false).opOpAssign!"~"(in char[] elements) pure nothrow @nogc @safeAppends elements from a slice using ~= operator.
name;
(local variable) bool firstfirst = false;
}
if ((local variable) bool firstfirst)
(parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww ~= "nothing";
}
// ---------------------------------------------------------------------------
// The presets — five roles, one type
// ---------------------------------------------------------------------------
/// The band a surface lives in. Only `popup` participates in the dismissal
/// stack: `hint` is HTML's separate hint list (tooltips, never a dismissal
/// parent) and `notify` is out of the stack entirely.
enum (enum) anchored_overlays_dismissal_policy.OverlayBandThe band a surface lives in. Only popup participates in the dismissal
stack: hint is HTML's separate hint list (tooltips, never a dismissal
parent) and notify is out of the stack entirely.
OverlayBand : ubyte
{
(enum value) anchored_overlays_dismissal_policy.OverlayBand.hint = cast(ubyte)0uhint,
(enum value) anchored_overlays_dismissal_policy.OverlayBand.popup = 1popup,
(enum value) anchored_overlays_dismissal_policy.OverlayBand.notify = 2notify,
}
immutable (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.tooltipDismisstooltipDismiss = (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy(
on: anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.focusOutside = cast(ushort)32ufocusOutside,
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.siblingOpened = cast(ushort)4096usiblingOpened, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.scroll = cast(ushort)2048uscroll, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.resize = cast(ushort)1024uresize),
group: 1,
);
immutable (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss = (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy(
on: anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside,
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.focusOutside = cast(ushort)32ufocusOutside, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.resize = cast(ushort)1024uresize),
group: 2,
);
immutable (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss = (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy(
on: anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside,
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.focusOutside = cast(ushort)32ufocusOutside, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.siblingOpened = cast(ushort)4096usiblingOpened,
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.resize = cast(ushort)1024uresize),
group: 7,
);
/// Qt's modal dialog: `CloseOnEscape` and nothing else — light dismiss off.
immutable (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.modalDismissQt's modal dialog: CloseOnEscape and nothing else — light dismiss off.
modalDismiss = (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy(
on: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest,
group: 4,
);
/// A notification toast is not in the dismissal stack and does not answer to the
/// pointer; it answers to its own clock.
immutable (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.notifierDismissA notification toast is not in the dismissal stack and does not answer to the
pointer; it answers to its own clock.
notifierDismiss = (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy(
on: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.timeout = cast(ushort)16384uthe notify band's clock
timeout,
group: 9,
);
/// The touch / WCAG-pointer-cancellation resolution of the same policy: act on
/// the release, never on the press (base-ui's per-pointer-type mode).
immutable (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.touchPopoverDismissThe touch / WCAG-pointer-cancellation resolution of the same policy: act on
the release, never on the press (base-ui's per-pointer-type mode).
touchPopoverDismiss = (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy(
on: anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.combine(const(anchored_overlays_dismissal_policy.DismissOn[]) flags...) pure nothrow @nogc @safecombine((enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest, (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside),
group: 2,
);
// ---------------------------------------------------------------------------
// A nested chain, for the cascade
// ---------------------------------------------------------------------------
enum (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent = (ulong) ulongsize_t.(constant) ulong ulong.max = 18446744073709551615LUmax;
struct (struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord
{
(alias) object.string = stringstring (field) string anchored_overlays_dismissal_policy.OverlayRecord.namename;
(enum) anchored_overlays_dismissal_policy.OverlayBandThe band a surface lives in. Only popup participates in the dismissal
stack: hint is HTML's separate hint list (tooltips, never a dismissal
parent) and notify is out of the stack entirely.
OverlayBand (field) anchored_overlays_dismissal_policy.OverlayBand anchored_overlays_dismissal_policy.OverlayRecord.bandband;
(alias) object.size_t = ulongsize_t (field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent = (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent; /// index into the open array
(struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect (field) sparkles.ui.geometry.Rect anchored_overlays_dismissal_policy.OverlayRecord.surfacesurface;
(struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (field) anchored_overlays_dismissal_policy.DismissPolicy anchored_overlays_dismissal_policy.OverlayRecord.policypolicy;
uint (field) uint anchored_overlays_dismissal_policy.OverlayRecord.openedFrameopenedFrame;
}
/// Strict ancestry over the open array — Avalonia's `IsChildOrThis` climb, on a
/// flat arena instead of a visual tree.
bool bool anchored_overlays_dismissal_policy.isDescendant(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, ulong candidate, ulong ancestor) pure nothrow @nogc @safeStrict ancestry over the open array — Avalonia's IsChildOrThis climb, on a
flat arena instead of a visual tree.
isDescendant(scope const (struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord[] (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord[]) openopen, (alias) object.size_t = ulongsize_t (parameter) ulong candidatecandidate, (alias) object.size_t = ulongsize_t (parameter) ulong ancestorancestor) @safe pure nothrow @nogc
{
if ((parameter) ulong candidatecandidate == (parameter) ulong ancestorancestor || (parameter) ulong ancestorancestor == (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent)
return false;
for ((alias) object.size_t = ulongsize_t (local variable) ulong ii = (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord[]) openopen[(parameter) ulong candidatecandidate].(field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent; i != noParent; i = open[i].parent)
if ((local variable) ulong ii == (parameter) ulong ancestorancestor)
return true;
return false;
}
/// Reverse paint order is reverse hit order: the last-opened surface wins a cell
/// it shares with anything beneath it (HoverState's "later target wins" rule,
/// which is also what keeps an overlay and its anchor from both answering true).
(alias) object.size_t = ulongsize_t ulong anchored_overlays_dismissal_policy.hitIndex(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) pure nothrow @nogc @safeReverse paint order is reverse hit order: the last-opened surface wins a cell
it shares with anything beneath it (HoverState's "later target wins" rule,
which is also what keeps an overlay and its anchor from both answering true).
hitIndex(scope const (struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord[] (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord[]) openopen, in (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point (parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pp) @safe pure nothrow @nogc
{
foreach_reverse ((parameter) ulong ii, const (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord) rr; (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord[]) openopen)
if ((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) sparkles.ui.geometry.Rect anchored_overlays_dismissal_policy.OverlayRecord.surfacesurface.bool sparkles.ui.geometry.Rect.contains(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) const pure nothrow @nogc @safetrue iff p lies inside the half-open rectangle.
contains((parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pp))
return (local variable) ulong ii;
return (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent;
}
/// The result of one truncation: what closes, in leaf-to-root order, and why.
struct (struct) anchored_overlays_dismissal_policy.CloseListThe result of one truncation: what closes, in leaf-to-root order, and why.
CloseList
{
(alias) object.size_t = ulongsize_t[8] (field) ulong[8] anchored_overlays_dismissal_policy.CloseList.indexindex;
(enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason[8] (field) anchored_overlays_dismissal_policy.DismissReason[8] anchored_overlays_dismissal_policy.CloseList.reasonreason;
(alias) object.size_t = ulongsize_t (field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength;
void void anchored_overlays_dismissal_policy.CloseList.add(ulong i, anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeadd((alias) object.size_t = ulongsize_t (parameter) ulong ii, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason (parameter) anchored_overlays_dismissal_policy.DismissReason rr) @safe pure nothrow @nogc
in ((field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength < (field) ulong[8] anchored_overlays_dismissal_policy.CloseList.indexindex.(constant) ulong ulong[8].length = 8LUlength, "the demo chain never exceeds 8 open surfaces")
{
(field) ulong[8] anchored_overlays_dismissal_policy.CloseList.indexindex[(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength] = (parameter) ulong ii;
(field) anchored_overlays_dismissal_policy.DismissReason[8] anchored_overlays_dismissal_policy.CloseList.reasonreason[(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength] = (parameter) anchored_overlays_dismissal_policy.DismissReason rr;
++(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength;
}
}
/**
Blink's `HideAllPopoversUntil`, in a flat arena: compute an ENDPOINT and close
everything above it, leaf to root. The endpoint itself stays open; `noParent`
means "the bare page", which closes the whole group.
The shallowest surface closed is the one the cause actually named; everything
above it closes because its parent did — which is the `parentClosed` reason,
mandatory and unvetoable.
*/
(struct) anchored_overlays_dismissal_policy.CloseListThe result of one truncation: what closes, in leaf-to-root order, and why.
CloseList anchored_overlays_dismissal_policy.CloseList anchored_overlays_dismissal_policy.truncateTo(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, ulong endpoint, ulong group, anchored_overlays_dismissal_policy.DismissReason cause) pure nothrow @nogc @safeBlink's HideAllPopoversUntil, in a flat arena: compute an ENDPOINT and close
everything above it, leaf to root. The endpoint itself stays open; noParent
means "the bare page", which closes the whole group.
The shallowest surface closed is the one the cause actually named; everything
above it closes because its parent did — which is the parentClosed reason,
mandatory and unvetoable.
truncateTo(scope const (struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord[] (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord[]) openopen, (alias) object.size_t = ulongsize_t (parameter) ulong endpointendpoint, (alias) object.size_t = ulongsize_t (parameter) ulong groupgroup,
(enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason (parameter) anchored_overlays_dismissal_policy.DismissReason causecause) @safe pure nothrow @nogc
{
(struct) anchored_overlays_dismissal_policy.CloseListThe result of one truncation: what closes, in leaf-to-root order, and why.
CloseList (local variable) anchored_overlays_dismissal_policy.CloseList closingclosing;
(alias) object.size_t = ulongsize_t (local variable) ulong shallowestshallowest = (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent;
foreach_reverse ((parameter) ulong ii, const (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord) rr; (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord[]) openopen)
{
const (local variable) const(bool) closescloses = (parameter) ulong endpointendpoint == (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent
? (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) anchored_overlays_dismissal_policy.DismissPolicy anchored_overlays_dismissal_policy.OverlayRecord.policypolicy.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group == (parameter) ulong groupgroup : bool anchored_overlays_dismissal_policy.isDescendant(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, ulong candidate, ulong ancestor) pure nothrow @nogc @safeStrict ancestry over the open array — Avalonia's IsChildOrThis climb, on a
flat arena instead of a visual tree.
isDescendant((parameter) const(anchored_overlays_dismissal_policy.OverlayRecord[]) openopen, (local variable) ulong ii, (parameter) ulong endpointendpoint);
if (!(local variable) const(bool) closescloses)
continue;
(local variable) anchored_overlays_dismissal_policy.CloseList closingclosing.void anchored_overlays_dismissal_policy.CloseList.add(ulong i, anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeadd((local variable) ulong ii, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.parentClosed = 14parentClosed);
(local variable) ulong shallowestshallowest = (local variable) ulong ii;
}
foreach ((local variable) ulong kk; 0 .. (local variable) anchored_overlays_dismissal_policy.CloseList closingclosing.(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength)
if ((local variable) anchored_overlays_dismissal_policy.CloseList closingclosing.(field) ulong[8] anchored_overlays_dismissal_policy.CloseList.indexindex[(local variable) ulong kk] == (local variable) ulong shallowestshallowest)
(local variable) anchored_overlays_dismissal_policy.CloseList closingclosing.(field) anchored_overlays_dismissal_policy.DismissReason[8] anchored_overlays_dismissal_policy.CloseList.reasonreason[(local variable) ulong kk] = (parameter) anchored_overlays_dismissal_policy.DismissReason causecause;
return (local variable) anchored_overlays_dismissal_policy.CloseList closingclosing;
}
// ---------------------------------------------------------------------------
/// The hit facts for a single-surface overlay, resolved from the last frame.
(struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit anchored_overlays_dismissal_policy.OverlayHit anchored_overlays_dismissal_policy.hitFor(in sparkles.ui.geometry.Rect surface, in sparkles.ui.geometry.Rect anchor, in anchored_overlays_dismissal_policy.DismissPolicy p, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) now, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) pressed, uint openedFrame) pure nothrow @nogc @safeThe hit facts for a single-surface overlay, resolved from the last frame.
hitFor(in (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect (parameter) const(sparkles.ui.geometry.Rect) surfacesurface, in (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect (parameter) const(sparkles.ui.geometry.Rect) anchoranchor, in (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) pp, in (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point (parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) nownow,
in (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point (parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pressedpressed, uint (parameter) uint openedFrameopenedFrame) @safe pure nothrow @nogc
=> (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit(
group: (parameter) const(sparkles.ui.geometry.Rect) surfacesurface.bool sparkles.ui.geometry.Rect.contains(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) const pure nothrow @nogc @safetrue iff p lies inside the half-open rectangle.
contains((parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) nownow) ? (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) pp.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group : 0,
pressGroup: (parameter) const(sparkles.ui.geometry.Rect) surfacesurface.bool sparkles.ui.geometry.Rect.contains(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) const pure nothrow @nogc @safetrue iff p lies inside the half-open rectangle.
contains((parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pressedpressed) || (parameter) const(sparkles.ui.geometry.Rect) anchoranchor.bool sparkles.ui.geometry.Rect.contains(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) const pure nothrow @nogc @safetrue iff p lies inside the half-open rectangle.
contains((parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pressedpressed) ? (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) pp.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group : 0,
insideAnchor: (parameter) const(sparkles.ui.geometry.Rect) anchoranchor.bool sparkles.ui.geometry.Rect.contains(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) const pure nothrow @nogc @safetrue iff p lies inside the half-open rectangle.
contains((parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) nownow),
openedFrame: (parameter) uint openedFrameopenedFrame,
);
(alias) object.string = stringstring string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept(in (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point (parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pp) @safe
{
import (package) stdstd.(module) std.formatThis package provides string formatting functionality using
printf style format strings.
Submodule Function Name Description package format Converts its arguments according to a format string into a string.
| package |
sformat |
Converts its arguments according to a format string into a buffer. |
| package |
FormatException |
Signals a problem while formatting. |
| write |
formattedWrite |
Converts its arguments according to a format string and writes
the result to an output range. |
| write |
formatValue |
Formats a value of any type according to a format specifier and
writes the result to an output range. |
| read |
formattedRead |
Reads an input range according to a format string and stores the read
values into its arguments. |
| read |
unformatValue |
Reads a value from the given input range and converts it according to
a format specifier. |
| spec |
FormatSpec |
A general handler for format strings. |
| spec |
singleSpec |
Helper function that returns a FormatSpec for a single format specifier. |
Limitation
This package does not support localization, but
adheres to the rounding mode of the floating point unit, if
available.
Format Strings
The functions contained in this package use format strings. A
format string describes the layout of another string for reading or
writing purposes. A format string is composed of normal text
interspersed with format specifiers. A format specifier starts
with a percentage sign '%', optionally followed by one or more
parameters and ends with a format indicator. A format
indicator may be a simple format character or a compound
indicator.
Format strings are composed according to the following grammar:
FormatString:
FormatStringItem FormatString
FormatStringItem:
Character
FormatSpecifier
FormatSpecifier:
'%' Parameters FormatIndicator
FormatIndicator:
FormatCharacter
CompoundIndicator
FormatCharacter:
see remark below
CompoundIndicator:
'(' FormatString '%)'
'(' FormatString '%|' Delimiter '%)'
Delimiter
empty
Character Delimiter
Parameters:
Position Flags Width Precision Separator
Position:
empty
Integer '$'**
*Integer* **':'** *Integer* **'$'
Integer ':' '$'**
*Flags*:
*empty*
*Flag* *Flags*
*Flag*:
**'-'**|**'+'**|**' '**|**'0'**|**'#'**|**'='**
*Width*:
*OptionalPositionalInteger*
*Precision*:
*empty*
**'.'** *OptionalPositionalInteger*
*Separator*:
*empty*
**','** *OptionalInteger*
**','** *OptionalInteger* **'?'**
*OptionalInteger*:
*empty*
*Integer*
**'*'**
*OptionalPositionalInteger*:
*OptionalInteger*
**'*'** *Integer* **'$'
Character
'%%'
AnyCharacterExceptPercent
Integer:
NonZeroDigit Digits
Digits:
empty
Digit Digits
NonZeroDigit:
'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
Digit:
'0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
Note
FormatCharacter is unspecified. It can be any character
that has no other purpose in this grammar, but it is
recommended to assign (lower- and uppercase) letters.
Note
The Parameters of a CompoundIndicator are currently
limited to a '-' flag.
Format Indicator
The format indicator can either be a single character or an
expression surrounded by '%(' and '%)'. It specifies the
basic manner in which a value will be formatted and is the minimum
requirement to format a value.
The following characters can be used as format characters:
FormatCharacter Semantics 's' To be formatted in a human readable format. Can be used with all types. 'c' To be formatted as a character. 'd' To be formatted as a signed decimal integer. 'u' To be formatted as a decimal image of the underlying bit representation. 'b' To be formatted as a binary image of the underlying bit representation. 'o' To be formatted as an octal image of the underlying bit representation. 'x' / 'X' To be formatted as a hexadecimal image of the underlying bit representation. 'e' / 'E' To be formatted as a real number in decimal scientific notation. 'f' / 'F' To be formatted as a real number in decimal natural notation. 'g' / 'G' To be formatted as a real number in decimal short notation. Depending on the number, a scientific notation or a natural notation is used. 'a' / 'A' To be formatted as a real number in hexadecimal scientific notation. 'r' To be formatted as raw bytes. The output may not be printable and depends on endianness.
The compound indicator can be used to describe compound types
like arrays or structs in more detail. A compound type is enclosed
within '%(' and '%)'. The enclosed sub-format string is
applied to individual elements. The trailing portion of the
sub-format string following the specifier for the element is
interpreted as the delimiter, and is therefore omitted following the
last element. The '%|' specifier may be used to explicitly
indicate the start of the delimiter, so that the preceding portion of
the string will be included following the last element.
The format string inside of the compound indicator should
contain exactly one format specifier (two in case of associative
arrays), which specifies the formatting mode of the elements of the
compound type. This format specifier can be a compound
indicator itself.
Note
Inside a compound indicator, strings and characters are
escaped automatically. To avoid this behavior, use "%-("
instead of "%(".
Flags
There are several flags that affect the outcome of the formatting.
Flag Semantics '-' When the formatted result is shorter than the value given by the width parameter, the output is left justified. Without the '-' flag, the output remains right justified.
There are two exceptions where the '-' flag has a
different meaning: (1) with 'r' it denotes to use little
endian and (2) in case of a compound indicator it means that
no special handling of the members is applied. |
| '=' |
When the formatted result is shorter than the value
given by the width parameter, the output is centered.
If the central position is not possible it is moved slightly
to the right. In this case, if '-' flag is present in
addition to the '=' flag, it is moved slightly to the left. |
| '+' / *' '* |
Applies to numerical values. By default, positive numbers are not
formatted to include the + sign. With one of these two flags present,
positive numbers are preceded by a plus sign or a space.
When both flags are present, a plus sign is used.
In case of 'r', a big endian format is used. |
| '0' |
Is applied to numerical values that are printed right justified.
If the zero flag is present, the space left to the number is
filled with zeros instead of spaces. |
| '#' |
Denotes that an alternative output must be used. This depends on the type
to be formatted and the format character used. See the
sections below for more information. |
Width, Precision and Separator
The width parameter specifies the minimum width of the result.
The meaning of precision depends on the format indicator. For
integers it denotes the minimum number of digits printed, for
real numbers it denotes the number of fractional digits and for
strings and compound types it denotes the maximum number of elements
that are included in the output.
A separator is used for formatting numbers. If it is specified,
the output is divided into chunks of three digits, separated by a ','. The number of digits in a chunk can be given explicitly by
providing a number or a ''* after the ','.
In all three cases the number of digits can be replaced by a ''*. In this scenario, the next argument is used as the number of
digits. If the argument is a negative number, the precision and
separator parameters are considered unspecified. For width,
the absolute value is used and the '-' flag is set.
The separator can also be followed by a '?'. In that case,
an additional argument is used to specify the symbol that should be
used to separate the chunks.
Position
By default, the arguments are processed in the provided order. With
the position parameter it is possible to address arguments
directly. It is also possible to denote a series of arguments with
two numbers separated by ':', that are all processed in the same
way. The second number can be omitted. In that case the series ends
with the last argument.
It's also possible to use positional arguments for width, precision and separator by adding a number and a '$' after the ''*.
Types
This section describes the result of combining types with format
characters. It is organized in 2 subsections: a list of general
information regarding the formatting of types in the presence of
format characters and a table that contains details for every
available combination of type and format character.
When formatting types, the following rules apply:
If the format character is upper case, the resulting string will
be formatted using upper case letters.
The default precision for floating point numbers is 6 digits.
Rounding of floating point numbers adheres to the rounding mode
of the floating point unit, if available.
The floating point values NaN and Infinity are formatted as
nan and inf, possibly preceded by '+' or '-' sign.
Formatting reals is only supported for 64 bit reals and 80 bit reals.
All other reals are cast to double before they are formatted. This will
cause the result to be inf for very large numbers.
Characters and strings formatted with the 's' format character
inside of compound types are surrounded by single and double quotes
and unprintable characters are escaped. To avoid this, a '-'
flag can be specified for the compound specifier
(e.g. "%-(%s%)" instead of "%(%s%)" ).
Structs, unions, classes and interfaces are formatted by calling a
toString method if available.
See module std.format.write for more
details.
Only part of these combinations can be used for reading. See
module std.format.read for more
detailed information.
This table contains descriptions for every possible combination of
type and format character:
<th scope="col" width="20%">Type</th> <th scope="col" width="20%">Format Character</th> Formatted as... <td rowspan="1">null</td> 's' null
|<td rowspan="3">bool</td> 's' |
false or true |
| 'b', 'd', 'o', 'u', 'x', 'X' |
As the integrals 0 or 1 with the same format character.
Please note, that 'o' and 'x' with '#' flag
might produce unexpected results due to special handling of
the value 0. |
| 'r' |
\0 or \1 |
|<td rowspan="4">Integral</td> 's', 'd' |
A signed decimal number. The '#' flag is ignored. |
| 'b', 'o', 'u', 'x', 'X' |
An unsigned binary, decimal, octal or hexadecimal number.
In case of 'o' and 'x', the '#' flag
denotes that the number must be preceded by 0 and 0x, with
the exception of the value 0, where this does not apply. For
'b' and 'u' the '#' flag has no effect. |
| 'e', 'E', 'f', 'F', 'g', 'G', 'a', 'A' |
As a floating point value with the same specifier.
Default precision is large enough to add all digits
of the integral value.
In case of 'a' and 'A', the integral digit can be
any hexadecimal digit.
|
| 'r' |
Characters taken directly from the binary representation. |
|<td rowspan="5">Floating Point</td> 'e', 'E' |
Scientific notation: Exactly one integral digit followed by a dot
and fractional digits, followed by the exponent.
The exponent is formatted as 'e' followed by
a '+' or '-' sign, followed by at least
two digits.
When there are no fractional digits and the '#' flag
is not present, the dot is omitted. |
| 'f', 'F' |
Natural notation: Integral digits followed by a dot and
fractional digits.
When there are no fractional digits and the '#' flag
is not present, the dot is omitted.
Please note: the difference between 'f' and 'F'
is only visible for NaN and Infinity. |
| 's', 'g', 'G' |
Short notation: If the absolute value is larger than 10 ^^ precision
or smaller than 0.0001, the scientific notation is used.
If not, the natural notation is applied.
In both cases precision denotes the count of all digits, including
the integral digits. Trailing zeros (including a trailing dot) are removed.
If '#' flag is present, trailing zeros are not removed. |
| 'a', 'A' |
Hexadecimal scientific notation: 0x followed by 1
(or 0 in case of value zero or denormalized number)
followed by a dot, fractional digits in hexadecimal
notation and an exponent. The exponent is build by p,
followed by a sign and the exponent in decimal notation.
When there are no fractional digits and the '#' flag
is not present, the dot is omitted. |
| 'r' |
Characters taken directly from the binary representation. |
|<td rowspan="3">Character</td> 's', 'c' |
As the character.
Inside of a compound indicator 's' is treated differently: The
character is surrounded by single quotes and non printable
characters are escaped. This can be avoided by preceding
the compound indicator with a '-' flag
(e.g. "%-(%s%)"). |
| 'b', 'd', 'o', 'u', 'x', 'X' |
As the integral that represents the character. |
| 'r' |
Characters taken directly from the binary representation. |
|<td rowspan="3">String</td> 's' |
The sequence of characters that form the string.
Inside of a compound indicator the string is surrounded by double quotes
and non printable characters are escaped. This can be avoided
by preceding the compound indicator with a '-' flag
(e.g. "%-(%s%)"). |
| 'r' |
The sequence of characters, each formatted with 'r'. |
| compound |
As an array of characters. |
|<td rowspan="3">Array</td> 's' |
When the elements are characters, the array is formatted as
a string. In all other cases the array is surrounded by square brackets
and the elements are separated by a comma and a space. If the elements
are strings, they are surrounded by double quotes and non
printable characters are escaped. |
| 'r' |
The sequence of the elements, each formatted with 'r'. |
| compound |
The sequence of the elements, each formatted according to the specifications
given inside of the compound specifier. |
|<td rowspan="2">Associative Array</td> 's' |
As a sequence of the elements in unpredictable order. The output is
surrounded by square brackets. The elements are separated by a
comma and a space. The elements are formatted as key:value. |
| compound |
As a sequence of the elements in unpredictable order. Each element
is formatted according to the specifications given inside of the
compound specifier. The first specifier is used for formatting
the key and the second specifier is used for formatting the value.
The order can be changed with positional arguments. For example
"%(%2$s (%1$s), %)" will write the value, followed by the key in
parenthesis. |
|<td rowspan="2">Enum</td> 's' |
The name of the value. If the name is not available, the base value
is used, preceeded by a cast. |
| All, but 's' |
Enums can be formatted with all format characters that can be used
with the base value. In that case they are formatted like the base value. |
|<td rowspan="3">Input Range</td> 's' |
When the elements of the range are characters, they are written like a string.
In all other cases, the elements are enclosed by square brackets and separated
by a comma and a space. |
| 'r' |
The sequence of the elements, each formatted with 'r'. |
| compound |
The sequence of the elements, each formatted according to the specifications
given inside of the compound specifier. |
|<td rowspan="1">Struct</td> 's' |
When the struct has neither an applicable toString
nor is an input range, it is formatted as follows:
StructType(field1, field2, ...). |
|<td rowspan="1">Class</td> 's' |
When the class has neither an applicable toString
nor is an input range, it is formatted as the
fully qualified name of the class. |
|<td rowspan="1">Union</td> 's' |
When the union has neither an applicable toString
nor is an input range, it is formatted as its base name. |
|<td rowspan="2">Pointer</td> 's' |
A null pointer is formatted as 'null'. All other pointers are
formatted as hexadecimal numbers with the format character 'X'. |
| 'x', 'X' |
Formatted as a hexadecimal number. |
|<td rowspan="3">SIMD vector</td> 's' |
The array is surrounded by square brackets
and the elements are separated by a comma and a space. |
| 'r' |
The sequence of the elements, each formatted with 'r'. |
| compound |
The sequence of the elements, each formatted according to the specifications
given inside of the compound specifier. |
|<td rowspan="1">Delegate</td> 's', 'r', compound |
As the .stringof of this delegate treated as a string.
Please note: The implementation is currently buggy
and its use is discouraged. |
Source
std/format/package.d
Examples
Simple use:
// Easiest way is to use `%s` everywhere:
assert(format("I got %s %s for %s euros.", 30, "eggs", 5.27) == "I got 30 eggs for 5.27 euros.");
// Other format characters provide more control:
assert(format("I got %b %(%X%) for %f euros.", 30, "eggs", 5.27) == "I got 11110 65676773 for 5.270000 euros.");
Compound specifiers allow formatting arrays and other compound types:
/*
The trailing end of the sub-format string following the specifier for
each item is interpreted as the array delimiter, and is therefore
omitted following the last array item:
*/
assert(format("My items are %(%s %).", [1,2,3]) == "My items are 1 2 3.");
assert(format("My items are %(%s, %).", [1,2,3]) == "My items are 1, 2, 3.");
/*
The "%|" delimiter specifier may be used to indicate where the
delimiter begins, so that the portion of the format string prior to
it will be retained in the last array element:
*/
assert(format("My items are %(-%s-%|, %).", [1,2,3]) == "My items are -1-, -2-, -3-.");
/*
These compound format specifiers may be nested in the case of a
nested array argument:
*/
auto mat = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]];
assert(format("%(%(%d %) - %)", mat), "1 2 3 - 4 5 6 - 7 8 9");
assert(format("[%(%(%d %) - %)]", mat), "[1 2 3 - 4 5 6 - 7 8 9]");
assert(format("[%([%(%d %)]%| - %)]", mat), "[1 2 3] - [4 5 6] - [7 8 9]");
/*
Strings and characters are escaped automatically inside compound
format specifiers. To avoid this behavior, use "%-(" instead of "%(":
*/
assert(format("My friends are %s.", ["John", "Nancy"]) == `My friends are ["John", "Nancy"].`);
assert(format("My friends are %(%s, %).", ["John", "Nancy"]) == `My friends are "John", "Nancy".`);
assert(format("My friends are %-(%s, %).", ["John", "Nancy"]) == `My friends are John, Nancy.`);
Using parameters:
// Flags can be used to influence to outcome:
assert(format("%g != %+#g", 3.14, 3.14) == "3.14 != +3.14000");
// Width and precision help to arrange the formatted result:
assert(format(">%10.2f<", 1234.56789) == "> 1234.57<");
// Numbers can be grouped:
assert(format("%,4d", int.max) == "21,4748,3647");
// It's possible to specify the position of an argument:
assert(format("%3$s %1$s", 3, 17, 5) == "5 3");
Providing parameters as arguments:
// Width as argument
assert(format(">%*s<", 10, "abc") == "> abc<");
// Precision as argument
assert(format(">%.*f<", 5, 123.2) == ">123.20000<");
// Grouping as argument
assert(format("%,*d", 1, int.max) == "2,1,4,7,4,8,3,6,4,7");
// Grouping separator as argument
assert(format("%,3?d", '_', int.max) == "2_147_483_647");
// All at once
assert(format("%*.*,*?d", 20, 15, 6, '/', int.max) == " 000/002147/483647");
format : (alias template) format = std.format.format(Char, Args...)(in Char[] fmt, Args args) if (isSomeChar!Char)Converts its arguments according to a format string into a string.
The second version of format takes the format string as template
argument. In this case, it is checked for consistency at
compile-time and produces slightly faster code, because the length of
the output buffer can be estimated in advance.
Params:
fmt = a $(MREF_ALTTEXT format string, std,format)
args = a variadic list of arguments to be formatted
Char = character type of fmt
Args = a variadic list of types of the arguments
Returns:
The formatted string.
Throws:
A $(LREF FormatException) if formatting did not succeed.
See_Also:
$(LREF sformat) for a variant, that tries to avoid garbage collection.
format;
return string std.format.format!("(%d,%d)", const(int), const(int))(const(int) __param_0, const(int) __param_1) pure @safeExamples
The format string can be checked at compile-time:
auto s = format!"%s is %s"("Pi", 3.14);
assert(s == "Pi is 3.14");
// This line doesn't compile, because 3.14 cannot be formatted with %d:
// s = format!"%s is %d"("Pi", 3.14);
format!"(%d,%d)"((parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pp.(field) int sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]).xx, (parameter) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) pp.(field) int sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]).yy);
}
/// Pad a table cell to `width` display columns. `cellsOf` is the toolkit's one
/// width authority — `%-7s` would pad by BYTES and skew every column holding a
/// multi-byte `·`.
void void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(Writer)(ref (alias) Writer = sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false)Writer (parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww, scope const(char)[] (parameter) const(char)[] ss, (alias) object.size_t = ulongsize_t (parameter) ulong widthwidth, bool (parameter) bool leftAlignleftAlign = false)
{
const (local variable) const(ulong) usedused = ulong sparkles.ui.geometry.cellsOf(scope const(char)[] s) pure nothrow @nogc @safeThe display-column width of s — the one width authority for the whole
library, so the GUI painter, the TUI cell grid, and the layout pass never drift
sub-cell.
Counts one column per codepoint (a UTF-8 lead byte, i.e. every byte whose top
two bits are not 10), matching the grid advance drawText and the terminal
use today. @safe pure nothrow @nogc; invalid UTF-8 degrades to a lead-byte
count rather than throwing.
cellsOf((parameter) const(char)[] ss);
const (local variable) const(ulong) padpad = (parameter) ulong widthwidth > (local variable) const(ulong) usedused ? (parameter) ulong widthwidth - (local variable) const(ulong) usedused : 0;
if ((parameter) bool leftAlignleftAlign)
(parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww ~= void sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false).opOpAssign!"~"(in char[] elements) pure nothrow @nogc @safeAppends elements from a slice using ~= operator.
s;
foreach ((local variable) ulong __; 0 .. (local variable) const(ulong) padpad)
(parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww ~= ' ';
if (!(parameter) bool leftAlignleftAlign)
(parameter) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) ww ~= void sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false).opOpAssign!"~"(in char[] elements) pure nothrow @nogc @safeAppends elements from a slice using ~= operator.
s;
}
void void D main() @safemain() @safe
{
// -----------------------------------------------------------------------
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("=== 1. Five roles, one type ===");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Dismissal is not five behaviours; it is one evaluator and five values.");
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
static struct (struct) anchored_overlays_dismissal_policy.main.PresetPreset
{
(alias) object.string = stringstring (field) string anchored_overlays_dismissal_policy.main.Preset.namename;
(struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (field) anchored_overlays_dismissal_policy.DismissPolicy anchored_overlays_dismissal_policy.main.Preset.policypolicy;
}
const (local variable) const(anchored_overlays_dismissal_policy.main.Preset[]) presetspresets = [
(struct) anchored_overlays_dismissal_policy.main.PresetPreset("tooltip", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.tooltipDismisstooltipDismiss),
(struct) anchored_overlays_dismissal_policy.main.PresetPreset("popover", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss),
(struct) anchored_overlays_dismissal_policy.main.PresetPreset("menu", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss),
(struct) anchored_overlays_dismissal_policy.main.PresetPreset("modal", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.modalDismissQt's modal dialog: CloseOnEscape and nothing else — light dismiss off.
modalDismiss),
(struct) anchored_overlays_dismissal_policy.main.PresetPreset("notifier", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.notifierDismissA notification toast is not in the dismissal stack and does not answer to the
pointer; it answers to its own clock.
notifierDismiss),
];
foreach ((parameter) const(anchored_overlays_dismissal_policy.main.Preset) pp; (local variable) const(anchored_overlays_dismissal_policy.main.Preset[]) presetspresets)
{
(struct) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer!(char, 256) (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf;
void anchored_overlays_dismissal_policy.writeFlags!(sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false))(in anchored_overlays_dismissal_policy.DismissOn on, ref sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) w) pure nothrow @nogc @safeRender a flags word as a|b|c. A template, so the writer's attributes infer.
writeFlags((local variable) const(anchored_overlays_dismissal_policy.main.Preset) pp.(field) anchored_overlays_dismissal_policy.DismissPolicy anchored_overlays_dismissal_policy.main.Preset.policypolicy.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.DismissPolicy.onon, (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf);
void std.stdio.writefln!(" %-9s group %d on = %s", string, const(ulong), char[])(string __param_0, const(ulong) __param_1, char[] __param_2) @safeEquivalent to writef(fmt, args, '\n').
writefln!" %-9s group %d on = %s"((local variable) const(anchored_overlays_dismissal_policy.main.Preset) pp.(field) string anchored_overlays_dismissal_policy.main.Preset.namename, (local variable) const(anchored_overlays_dismissal_policy.main.Preset) pp.(field) anchored_overlays_dismissal_policy.DismissPolicy anchored_overlays_dismissal_policy.main.Preset.policypolicy.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group, (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf[]);
}
// -----------------------------------------------------------------------
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n=== 2. The decision matrix: policy word AND router-offered cause ===");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Cell = the DismissReason the surface returns. `·` = the cause was offered");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("and declined. UPPERCASE = a MANDATORY cause that bypassed the policy word.");
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
static struct (struct) anchored_overlays_dismissal_policy.main.CauseCause
{
(alias) object.string = stringstring (field) string anchored_overlays_dismissal_policy.main.Cause.labellabel;
(enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn (field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.main.Cause.bitbit;
}
const (local variable) const(anchored_overlays_dismissal_policy.main.Cause[]) causescauses = [
(struct) anchored_overlays_dismissal_policy.main.CauseCause("esc", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("press", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("rel", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("trig", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("focus", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.focusOutside = cast(ushort)32ufocusOutside),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("gone", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.anchorGone = cast(ushort)128umandatory: bypasses the policy word
anchorGone),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("sib", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.siblingOpened = cast(ushort)4096usiblingOpened),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("parent", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.cascade = cast(ushort)8192umandatory: an ancestor is closing
cascade),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("time", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.timeout = cast(ushort)16384uthe notify band's clock
timeout),
(struct) anchored_overlays_dismissal_policy.main.CauseCause("resize", (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.resize = cast(ushort)1024uresize),
];
// The canonical matrix hit: the bare page, pressed and released there, with
// the surface long since opened — so nothing but the policy word decides.
const (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) outsideHitoutsideHit = (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit(group: 0, pressGroup: 0, insideAnchor: false, openedFrame: 0);
const (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) frameframe = (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.nothing = cast(ushort)0unothing, frame: 42);
{
(struct) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer!(char, 256) (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) headhead;
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) headhead ~= " ";
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) headhead.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell("policy", 9, true);
foreach ((parameter) const(anchored_overlays_dismissal_policy.main.Cause) cc; (local variable) const(anchored_overlays_dismissal_policy.main.Cause[]) causescauses)
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) headhead.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell((local variable) const(anchored_overlays_dismissal_policy.main.Cause) cc.(field) string anchored_overlays_dismissal_policy.main.Cause.labellabel, 7);
void std.stdio.writeln!(char[])(char[] __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln((local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) headhead[]);
}
foreach ((parameter) const(anchored_overlays_dismissal_policy.main.Preset) pp; (local variable) const(anchored_overlays_dismissal_policy.main.Preset[]) presetspresets)
{
(struct) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer!(char, 256) (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) rowrow;
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) rowrow ~= " ";
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell((local variable) const(anchored_overlays_dismissal_policy.main.Preset) pp.(field) string anchored_overlays_dismissal_policy.main.Preset.namename, 9, true);
foreach ((parameter) const(anchored_overlays_dismissal_policy.main.Cause) cc; (local variable) const(anchored_overlays_dismissal_policy.main.Cause[]) causescauses)
{
const (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) ee = (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (local variable) const(anchored_overlays_dismissal_policy.main.Cause) cc.(field) anchored_overlays_dismissal_policy.DismissOn anchored_overlays_dismissal_policy.main.Cause.bitbit, frame: (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) frameframe.(field) uint anchored_overlays_dismissal_policy.DismissEvent.framethe frame this event is being routed on
frame);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((local variable) const(anchored_overlays_dismissal_policy.main.Preset) pp.(field) anchored_overlays_dismissal_policy.DismissPolicy anchored_overlays_dismissal_policy.main.Preset.policypolicy, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) ee, (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) outsideHitoutsideHit)), 7);
}
void std.stdio.writeln!(char[])(char[] __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln((local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) rowrow[]);
}
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" A modal dialog declines every light-dismiss cause and still closes on");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" GONE/PARENT; a notifier declines the pointer entirely and answers only");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" its clock. No branch anywhere selected that — the value did.");
// -----------------------------------------------------------------------
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n=== 3. The close request is one input, and it is a key DOWN ===");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("`isDismiss` (INP13) already unifies Escape and the Android back key, and");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("already excludes releases — the HTML spec makes down-only normative.");
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
(struct) sparkles.input.events.KeyEventA key event: a named key, or a printable code point (key == Key.char_, code
point in ch) — which is also how text input arrives.
unshifted and text exist for the one consumer that cannot work without
them: a terminal emulator's key encoder, which reports the layout-independent
key that was struck and the characters it produced, together. Delivering
the text as a separate event cannot express that pairing — which keystroke
produced which text — so it rides here.
The three fields are appended, so every existing construction and helper keeps
its meaning; KeyAction.press and a zero unshifted describe what producers
reported before.
KeyEvent (local variable) sparkles.input.events.KeyEvent escUpescUp = (struct) sparkles.input.events.KeyEventA key event: a named key, or a printable code point (key == Key.char_, code
point in ch) — which is also how text input arrives.
unshifted and text exist for the one consumer that cannot work without
them: a terminal emulator's key encoder, which reports the layout-independent
key that was struck and the characters it produced, together. Delivering
the text as a separate event cannot express that pairing — which keystroke
produced which text — so it rides here.
The three fields are appended, so every existing construction and helper keeps
its meaning; KeyAction.press and a zero unshifted describe what producers
reported before.
KeyEvent((enum) sparkles.input.events.KeyA decoded key. char_ carries a printable code point in KeyEvent.ch; the
rest are named keys.
Key.(enum value) sparkles.input.events.Key.escape = 15escape);
(local variable) sparkles.input.events.KeyEvent escUpescUp.(field) sparkles.input.events.KeyAction sparkles.input.events.KeyEvent.actionpress (the default), auto-repeat, or release
action = (enum) sparkles.input.events.KeyActionWhat a key did (INP15).
A terminal cannot report release at all, so a consumer that needs the level of
a held key must ask InputCapabilities.keyRelease and offer another route where
it is absent — the TGT5 rule, applied to keys. press is the default, so a
producer that has not thought about this reports what it always did.
KeyAction.(enum value) sparkles.input.events.KeyAction.release = 2the key came up
release;
const (local variable) const(sparkles.input.events.KeyEvent[]) strokesstrokes = [(struct) sparkles.input.events.KeyEventA key event: a named key, or a printable code point (key == Key.char_, code
point in ch) — which is also how text input arrives.
unshifted and text exist for the one consumer that cannot work without
them: a terminal emulator's key encoder, which reports the layout-independent
key that was struck and the characters it produced, together. Delivering
the text as a separate event cannot express that pairing — which keystroke
produced which text — so it rides here.
The three fields are appended, so every existing construction and helper keeps
its meaning; KeyAction.press and a zero unshifted describe what producers
reported before.
KeyEvent((enum) sparkles.input.events.KeyA decoded key. char_ carries a printable code point in KeyEvent.ch; the
rest are named keys.
Key.(enum value) sparkles.input.events.Key.escape = 15escape), (local variable) sparkles.input.events.KeyEvent escUpescUp, (struct) sparkles.input.events.KeyEventA key event: a named key, or a printable code point (key == Key.char_, code
point in ch) — which is also how text input arrives.
unshifted and text exist for the one consumer that cannot work without
them: a terminal emulator's key encoder, which reports the layout-independent
key that was struck and the characters it produced, together. Delivering
the text as a separate event cannot express that pairing — which keystroke
produced which text — so it rides here.
The three fields are appended, so every existing construction and helper keeps
its meaning; KeyAction.press and a zero unshifted describe what producers
reported before.
KeyEvent((enum) sparkles.input.events.KeyA decoded key. char_ carries a printable code point in KeyEvent.ch; the
rest are named keys.
Key.(enum value) sparkles.input.events.Key.back = 28back), (struct) sparkles.input.events.KeyEventA key event: a named key, or a printable code point (key == Key.char_, code
point in ch) — which is also how text input arrives.
unshifted and text exist for the one consumer that cannot work without
them: a terminal emulator's key encoder, which reports the layout-independent
key that was struck and the characters it produced, together. Delivering
the text as a separate event cannot express that pairing — which keystroke
produced which text — so it rides here.
The three fields are appended, so every existing construction and helper keeps
its meaning; KeyAction.press and a zero unshifted describe what producers
reported before.
KeyEvent((enum) sparkles.input.events.KeyA decoded key. char_ carries a printable code point in KeyEvent.ch; the
rest are named keys.
Key.(enum value) sparkles.input.events.Key.char_ = 1char_, 'q')];
const (local variable) const(string[]) strokeNamesstrokeNames = ["Escape down", "Escape up", "Back down", "'q' down"];
foreach ((parameter) ulong ii, (parameter) const(sparkles.input.events.KeyEvent) kk; (local variable) const(sparkles.input.events.KeyEvent[]) strokesstrokes)
{
const (local variable) const(anchored_overlays_dismissal_policy.DismissOn) causecause = bool sparkles.input.events.isDismiss(in sparkles.input.events.KeyEvent k) pure nothrow @nogc @safetrue for the platform spellings of "go back / dismiss" (INP13): Escape
on desktop and in the terminal, the system back key on Android.
The framework owns the equivalence; the application owns the chain. hue
dismisses a hover popup, then the explorer, then quits — that ordering is
hue's, and a different app would nest differently. q is deliberately not
here: "q quits" is a keybinding, not a platform spelling of dismiss.
isDismiss((local variable) const(sparkles.input.events.KeyEvent) kk) ? (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.closeRequest = cast(ushort)1uisDismiss — Escape and the Android back key (INP13)
closeRequest : (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.nothing = cast(ushort)0unothing;
if ((local variable) const(anchored_overlays_dismissal_policy.DismissOn) causecause == (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.nothing = cast(ushort)0unothing)
{
void std.stdio.writefln!(" %-12s -> no cause offered popover: \xc2\xb7", string)(string __param_0) @safeEquivalent to writef(fmt, args, '\n').
writefln!" %-12s -> no cause offered popover: ·"((local variable) const(string[]) strokeNamesstrokeNames[(local variable) ulong ii]);
continue;
}
const (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) ee = (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (local variable) const(anchored_overlays_dismissal_policy.DismissOn) causecause, frame: 42);
void std.stdio.writefln!(" %-12s -> DismissOn.closeRequest popover: %s", string, string)(string __param_0, string __param_1) @safeEquivalent to writef(fmt, args, '\n').
writefln!" %-12s -> DismissOn.closeRequest popover: %s"(
(local variable) const(string[]) strokeNamesstrokeNames[(local variable) ulong ii], string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) ee, (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) outsideHitoutsideHit)));
}
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" (An Escape release must not dismiss a second time — an app that closed a");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" popup on the press would otherwise close the popup AND quit per stroke.)");
// -----------------------------------------------------------------------
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n=== 4. The press/release pairing ===");
// A popover on a trigger, both rectangles in abstract cells. Coordinates may
// legitimately be negative: content scrolled left of the viewport still
// hit-tests, and the pairing must survive it.
const (local variable) const(sparkles.ui.geometry.Rect) surfacesurface = (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect(20, 6, 24, 5);
const (local variable) const(sparkles.ui.geometry.Rect) anchoranchor = (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect(18, 4, 6, 1);
const (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) insideinside = (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(30, 8);
const (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outsideoutside = (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(4, 12);
const (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outside2outside2 = (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(7, 13);
const (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) scrolledOffscrolledOff = (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(-3, 2); // left of the viewport origin — not clamped
void std.stdio.writefln!(" surface %s..%s anchor %s..%s", string, string, string, string)(string __param_0, string __param_1, string __param_2, string __param_3) @safeEquivalent to writef(fmt, args, '\n').
writefln!" surface %s..%s anchor %s..%s"(
string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((local variable) const(sparkles.ui.geometry.Rect) surfacesurface.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) sparkles.ui.geometry.Rect.originthe top-left corner
origin), string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]).this(int[2] values...) pure nothrow @nogc ref @safeInitializes the first i components from constructor arguments.
surface.int sparkles.ui.geometry.Rect.right() const pure nothrow @nogc @safeRight edge (exclusive) and bottom edge (exclusive).
right, (local variable) const(sparkles.ui.geometry.Rect) surfacesurface.int sparkles.ui.geometry.Rect.bottom() const pure nothrow @nogc @safeRight edge (exclusive) and bottom edge (exclusive).
bottom)),
string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((local variable) const(sparkles.ui.geometry.Rect) anchoranchor.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) sparkles.ui.geometry.Rect.originthe top-left corner
origin), string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]).this(int[2] values...) pure nothrow @nogc ref @safeInitializes the first i components from constructor arguments.
anchor.int sparkles.ui.geometry.Rect.right() const pure nothrow @nogc @safeRight edge (exclusive) and bottom edge (exclusive).
right, (local variable) const(sparkles.ui.geometry.Rect) anchoranchor.int sparkles.ui.geometry.Rect.bottom() const pure nothrow @nogc @safeRight edge (exclusive) and bottom edge (exclusive).
bottom)));
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" press at release at press phase release phase release-only policy");
static struct (struct) anchored_overlays_dismissal_policy.main.PairingPairing
{
(struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point (field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.presspress, (field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.releaserelease;
}
const (local variable) const(anchored_overlays_dismissal_policy.main.Pairing[]) pairingspairings = [
(struct) anchored_overlays_dismissal_policy.main.PairingPairing((local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outsideoutside, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outside2outside2),
(struct) anchored_overlays_dismissal_policy.main.PairingPairing((local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outsideoutside, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) insideinside),
(struct) anchored_overlays_dismissal_policy.main.PairingPairing((local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) insideinside, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outsideoutside),
(struct) anchored_overlays_dismissal_policy.main.PairingPairing((local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) insideinside, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) insideinside),
(struct) anchored_overlays_dismissal_policy.main.PairingPairing((local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) scrolledOffscrolledOff, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) scrolledOffscrolledOff),
];
foreach ((parameter) const(anchored_overlays_dismissal_policy.main.Pairing) prpr; (local variable) const(anchored_overlays_dismissal_policy.main.Pairing[]) pairingspairings)
{
const (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) pressHitpressHit = anchored_overlays_dismissal_policy.OverlayHit anchored_overlays_dismissal_policy.hitFor(in sparkles.ui.geometry.Rect surface, in sparkles.ui.geometry.Rect anchor, in anchored_overlays_dismissal_policy.DismissPolicy p, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) now, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) pressed, uint openedFrame) pure nothrow @nogc @safeThe hit facts for a single-surface overlay, resolved from the last frame.
hitFor((local variable) const(sparkles.ui.geometry.Rect) surfacesurface, (local variable) const(sparkles.ui.geometry.Rect) anchoranchor, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.presspress, (local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.presspress, 0);
const (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) relHitrelHit = anchored_overlays_dismissal_policy.OverlayHit anchored_overlays_dismissal_policy.hitFor(in sparkles.ui.geometry.Rect surface, in sparkles.ui.geometry.Rect anchor, in anchored_overlays_dismissal_policy.DismissPolicy p, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) now, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) pressed, uint openedFrame) pure nothrow @nogc @safeThe hit facts for a single-surface overlay, resolved from the last frame.
hitFor((local variable) const(sparkles.ui.geometry.Rect) surfacesurface, (local variable) const(sparkles.ui.geometry.Rect) anchoranchor, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.releaserelease, (local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.presspress, 0);
const (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) pressEvpressEv = (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, frame: 42);
const (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) relEvrelEv = (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside, frame: 42);
const (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) touchHittouchHit = anchored_overlays_dismissal_policy.OverlayHit anchored_overlays_dismissal_policy.hitFor(in sparkles.ui.geometry.Rect surface, in sparkles.ui.geometry.Rect anchor, in anchored_overlays_dismissal_policy.DismissPolicy p, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) now, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) pressed, uint openedFrame) pure nothrow @nogc @safeThe hit facts for a single-surface overlay, resolved from the last frame.
hitFor((local variable) const(sparkles.ui.geometry.Rect) surfacesurface, (local variable) const(sparkles.ui.geometry.Rect) anchoranchor, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.touchPopoverDismissThe touch / WCAG-pointer-cancellation resolution of the same policy: act on
the release, never on the press (base-ui's per-pointer-type mode).
touchPopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.releaserelease, (local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.presspress, 0);
(struct) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer!(char, 128) (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow;
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow ~= " ";
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.presspress), 11, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((local variable) const(anchored_overlays_dismissal_policy.main.Pairing) prpr.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) anchored_overlays_dismissal_policy.main.Pairing.releaserelease), 14, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) pressEvpressEv, (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) pressHitpressHit)), 14, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) relEvrelEv, (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) relHitrelHit)), 16, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.touchPopoverDismissThe touch / WCAG-pointer-cancellation resolution of the same policy: act on
the release, never on the press (base-ui's per-pointer-type mode).
touchPopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) relEvrelEv, (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) touchHittouchHit)), 1, true);
void std.stdio.writeln!(char[])(char[] __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln((local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow[]);
}
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" Row 2: pressed outside, released INSIDE — the release declines (a drag");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" that ends on the surface is not a dismissal).");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" Row 3: pressed INSIDE, released outside — the release declines too, on");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" the latched press group. This is the drag-to-select-text case the");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" WCAG pointer-cancellation comment in Blink exists for.");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" Row 5: negative cell coordinates hit-test like any other — the point is");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" outside the surface, not clamped onto its edge.");
// The two behaviours, pinned. `checked` keeps assertions live.
{
const (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) relEvrelEv = (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.releaseOutside = cast(ushort)4ureleaseOutside, frame: 42);
assert(!bool anchored_overlays_dismissal_policy.dismisses(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe boolean face of dismissedBy — the predicate the router calls when
it only needs to know whether to plan a close.
dismisses((immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) relEvrelEv,
anchored_overlays_dismissal_policy.OverlayHit anchored_overlays_dismissal_policy.hitFor(in sparkles.ui.geometry.Rect surface, in sparkles.ui.geometry.Rect anchor, in anchored_overlays_dismissal_policy.DismissPolicy p, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) now, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) pressed, uint openedFrame) pure nothrow @nogc @safeThe hit facts for a single-surface overlay, resolved from the last frame.
hitFor((local variable) const(sparkles.ui.geometry.Rect) surfacesurface, (local variable) const(sparkles.ui.geometry.Rect) anchoranchor, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outsideoutside, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) insideinside, 0)),
"press inside / release outside must not dismiss");
assert(!bool anchored_overlays_dismissal_policy.dismisses(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe boolean face of dismissedBy — the predicate the router calls when
it only needs to know whether to plan a close.
dismisses((immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) relEvrelEv,
anchored_overlays_dismissal_policy.OverlayHit anchored_overlays_dismissal_policy.hitFor(in sparkles.ui.geometry.Rect surface, in sparkles.ui.geometry.Rect anchor, in anchored_overlays_dismissal_policy.DismissPolicy p, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) now, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) pressed, uint openedFrame) pure nothrow @nogc @safeThe hit facts for a single-surface overlay, resolved from the last frame.
hitFor((local variable) const(sparkles.ui.geometry.Rect) surfacesurface, (local variable) const(sparkles.ui.geometry.Rect) anchoranchor, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) insideinside, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outsideoutside, 0)),
"press outside / release inside must not dismiss");
assert(bool anchored_overlays_dismissal_policy.dismisses(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe boolean face of dismissedBy — the predicate the router calls when
it only needs to know whether to plan a close.
dismisses((immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(anchored_overlays_dismissal_policy.DismissEvent) relEvrelEv,
anchored_overlays_dismissal_policy.OverlayHit anchored_overlays_dismissal_policy.hitFor(in sparkles.ui.geometry.Rect surface, in sparkles.ui.geometry.Rect anchor, in anchored_overlays_dismissal_policy.DismissPolicy p, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) now, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) pressed, uint openedFrame) pure nothrow @nogc @safeThe hit facts for a single-surface overlay, resolved from the last frame.
hitFor((local variable) const(sparkles.ui.geometry.Rect) surfacesurface, (local variable) const(sparkles.ui.geometry.Rect) anchoranchor, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outsideoutside, (local variable) const(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])) outside2outside2, 0)),
"outside press paired with an outside release must dismiss");
}
// -----------------------------------------------------------------------
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n=== 5. The one-frame open guard ===");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("A surface opened by the very press being routed must not be dismissed by");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("that same press. Two shapes of the bug, with the guard on and off:");
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
{
(struct) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer!(char, 128) (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) headhead;
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) headhead ~= " ";
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) headhead.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell("case", 50, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) headhead.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell("guard on", 11, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) headhead.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell("guard off", 1, true);
void std.stdio.writeln!(char[])(char[] __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln((local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) headhead[]);
}
void void anchored_overlays_dismissal_policy.main.guardRow(string label, in anchored_overlays_dismissal_policy.DismissPolicy p, in anchored_overlays_dismissal_policy.DismissEvent e, in anchored_overlays_dismissal_policy.OverlayHit h) @safeguardRow((alias) object.string = stringstring (parameter) string labellabel, in (struct) anchored_overlays_dismissal_policy.DismissPolicyThe whole dimension, per surface. group is Flutter's groupId: a menu
chain is ONE dismiss target, so "inside" is group membership rather than
geometric descent of a widget tree.
DismissPolicy (parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) pp, in (struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) ee, in (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hh) @safe
{
(struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent (local variable) anchored_overlays_dismissal_policy.DismissEvent offoff = (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) ee;
(local variable) anchored_overlays_dismissal_policy.DismissEvent offoff.(field) bool anchored_overlays_dismissal_policy.DismissEvent.openGuardhonour the one-frame open exemption (§ 5)
openGuard = false;
(struct) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer!(char, 128) (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow;
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow ~= " ";
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell((parameter) string labellabel, 50, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) pp, (parameter) const(anchored_overlays_dismissal_policy.DismissEvent) ee, (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hh)), 11, true);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow.void anchored_overlays_dismissal_policy.writeCell!(sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false))(ref sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) w, scope const(char)[] s, ulong width, bool leftAlign = false) pure nothrow @nogc @safePad a table cell to width display columns. cellsOf is the toolkit's one
width authority — %-7s`` would pad by BYTES and skew every column holding a
multi-byte ·.
writeCell(string anchored_overlays_dismissal_policy.shortName(in anchored_overlays_dismissal_policy.DismissReason r) pure nothrow @nogc @safeThe short label a matrix cell prints for a reason.
shortName(anchored_overlays_dismissal_policy.DismissReason anchored_overlays_dismissal_policy.dismissedBy(in anchored_overlays_dismissal_policy.DismissPolicy policy, in anchored_overlays_dismissal_policy.DismissEvent event, in anchored_overlays_dismissal_policy.OverlayHit hit) pure nothrow @nogc @safeThe whole decision, as one expression per clause.
This is tryClose with the phase latch and the open guard folded in — the two
narrowings the survey forced on the naive "AND the flags" form (D8.C1).
dismissedBy((parameter) const(anchored_overlays_dismissal_policy.DismissPolicy) pp, (local variable) anchored_overlays_dismissal_policy.DismissEvent offoff, (parameter) const(anchored_overlays_dismissal_policy.OverlayHit) hh)), 1, true);
void std.stdio.writeln!(char[])(char[] __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln((local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 128LU, false) rowrow[]);
}
// (a) a context menu opened at frame 100 by a press on the bare document —
// there is no registered trigger widget, so the opening press resolves
// outside the new surface's group.
const (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) openedNowopenedNow = (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit(group: 0, pressGroup: 0, insideAnchor: false, openedFrame: 100);
void anchored_overlays_dismissal_policy.main.guardRow(string label, in anchored_overlays_dismissal_policy.DismissPolicy p, in anchored_overlays_dismissal_policy.DismissEvent e, in anchored_overlays_dismissal_policy.OverlayHit h) @safeguardRow("context menu, the press that opened it (f100)", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss,
(struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, frame: 100), (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) openedNowopenedNow);
void anchored_overlays_dismissal_policy.main.guardRow(string label, in anchored_overlays_dismissal_policy.DismissPolicy p, in anchored_overlays_dismissal_policy.DismissEvent e, in anchored_overlays_dismissal_policy.OverlayHit h) @safeguardRow("...the next outside press (f101)", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss,
(struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.pressOutside = cast(ushort)2upressOutside, frame: 101), (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) openedNowopenedNow);
// (b) the toggle: the press on a popover's own trigger both opens it and is
// a `triggerReactivate` for it.
const (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) openedByTriggeropenedByTrigger = (struct) anchored_overlays_dismissal_policy.OverlayHitWhat the router resolved about this event with respect to THIS surface. All
of it comes from the last painted frame's hit list; none of it needs a grab,
a capture, a scrim or a platform popup.
OverlayHit(group: 0, pressGroup: 0, insideAnchor: true, openedFrame: 200);
void anchored_overlays_dismissal_policy.main.guardRow(string label, in anchored_overlays_dismissal_policy.DismissPolicy p, in anchored_overlays_dismissal_policy.DismissEvent e, in anchored_overlays_dismissal_policy.OverlayHit h) @safeguardRow("popover, the trigger press that opened it (f200)", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss,
(struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate, frame: 200), (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) openedByTriggeropenedByTrigger);
void anchored_overlays_dismissal_policy.main.guardRow(string label, in anchored_overlays_dismissal_policy.DismissPolicy p, in anchored_overlays_dismissal_policy.DismissEvent e, in anchored_overlays_dismissal_policy.OverlayHit h) @safeguardRow("...pressing that trigger again later (f260)", (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.popoverDismisspopoverDismiss,
(struct) anchored_overlays_dismissal_policy.DismissEventWhat the router says happened, in the policy's vocabulary. Exactly one cause
bit per call — the router owns "what happened", the surface owns "do I care".
DismissEvent(cause: (enum) anchored_overlays_dismissal_policy.DismissOnEvery cause a surface can be closed by, one bit each — the shape of
QQuickPopup::ClosePolicyFlag and of Uno's DismissalTriggerFlags. The router
offers a cause in exactly this vocabulary, so the evaluation is an AND.
anchorClipped is deliberately present and deliberately never dismisses here:
CSS anchor positioning HIDES a box whose anchor scrolled out of view rather than
closing it (position-visibility: anchor-visible is the initial value), and the
proposal keeps that distinction.
DismissOn.(enum value) anchored_overlays_dismissal_policy.DismissOn.triggerReactivate = cast(ushort)16utriggerReactivate, frame: 260), (local variable) const(anchored_overlays_dismissal_policy.OverlayHit) openedByTriggeropenedByTrigger);
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" Without the guard the surface closes on the frame it opened — visibly");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" never opening at all. GTK gave up and disabled release-based autohide");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" outright over this; Slint, Turbo Vision, WPF, tippy and Qt each carry a");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" bespoke latch. One integer field on the record replaces all of them.");
// -----------------------------------------------------------------------
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n=== 6. The cascade ===");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Dismissal never closes \"this one\": it computes an ENDPOINT index and closes");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("everything ABOVE it, leaf to root. Ancestors survive; so does anything that");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("is not a descendant — the toast below is open the whole time and never");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("closes, because truncation is by ancestry, not by stack position.");
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
const (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain = [
(struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord("File", (enum) anchored_overlays_dismissal_policy.OverlayBandThe band a surface lives in. Only popup participates in the dismissal
stack: hint is HTML's separate hint list (tooltips, never a dismissal
parent) and notify is out of the stack entirely.
OverlayBand.(enum value) anchored_overlays_dismissal_policy.OverlayBand.popup = 1popup, (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent, (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect(2, 3, 14, 6), (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss, 10),
(struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord("Recent", (enum) anchored_overlays_dismissal_policy.OverlayBandThe band a surface lives in. Only popup participates in the dismissal
stack: hint is HTML's separate hint list (tooltips, never a dismissal
parent) and notify is out of the stack entirely.
OverlayBand.(enum value) anchored_overlays_dismissal_policy.OverlayBand.popup = 1popup, 0, (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect(16, 5, 16, 5), (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss, 12),
(struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord("Projects", (enum) anchored_overlays_dismissal_policy.OverlayBandThe band a surface lives in. Only popup participates in the dismissal
stack: hint is HTML's separate hint list (tooltips, never a dismissal
parent) and notify is out of the stack entirely.
OverlayBand.(enum value) anchored_overlays_dismissal_policy.OverlayBand.popup = 1popup, 1, (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect(32, 7, 18, 4), (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss, 14),
(struct) anchored_overlays_dismissal_policy.OverlayRecordOverlayRecord("toast", (enum) anchored_overlays_dismissal_policy.OverlayBandThe band a surface lives in. Only popup participates in the dismissal
stack: hint is HTML's separate hint list (tooltips, never a dismissal
parent) and notify is out of the stack entirely.
OverlayBand.(enum value) anchored_overlays_dismissal_policy.OverlayBand.notify = 2notify, (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent, (struct) sparkles.ui.geometry.RectA rectangle on the cell grid, [x, x+width) × [y, y+height) — a
Point origin plus a Size extent.
Rect(50, 1, 20, 3), (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.notifierDismissA notification toast is not in the dismissal stack and does not answer to the
pointer; it answers to its own clock.
notifierDismiss, 9),
];
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" idx name band rect parent group");
foreach ((parameter) ulong ii, const (parameter) const(anchored_overlays_dismissal_policy.OverlayRecord) rr; (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain)
void std.stdio.writefln!(" [%d] %-10s %-7s %-20s %-7s %d", ulong, string, const(anchored_overlays_dismissal_policy.OverlayBand), string, string, const(ulong))(ulong __param_0, string __param_1, const(anchored_overlays_dismissal_policy.OverlayBand) __param_2, string __param_3, string __param_4, const(ulong) __param_5) @safeEquivalent to writef(fmt, args, '\n').
writefln!" [%d] %-10s %-7s %-20s %-7s %d"((local variable) ulong ii, (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) string anchored_overlays_dismissal_policy.OverlayRecord.namename, (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) anchored_overlays_dismissal_policy.OverlayBand anchored_overlays_dismissal_policy.OverlayRecord.bandband,
string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) sparkles.ui.geometry.Rect anchored_overlays_dismissal_policy.OverlayRecord.surfacesurface.(field) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) sparkles.ui.geometry.Rect.originthe top-left corner
origin) ~ ".." ~ string anchored_overlays_dismissal_policy.pt(in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) @safept((struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]).this(int[2] values...) pure nothrow @nogc ref @safeInitializes the first i components from constructor arguments.
r.sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]).this(int[2] values...) pure nothrow @nogc ref @safeInitializes the first i components from constructor arguments.
surface.int sparkles.ui.geometry.Rect.right() const pure nothrow @nogc @safeRight edge (exclusive) and bottom edge (exclusive).
right, (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) sparkles.ui.geometry.Rect anchored_overlays_dismissal_policy.OverlayRecord.surfacesurface.int sparkles.ui.geometry.Rect.bottom() const pure nothrow @nogc @safeRight edge (exclusive) and bottom edge (exclusive).
bottom)),
(local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent == (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent ? "-" : (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain[(local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent].(field) string anchored_overlays_dismissal_policy.OverlayRecord.namename, (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord) rr.(field) anchored_overlays_dismissal_policy.DismissPolicy anchored_overlays_dismissal_policy.OverlayRecord.policypolicy.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group);
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" cause endpoint closes (leaf -> root)");
void void anchored_overlays_dismissal_policy.main.cascadeRow(string label, ulong endpoint, anchored_overlays_dismissal_policy.DismissReason cause) @safecascadeRow((alias) object.string = stringstring (parameter) string labellabel, (alias) object.size_t = ulongsize_t (parameter) ulong endpointendpoint, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason (parameter) anchored_overlays_dismissal_policy.DismissReason causecause) @safe
{
const (local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing = anchored_overlays_dismissal_policy.CloseList anchored_overlays_dismissal_policy.truncateTo(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, ulong endpoint, ulong group, anchored_overlays_dismissal_policy.DismissReason cause) pure nothrow @nogc @safeBlink's HideAllPopoversUntil, in a flat arena: compute an ENDPOINT and close
everything above it, leaf to root. The endpoint itself stays open; noParent
means "the bare page", which closes the whole group.
The shallowest surface closed is the one the cause actually named; everything
above it closes because its parent did — which is the parentClosed reason,
mandatory and unvetoable.
truncateTo((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain, (parameter) ulong endpointendpoint, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group, (parameter) anchored_overlays_dismissal_policy.DismissReason causecause);
(struct) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false)A @nogc container with Small Buffer Optimization and copy-on-write.
Elements are stored inline up to N elements, then automatically
allocated on the heap (via AffixAllocator!(Mallocator, ControlBlock), which
keeps the reference count in an allocation prefix; the element capacity is the
heap slice length) when capacity is exceeded. Heap blocks are managed with the
std.experimental.allocator makeArray/expandArray/dispose helpers.
The buffer is copyable. Copying an inline buffer duplicates its elements
(independent copies). Copying a heap buffer shares the allocation and bumps a
reference count; the shared block is cloned copy-on-write the first time a
mutable copy is written. This suits the common pattern of one producer
building a buffer mutably, then handing out many const reader copies — read
via const (e.g. through borrow) never clones. Mutating accessors on a
shared mutable copy clone first, so a mutable slice/reference taken from a
shared buffer and held across a later mutation may be invalidated (the usual
copy-on-write caveat) — read through const to share without that risk.
Note
storage location is tied to length (data is inline whenever
length <= N), so reserve pre-grows only once on the heap,
and clear/popBack that drop the length back to <= N revert
to inline storage.
SmallBuffer!(char, 256) (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf;
foreach ((local variable) ulong kk; 0 .. (local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength)
{
if ((local variable) ulong kk)
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf ~= ' ';
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf ~= void sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false).opOpAssign!"~"(in char[] elements) pure nothrow @nogc @safeAppends elements from a slice using ~= operator.
chain[void sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false).opOpAssign!"~"(in char[] elements) pure nothrow @nogc @safeAppends elements from a slice using ~= operator.
closing.(field) ulong[8] anchored_overlays_dismissal_policy.CloseList.indexindex[(local variable) ulong kk]].(field) string anchored_overlays_dismissal_policy.OverlayRecord.namename;
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf ~= '[';
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf ~= void sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false).opOpAssign!"~"(in char[] elements) pure nothrow @nogc @safeAppends elements from a slice using ~= operator.
shortName((local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) anchored_overlays_dismissal_policy.DismissReason[8] anchored_overlays_dismissal_policy.CloseList.reasonreason[(local variable) ulong kk]);
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf ~= ']';
}
if ((local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength == 0)
(local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf ~= "(nothing)";
void std.stdio.writefln!(" %-41s %-10s %s", string, string, char[])(string __param_0, string __param_1, char[] __param_2) @safeEquivalent to writef(fmt, args, '\n').
writefln!" %-41s %-10s %s"((parameter) string labellabel,
(parameter) ulong endpointendpoint == (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent ? "-" : (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain[(parameter) ulong endpointendpoint].(field) string anchored_overlays_dismissal_policy.OverlayRecord.namename, (local variable) sparkles.base.smallbuffer.SmallBuffer!(char, 256LU, false) bufbuf[]);
}
// (1) A close request goes to the topmost open surface in the popup band —
// so the endpoint is that surface's parent.
void anchored_overlays_dismissal_policy.main.cascadeRow(string label, ulong endpoint, anchored_overlays_dismissal_policy.DismissReason cause) @safecascadeRow("close request (topmost popup only)", (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain[2].(field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.closeRequest = 2closeRequest);
// (2) Press on the bare page: nothing in the group survives.
void anchored_overlays_dismissal_policy.main.cascadeRow(string label, ulong endpoint, anchored_overlays_dismissal_policy.DismissReason cause) @safecascadeRow("press outside every surface (60,20)", ulong anchored_overlays_dismissal_policy.hitIndex(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) pure nothrow @nogc @safeReverse paint order is reverse hit order: the last-opened surface wins a cell
it shares with anything beneath it (HoverState's "later target wins" rule,
which is also what keeps an overlay and its anchor from both answering true).
hitIndex((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain, (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(60, 20)),
(enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.pressOutside = 3pressOutside);
// (3) Press inside the root menu: it becomes the endpoint and stays open.
void anchored_overlays_dismissal_policy.main.cascadeRow(string label, ulong endpoint, anchored_overlays_dismissal_policy.DismissReason cause) @safecascadeRow("press inside File (6,5)", ulong anchored_overlays_dismissal_policy.hitIndex(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) pure nothrow @nogc @safeReverse paint order is reverse hit order: the last-opened surface wins a cell
it shares with anything beneath it (HoverState's "later target wins" rule,
which is also what keeps an overlay and its anchor from both answering true).
hitIndex((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain, (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(6, 5)), (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.parentClosed = 14parentClosed);
// (4) Press mid-chain.
void anchored_overlays_dismissal_policy.main.cascadeRow(string label, ulong endpoint, anchored_overlays_dismissal_policy.DismissReason cause) @safecascadeRow("press inside Recent (20,7)", ulong anchored_overlays_dismissal_policy.hitIndex(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, in sparkles.math.vector.Vector!(int, 2LU, ["x", "y"]) p) pure nothrow @nogc @safeReverse paint order is reverse hit order: the last-opened surface wins a cell
it shares with anything beneath it (HoverState's "later target wins" rule,
which is also what keeps an overlay and its anchor from both answering true).
hitIndex((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain, (struct) sparkles.math.vector.Vector!(int, 2LU, ["x", "y"])Point(20, 7)), (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.parentClosed = 14parentClosed);
// (5) A mandatory cause, applied to a surface in the middle of the chain.
void anchored_overlays_dismissal_policy.main.cascadeRow(string label, ulong endpoint, anchored_overlays_dismissal_policy.DismissReason cause) @safecascadeRow("anchor of Recent removed", (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain[1].(field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.anchorGone = 9anchorGone);
// (6) A sibling submenu opens at depth 1.
void anchored_overlays_dismissal_policy.main.cascadeRow(string label, ulong endpoint, anchored_overlays_dismissal_policy.DismissReason cause) @safecascadeRow("sibling submenu opened at depth 1", (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain[1].(field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.siblingOpened = 13siblingOpened);
void std.stdio.writeln!()() @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln();
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" Every row is the same truncation with a different endpoint and a different");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" named reason; only the shallowest closed surface carries the cause, the");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" rest carry PARENT. Nothing above an endpoint survives and nothing below it");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" is touched — which is exactly `HideAllPopoversUntil(endpoint)`.");
// Pinned: a mid-chain close takes its descendants and leaves its ancestors.
{
const (local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing = anchored_overlays_dismissal_policy.CloseList anchored_overlays_dismissal_policy.truncateTo(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, ulong endpoint, ulong group, anchored_overlays_dismissal_policy.DismissReason cause) pure nothrow @nogc @safeBlink's HideAllPopoversUntil, in a flat arena: compute an ENDPOINT and close
everything above it, leaf to root. The endpoint itself stays open; noParent
means "the bare page", which closes the whole group.
The shallowest surface closed is the one the cause actually named; everything
above it closes because its parent did — which is the parentClosed reason,
mandatory and unvetoable.
truncateTo((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain, (local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain[1].(field) ulong anchored_overlays_dismissal_policy.OverlayRecord.parentindex into the open array
parent, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.anchorGone = 9anchorGone);
assert((local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength == 2, "closing Recent must take exactly Recent and Projects");
assert((local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) ulong[8] anchored_overlays_dismissal_policy.CloseList.indexindex[0] == 2 && (local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) ulong[8] anchored_overlays_dismissal_policy.CloseList.indexindex[1] == 1, "leaf-to-root order");
assert((local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) anchored_overlays_dismissal_policy.DismissReason[8] anchored_overlays_dismissal_policy.CloseList.reasonreason[0] == (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.parentClosed = 14parentClosed);
assert((local variable) const(anchored_overlays_dismissal_policy.CloseList) closingclosing.(field) anchored_overlays_dismissal_policy.DismissReason[8] anchored_overlays_dismissal_policy.CloseList.reasonreason[1] == (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.anchorGone = 9anchorGone);
const (local variable) const(anchored_overlays_dismissal_policy.CloseList) allall = anchored_overlays_dismissal_policy.CloseList anchored_overlays_dismissal_policy.truncateTo(scope const(anchored_overlays_dismissal_policy.OverlayRecord[]) open, ulong endpoint, ulong group, anchored_overlays_dismissal_policy.DismissReason cause) pure nothrow @nogc @safeBlink's HideAllPopoversUntil, in a flat arena: compute an ENDPOINT and close
everything above it, leaf to root. The endpoint itself stays open; noParent
means "the bare page", which closes the whole group.
The shallowest surface closed is the one the cause actually named; everything
above it closes because its parent did — which is the parentClosed reason,
mandatory and unvetoable.
truncateTo((local variable) const(anchored_overlays_dismissal_policy.OverlayRecord[]) chainchain, (constant) ulong anchored_overlays_dismissal_policy.noParent = 18446744073709551615LUnoParent, (immutable global) immutable(anchored_overlays_dismissal_policy.DismissPolicy) anchored_overlays_dismissal_policy.menuDismissmenuDismiss.(field) ulong anchored_overlays_dismissal_policy.DismissPolicy.group0 is the bare page — never a surface's own group
group, (enum) anchored_overlays_dismissal_policy.DismissReasonWhy a surface closed. xdg-shell's argument-less popup_done is the named
anti-pattern: a client that cannot tell Escape from a click outside cannot
implement "restore focus only when dismissed by keyboard".
DismissReason.(enum value) anchored_overlays_dismissal_policy.DismissReason.pressOutside = 3pressOutside);
assert((local variable) const(anchored_overlays_dismissal_policy.CloseList) allall.(field) ulong anchored_overlays_dismissal_policy.CloseList.lengthlength == 3, "the toast is not in the menu's dismiss group");
}
}