The FocusChain contains the snapshot of the focus chain of a focus scope. More...
#include <kanzi/core.ui/input/focus_scope.hpp>
Public Types | |
| using | Container |
| The set that contains the focusable nodes of a focus scope. | |
| using | FocusedTuple |
| The tuple that contains: | |
| using | Iterator |
| The const-qualified iterator of the focus chain. | |
| using | ReverseIterator |
| The const-qualified reverse iterator of the focus chain. | |
Public Member Functions | |
| Iterator | begin () const |
| Returns the starting const-qualified iterator of the focus chain. | |
| bool | containsOnlyEffectivelyVisibleNodes () const |
| Returns whether the focus chain contains only effectively visible nodes, or also nodes that have the Node::VisibleProperty set to true but are effectively invisible. | |
| Iterator | end () const |
| Returns the ending const-qualified iterator of the focus chain. | |
| Iterator | getLastFocusedNodeIterator () const |
| Returns the iterator to the last-focused node of the focus chain. | |
| FocusedTuple | getNestedEffectiveFocus () |
| Returns a tuple with the focus chain and the iterator in that focus chain to the nested effective focused node of a focus scope. | |
| FocusedTuple | getNestedFocus () |
| Returns a tuple with the focus chain and the iterator in that focus chain to the nested focused node of a focus scope. | |
| bool | isEmpty () const |
| Returns whether the focus chain is empty. | |
| bool | isValid () const |
| Returns whether the focus chain is valid. | |
| ReverseIterator | rbegin () const |
| Returns the starting const-qualified reverse iterator of the focus chain. | |
| ReverseIterator | rend () const |
| Returns the ending const-qualified reverse iterator of the focus chain. | |
Protected Types | |
| using | NestedFocusChainContainer |
| The container with the nested focus chain snapshots. | |
Protected Member Functions | |
| FocusChain (FocusScope &scope) | |
| Constructor. | |
| FocusChain (FocusScope &scope, bool onlyEffectivelyVisible) | |
| Constructor. | |
Protected Attributes | |
| Container | m_container |
| The focus chain container. | |
| const bool | m_containsEffectivelyVisible |
| Whether the focus chain contains only the effectively visible focusable nodes. | |
| FocusScope * | m_focusScope |
| The focus scope which has this focus chain. | |
| bool | m_isValid |
| Holds the validity of the focus chain. | |
| NestedFocusChainContainer | m_nestedChains |
| The container with the nested focus chains visited while this focus chain is available. | |
Friends | |
| class | FocusScope |
The FocusChain contains the snapshot of the focus chain of a focus scope.
It contains the focusable nodes of a focus scope ordered by the focus order and focus order offset. You can use the focus chain snapshot to iterate through the focus chain.
To find the last-focused node in a focus scope using the iterated traversal method:
To visit a focus scope using UI scene traversal, see FocusScopeVisitor.
The set that contains the focusable nodes of a focus scope.
The const-qualified iterator of the focus chain.
The const-qualified reverse iterator of the focus chain.
The tuple that contains:
The container with the nested focus chain snapshots.
|
explicitprotected |
Constructor.
Creates a focus chain snapshot which contains either only the effectively visible nodes, or all nodes that have the Node::VisibleProperty set to true.
|
inlineexplicitprotected |
Constructor.
|
inline |
Returns whether the focus chain is valid.
The focus chain gets invalid when any of these happen:
| bool kanzi::FocusScope::FocusChain::isEmpty | ( | ) | const |
Returns whether the focus chain is empty.
| Iterator kanzi::FocusScope::FocusChain::begin | ( | ) | const |
Returns the starting const-qualified iterator of the focus chain.
| ReverseIterator kanzi::FocusScope::FocusChain::rbegin | ( | ) | const |
Returns the starting const-qualified reverse iterator of the focus chain.
| Iterator kanzi::FocusScope::FocusChain::end | ( | ) | const |
Returns the ending const-qualified iterator of the focus chain.
| ReverseIterator kanzi::FocusScope::FocusChain::rend | ( | ) | const |
Returns the ending const-qualified reverse iterator of the focus chain.
| Iterator kanzi::FocusScope::FocusChain::getLastFocusedNodeIterator | ( | ) | const |
Returns the iterator to the last-focused node of the focus chain.
| FocusedTuple kanzi::FocusScope::FocusChain::getNestedFocus | ( | ) |
Returns a tuple with the focus chain and the iterator in that focus chain to the nested focused node of a focus scope.
| FocusedTuple kanzi::FocusScope::FocusChain::getNestedEffectiveFocus | ( | ) |
Returns a tuple with the focus chain and the iterator in that focus chain to the nested effective focused node of a focus scope.
|
inline |
Returns whether the focus chain contains only effectively visible nodes, or also nodes that have the Node::VisibleProperty set to true but are effectively invisible.
|
friend |
|
protected |
The focus chain container.
|
protected |
The container with the nested focus chains visited while this focus chain is available.
|
protected |
The focus scope which has this focus chain.
|
protected |
Holds the validity of the focus chain.
Whether the focus chain contains only the effectively visible focusable nodes.