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 = flat_set< FocusChainNode, Comparator > |
The set that contains the focusable nodes of a focus scope. More... | |
using | FocusedTuple = tuple< FocusChainSharedPtr, FocusChain::Iterator > |
The tuple that contains: More... | |
using | Iterator = Container::const_iterator |
The const-qualified iterator of the focus chain. More... | |
using | ReverseIterator = Container::const_reverse_iterator |
The const-qualified reverse iterator of the focus chain. More... | |
Public Member Functions | |
Iterator | begin () const |
Returns the starting const-qualified iterator of the focus chain. More... | |
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. More... | |
Iterator | end () const |
Returns the ending const-qualified iterator of the focus chain. More... | |
Iterator | getLastFocusedNodeIterator () const |
Returns the iterator to the last-focused node of the focus chain. More... | |
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. More... | |
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. More... | |
bool | isEmpty () const |
Returns whether the focus chain is empty. More... | |
bool | isValid () const |
Returns whether the focus chain is valid. More... | |
ReverseIterator | rbegin () const |
Returns the starting const-qualified reverse iterator of the focus chain. More... | |
ReverseIterator | rend () const |
Returns the ending const-qualified reverse iterator of the focus chain. More... | |
Protected Types | |
using | NestedFocusChainContainer = vector< shared_ptr< FocusChain > > |
The container with the nested focus chain snapshots. More... | |
Protected Member Functions | |
FocusChain (FocusScope &scope, bool onlyEffectivelyVisible) | |
Constructor. More... | |
FocusChain (FocusScope &scope) | |
Constructor. More... | |
Protected Attributes | |
Container | m_container |
The focus chain container. More... | |
const bool | m_containsEffectivelyVisible |
Whether the focus chain contains only the effectively visible focusable nodes. More... | |
FocusScope * | m_focusScope |
The focus scope which has this focus chain. More... | |
bool | m_isValid |
Holds the validity of the focus chain. More... | |
NestedFocusChainContainer | m_nestedChains |
The container with the nested focus chains visited while this focus chain is available. More... | |
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.
using kanzi::FocusScope::FocusChain::Container = flat_set<FocusChainNode, Comparator> |
The set that contains the focusable nodes of a focus scope.
using kanzi::FocusScope::FocusChain::Iterator = Container::const_iterator |
The const-qualified iterator of the focus chain.
using kanzi::FocusScope::FocusChain::ReverseIterator = Container::const_reverse_iterator |
The const-qualified reverse iterator of the focus chain.
using kanzi::FocusScope::FocusChain::FocusedTuple = tuple<FocusChainSharedPtr, FocusChain::Iterator> |
The tuple that contains:
|
protected |
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.
|
protected |
Whether the focus chain contains only the effectively visible focusable nodes.