QueryFWidget<T extends App<T>> class

Inheritance

Constructors

QueryFWidget(T app, FWidget<T> control)

Properties

app → T
finalinherited
backend UnhingedBackend
Shorthand for App.backend.
no setterinherited
control FWidget<T>
final
Count int
Query-like Returns the number of matching elements.
no setterinherited
draw Drawers<T>
Shorthand for App.draw.
no setterinherited
Exists bool
Query-like Alias for IsNotEmpty. true if at least one element matches.
no setterinherited
First Entity<T>
Query-like Returns the first matching element. Throws if none exist.
no setterinherited
FirstOrNull Entity<T>?
Query-like Returns the first matching element, or null if the result set is empty.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id int
Per-type unique identifier, auto-assigned in the constructor.
no setterinherited
input InputSystem<T>
Shorthand for App.input.
no setterinherited
isClonable bool
Check this before calling clone: if (obj.isClonable) obj.clone();
no setterinherited
isClone bool
Whether this object is a clone of another.
getter/setter pairinherited
isCloned bool
Whether this object has been cloned at least once.
getter/setter pairinherited
isCloning bool
Whether this object is currently mid-clone.
getter/setter pairinherited
IsEmpty bool
Query-like true if no elements match.
no setterinherited
IsNotEmpty bool
Query-like true if at least one element matches.
no setterinherited
isOriginal bool
Whether this object is an original (not a clone).
no setterinherited
Last Entity<T>
Query-like Returns the last matching element. Throws if none exist.
no setterinherited
LastOrNull Entity<T>?
Query-like Returns the last matching element, or null if the result set is empty.
no setterinherited
name String
Human-readable name, defaults to <runtimeType>_<id>.
getter/setter pairinherited
namedId String
Per-type unique String identifier, auto-assigned in the constructor. Defaults to <runtimeType>_<id>.
no setterinherited
parent ECSBase<T>?
The parent object in the ECS tree, if any.
getter/setter pairinherited
queryableList Iterable<FWidget<T>>
The default pool of elements to query when no explicit From source is provided. Implemented by concrete subclasses.
no setteroverride
renderer Renderer<T>
Shorthand for App.renderer.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scene Scene<T>
Shorthand for App.currentScene.
no setterinherited
sceneBounds Bounds
no setterinherited
sceneHeight double
no setterinherited
sceneSize Vector2D
no setterinherited
sceneWidth double
no setterinherited
screenHeight double
Shorthand for App's height.
no setterinherited
screenSize Vector2D
Shorthand for App.screenSize.
no setterinherited
screenWidth double
Shorthand for App's width.
no setterinherited
self QueryFWidget<T>
This object cast to T.
no setterinherited
time AppTime<T>
Shorthand for App.time.
no setterinherited

Methods

