WindowSelection
Native array selection of captured window entities
Source and package
- Qualified name
-
LibTmux:: Window Selection - Module
- LibTmux
- Package
- LibTmux
- Source
- packages/core/lib/LibTmux/WindowSelection.pm
- package Lib
Tmux:: ;Window Selection -
Description#
DESCRIPTION
Inherits the fixed-return local query API of
LibTmux::Selection. Members must be definedLibTmux::Windowhandles from one server generation. Empty instances still validate against the window schema. Native array edits are possible; query methods validate membership and never perform tmux I/O.
Inherited members10 members#
Reached through LibTmux::Selection.
- count method inherited
count($criteria?)returns an integer. Empty input returns zero. Validate all members before evaluating the optional criterion; count every matching occurrence, including duplicates. - exists method inherited
exists($criteria?)returns a native Boolean. Empty input returns false. After validating the entire membership, stop at the first matching entity. A reference itself remains true even when empty. - first method inherited
first($criteria?)returns the first matching entity or undef. Input order determines first; after membership validation, later field reads may be skipped. - grep method inherited
grep($callback)returns a new same-class selection. Invoke the callback in scalar context with exactly one entity argument and a localized$_. Both bindings hold copies of the reference: assignment cannot replace a source slot. Restore$_and propagate the original thrown value even on failure. Predicates must not edit the traversed sequence. - iterator method inherited Return a fresh local cursor with a copy of current membership. Its
nextreturns an entity or undef only at exhaustion. Later native array edits do not alter this traversal; the selection remains replayable. - new method inherited
new(@entities)creates a concrete blessed array reference and validates every member. Construct an entity-specific selection such asLibTmux::PaneSelection; an empty instance retains that schema. - one method inherited
one($criteria?)returns one entity. Zero throwsNoMatch; a second occurrence throwsMultipleMatches, reporting at least two and their IDs. Two occurrences of one identity are still ambiguous. - one_or_undef method inherited
one_or_undef($criteria?)returns an entity or undef for absence. A second matching occurrence still throwsMultipleMatches. - to_array method inherited Return a fresh, unblessed array reference containing the same entity references. Editing its membership cannot corrupt graph adjacency or this selection. Captured entity values remain read-only through public readers.
- where method inherited
where($criteria_or_filter)eagerly returns a new selection of the same concrete class in scalar, list, or void context. Complete validation precedes evaluation, including on empty input. See"new" in LibTmux::Filter. Order and duplicate occurrences are preserved.