WithOrderedFocus

A ready-made implementation of tabbing for FocusIO using orderedFocusAction, provided as an interface to subclass from.

Tabbing can be performed using the focusNext and focusPrevious methods. They are bound to the corresponding FluidInputAction actions and should be automatically picked up by enableInputActions. A complete implementation will thus provide the ability to navigate between nodes using the "tab" key.

To make WithOrderedFocus work, it is currently necessary to override two methods:

override protected inout(OrederedFocusAction) orderedFocusAction() inout;
override protected void focusPreviousOrNext(FluidInputAction actionType) { }

The latter, focusPreviousOrNext must be overridden so that it does nothing if FocusIO is in use, as it only applies to the old backend. It will be removed in Fluid 0.8.0.

Members

Functions

focusFirst
FocusSearchAction focusFirst()
focusLast
FocusSearchAction focusLast()

Focus the first (focusFirst), or the last node (focusLast) that exists inside the focus space.

focusNext
FocusSearchAction focusNext(bool isReverse)

focusNext focuses the next, and focusPrevious focuses the previous node, relative to the one that is currently focused.

focusNext
bool focusNext(FluidInputAction )
Undocumented in source. Be warned that the author may not have intended to support it.
focusPrevious
FocusSearchAction focusPrevious()

focusNext focuses the next, and focusPrevious focuses the previous node, relative to the one that is currently focused.

focusPrevious
bool focusPrevious(FluidInputAction )
Undocumented in source. Be warned that the author may not have intended to support it.
orderedFocusAction
inout(OrderedFocusAction) orderedFocusAction()

Inherited Members

From WithFocus

currentFocus
inout(Focusable) currentFocus()

Note: Currently focused node may have blocksInput set to true; take care to check it before calling input handling methods.

currentFocus
Focusable currentFocus(Focusable newValue)

Change the currently focused node to another.

isFocusActionable
bool isFocusActionable()
isFocused
bool isFocused(Focusable focusable)
clearFocus
void clearFocus()

Clear current focus (set it to null).

Meta