castIfAcceptsScroll

Cast the node to given type if it accepts scroll.

In addition to performing a dynamic cast, this checks if the node can handle a specified scroll value according to its HoverScrollable.canScroll method. If it doesn't, it will fail the cast.

@safe
castIfAcceptsScroll
(
inout Object node
,)

Parameters

node Object

Node to cast.

pointer HoverPointer

Pointer used for scrolling. Different values may be accepted depending on the scroll value or position.

Return Value

Type: inout(HoverScrollable)

Node casted to Scrollable, or null if the node can't be casted, or the motion would not have effect.

Meta