Private
_activePrivate
_activePrivate
_counterPrivate
_currentPrivate
_currentPrivate
_nodesPrivate
_numbersPrivate
_widgetsA signal emitted when the active widget has changed.
A signal emitted when the current widget has changed.
The current widget in the tracker.
The current widget is the widget among the tracked widgets which has the descendant node which has most recently been focused.
The current widget will not be updated if the node loses focus. It will only be updated when a different tracked widget gains focus.
If the current widget is removed from the tracker, the previous current widget will be restored.
This behavior is intended to follow a user's conceptual model of a semantically "current" widget, where the "last thing of type X" to be interacted with is the "current instance of X", regardless of whether that instance still has focus.
A flag indicating whether the tracker is disposed.
Private
_evtHandle the 'blur'
event for a tracked widget.
Private
_evtHandle the 'focus'
event for a tracked widget.
Private
_onHandle the disposed
signal for a tracked widget.
Private
_setGet the focus number for a particular widget in the tracker.
The widget of interest.
The focus number for the given widget, or -1
if the
widget has not had focus since being added to the tracker, or
is not contained by the tracker.
The focus number indicates the relative order in which the widgets have gained focus. A widget with a larger number has gained focus more recently than a widget with a smaller number.
The currentWidget
will always have the largest focus number.
All widgets start with a focus number of -1
, which indicates that
the widget has not been focused since being added to the tracker.
Test whether the focus tracker contains a given widget.
The widget of interest.
true
if the widget is tracked, false
otherwise.
Remove a widget from the focus tracker.
If the widget is the currentWidget
, the previous current widget
will become the new currentWidget
.
A widget will be automatically removed from the tracker if it is disposed after being added.
If the widget is not tracked, this is a no-op.
A class which tracks focus among a set of widgets.
This class is useful when code needs to keep track of the most recently focused widget(s) among a set of related widgets.