And([QueryFWidget<T>? other]) QueryFWidget<T>
Query-like Merges all groups from other into this query (AND at the group level).
inherited
callback(void callback()) → void
inherited
clone<X extends E>([Cloner<T>? cloner]) → X
Produces a clone of this object.
inherited
cloneInto<X extends E>(X target, [Cloner<T>? cloner]) → X
inherited
Collect<A extends E>() Iterable<A>
Query-like Returns all matching elements as a lazy Iterable.
inherited
createClone(QueryFWidget<T> newInstance, [Cloner<T>? cloner]) QueryFWidget<T>
Override to customize how state is copied into newInstance.
inherited
createInstance() QueryFWidget<T>
Override to provide a fresh uninitialized instance of this type.
override
DoAll<A extends E>(void fn(Iterable<A> entities)) → void
Query-like Passes the full result Iterable to fn.
inherited
DoFirst<A extends E>(void fn(A entity)) → void
Query-like Calls fn with the first matching element. Does nothing if the result set is empty.
inherited
DoFirstWith<C extends Comp<T>>(void fn(Entity<T> entity, C c)) → void
Query-like Calls fn with the first matching element and its C component. Does nothing if the result set is empty.
inherited
DoFirstWith2<A extends Comp<T>, B extends Comp<T>>(void fn(Entity<T> entity, A a, B b)) → void
Query-like Calls fn with the first matching element and its A and B components. Does nothing if the result set is empty.
inherited
DoFirstWith3<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>>(void fn(Entity<T> entity, A a, B b, C c)) → void
Query-like Calls fn with the first matching element and its A, B, and C components. Does nothing if the result set is empty.
inherited
DoForEach<A extends E>(void fn(A entity)) → void
Query-like Calls fn once for each matching element.
inherited
DoForEachWith<C extends Comp<T>>(void fn(Entity<T> entity, C a)) → void
Query-like For each element that has C, calls fn with the element and its C instance. Implicitly adds a With<C> filter.
inherited
DoForEachWith2<A extends Comp<T>, B extends Comp<T>>(void fn(Entity<T> entity, A a, B b)) → void
Query-like For each element that has both A and B, calls fn with the element and both component instances. Implicitly adds a With2<A, B> filter.
inherited
DoForEachWith3<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>>(void fn(Entity<T> entity, A a, B b, C c)) → void
Query-like For each element that has A, B, and C, calls fn with the element and all three component instances. Implicitly adds a With3<A, B, C> filter.
inherited
DoLast<A extends E>(void fn(A entity)) → void
Query-like Calls fn with the last matching element. Does nothing if the result set is empty.
inherited
DoLastWith<C extends Comp<T>>(void fn(Entity<T> entity, C c)) → void
Query-like Calls fn with the last matching element and its C component. Does nothing if the result set is empty.
inherited
DoLastWith2<A extends Comp<T>, B extends Comp<T>>(void fn(Entity<T> entity, A a, B b)) → void
Query-like Calls fn with the last matching element and its A and B components. Does nothing if the result set is empty.
inherited
DoLastWith3<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>>(void fn(Entity<T> entity, A a, B b, C c)) → void
Query-like Calls fn with the last matching element and its A, B, and C components. Does nothing if the result set is empty.
inherited
Except<C extends Comp<T>>() QueryFWidget<T>
Query-like Excludes elements that have component C.
inherited
Except2<A extends Comp<T>, B extends Comp<T>>() QueryFWidget<T>
Query-like Excludes elements that have either A or B.
inherited
Except3<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>>() QueryFWidget<T>
Query-like Excludes elements that have any of A, B, or C.
inherited
FirstAs<X extends E>() → X
Query-like Returns the first element of type X, skipping any non-matching elements. Throws a StateError if no element of type X exists.
inherited
FirstAsOrNull<X extends E>() → X?
Query-like Returns the first element of type X, skipping any non-matching elements, or null if none exists.
inherited
From(List<Entity<T>> entities) QueryFWidget<T>
Query-like Restricts the query to a specific list of entities instead of the default queryableList.
inherited
getAncestors() Iterable<ECSBase<T>>
Returns every ancestor of this component, from immediate parent up to the root.
inherited
getClones() Iterable<QueryFWidget<T>>
Returns all clones produced from this object.
inherited
getDepth() int
Returns the depth/level in the hierarchy.
inherited
getParentAs<P extends ECSBase<T>>() → P?
Returns parent cast to P, or null if the cast would fail.
inherited
getPath() List<ECSBase<T>>
Returns the path from the root down to this one, inclusive.
inherited
hasParentOf<P extends ECSBase<T>>() bool
Whether parent is of type P.
inherited
IndexOf(Entity<T> e) int
Query-like Returns the index of e in the resolved result list, or -1 if not found.
inherited
LastAs<X extends E>() → X
Query-like Returns the last element of type X, skipping any non-matching elements. Throws a StateError if no element of type X exists.
inherited
LastAsOrNull<X extends E>() → X?
Query-like Returns the last element of type X, skipping any non-matching elements, or null if none exists.
inherited
listenOnAfterClone(void fn(QueryFWidget<T> copy, [Cloner<T>? cloner])) QueryFWidget<T>
Registers fn as an after-clone listener.
inherited
listenOnBeforeClone(bool fn(QueryFWidget<T> copy, [Cloner<T>? cloner])) QueryFWidget<T>
Registers fn as a before-clone listener.
inherited
listenOnClone(void fn(QueryFWidget<T> copy, [Cloner<T>? cloner])) QueryFWidget<T>
Registers fn as a clone listener.
inherited
Map<X>(X toElement(Entity<T> e)) Iterable<X>
Query-like Projects matching elements using toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Not() QueryFWidget<T>
Query-like Opens a new negated filter group.
inherited
On<C extends E>() QueryFWidget<T>
Query-like Keeps only elements whose runtime type is C.
inherited
onAfterClone(QueryFWidget<T> copy, [Cloner<T>? cloner]) → void
Override to react after cloning has completed.
inherited
onBeforeClone(QueryFWidget<T> copy, [Cloner<T>? cloner]) bool
Override to cancel cloning from within the class.
inherited
onClone(QueryFWidget<T> copy, [Cloner<T>? cloner]) → void
Override to react when cloning is about to complete.
inherited
onCloned(QueryFWidget<T> original) → void
Called on the copy after cloning completes, with a reference to original.
inherited
onSelf(void fn(QueryFWidget<T> original)) QueryFWidget<T>
Calls fn with self and returns self, for fluent chaining.
inherited
Or([QueryFWidget<T>? other]) QueryFWidget<T>
Query-like Opens a new filter group (OR semantics between groups).
inherited
run(Task<T> task) → void
inherited
task(Task<T> task) → void
inherited
toString() String
A string representation of this object.
inherited
uniqKey(String key) String
Returns a key namespaced to this object's namedId.
inherited
whenClone(QueryFWidget<T> fn(QueryFWidget<T> newInstance, [Cloner<T>? cloner])) QueryFWidget<T>
Registers fn as the clone factory, replacing the default clone behavior.
inherited
whenCloned(QueryFWidget<T> fn(QueryFWidget<T> self, QueryFWidget<T> copy)) QueryFWidget<T>
Registers fn to run after the clone is produced.
inherited
whenCreateInstance(QueryFWidget<T> fn(QueryFWidget<T> self)) QueryFWidget<T>
Registers fn as the instance factory used during cloning.
inherited
Where(bool fn(Entity<T> entity)) QueryFWidget<T>
Query-like Keeps only elements for which fn returns true.
inherited
WhereType<X>() QueryFWidget<T>
Query-like Keeps only elements matching given type X.
inherited
With<C extends Comp<T>>() QueryFWidget<T>
Query-like Keeps only elements that have component C attached.
inherited
With2<A extends Comp<T>, B extends Comp<T>>() QueryFWidget<T>
Query-like Keeps only elements that have both components A and B.
inherited
With2Where<A extends Comp<T>, B extends Comp<T>>(bool fn(Entity<T> entity, A a, B b)) QueryFWidget<T>
Query-like Keeps only elements that have both A and B and for which fn returns true.
inherited
With3<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>>() QueryFWidget<T>
Query-like Keeps only elements that have all three components A, B, and C.
inherited
With3Where<A extends Comp<T>, B extends Comp<T>, C extends Comp<T>>(bool fn(Entity<T> entity, A a, B b, C c)) QueryFWidget<T>
Query-like Keeps only elements that have all three of A, B, and C and for which fn returns true.
inherited
WithAny<A extends Comp<T>, B extends Comp<T>>() QueryFWidget<T>
Query-like Keeps only elements that have at least one of A or B.
inherited
WithWhere<C extends Comp<T>>(bool fn(Entity<T> entity, C c)) QueryFWidget<T>
Query-like Keeps only elements that have C and for which fn returns true given the entity and its C instance.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited