Implements the popup scopes. More...
#include <kanzi/core.ui/input/focus_scope.hpp>
Public Member Functions | |
FocusManager::FocusScopeType | getType () const override |
Returns the scope type. More... | |
PopupScope (Node &root, FocusManager::ScopeStack &scopeStack) | |
Constructor. More... | |
~PopupScope () override | |
Destructor. More... | |
Public Member Functions inherited from kanzi::ModalScope | |
void | addToStack () |
Adds the focus scope to the modal scope stack. More... | |
bool | bringScopeToFront () |
Brings a modal focus scope to the front of focus scopes. More... | |
FocusChainNode | getEffectiveFocus () const |
Returns the effective focus node of a modal scope. More... | |
Node2DSharedPtr | getHitTestRoot () |
Returns the node from where the hit test iteration is started. More... | |
Node2DSharedPtr | getKeyInputRoot () |
Returns the node to which the key input is propagated. More... | |
FocusScope * | getParent () const override |
Overrides FocusScope::getParent() by returning the parent focus scope that is a popup or modal focus scope. More... | |
bool | isForemostScope () const |
Checks whether the focus scope is the foremost scope of the modal scope stack. More... | |
bool | isNodeInScope (const Node &node) const override |
Checks whether a node is in this modal scope. More... | |
ModalScope (Node &root, FocusManager::ScopeStack &scopeStack) | |
Constructor. More... | |
void | removeFromStack (FocusManager::FocusReason reason) |
Removes the focus scope from the modal scope stack. More... | |
bool | sendScopeToBack (FocusManager::FocusReason reason) |
Sends a focus scope to the end of the focus scope stack with a given reason value. More... | |
void | setFocused (bool focused) override |
Overrides FocusFence::setFocused();. More... | |
FocusChainNode | tryMoveFocusAcrossNestedScopes (FocusManager::FocusChainDirection direction) |
Tries to set the focus to a node relative to the focused node of the popup-type focus scope passed as an argument, using the focus chain navigation. More... | |
FocusChainNode | trySetFocus (Node &node, FocusManager::FocusReason reason) |
Tries to set the focus to a node of the focus scope. More... | |
~ModalScope () override | |
Destructor. More... | |
Public Member Functions inherited from kanzi::FocusFence | |
FocusFence (Node &root) | |
Constructor. More... | |
Public Member Functions inherited from kanzi::FocusScope | |
bool | canFocusEnter () const |
Returns whether the focus can enter the focus scope. More... | |
bool | canFocusLeave () const |
Returns whether the focus can leave the focus scope. More... | |
bool | canGetLastFocused () const |
Returns whether the focus scope node can be the last-focused node of its owning focus scope. More... | |
FocusChainNode | getFocus () const |
Returns the focus node of a focus scope. More... | |
FocusChainSharedPtr | getFocusChainSnapshot () |
Returns a snapshot of the focus chain of a focus scope. More... | |
FocusNavigationManipulatorSharedPtr | getFocusNavigationManipulator () const |
Returns the focus navigation manipulator of a focus scope. More... | |
ModalScope * | getModalScope () const |
Returns the modal scope that owns the focus scope. More... | |
Node & | getRoot () const |
Returns the focus scope node. More... | |
bool | isAttached () const |
Returns whether a focus scope node is attached. More... | |
bool | isFocusChainEmpty () const |
Returns whether the focus chain of a focus scope is empty. More... | |
bool | isFocused () const |
Returns the focused state of the focus scope. More... | |
void | setFocusNavigationManipulator (FocusNavigationManipulatorSharedPtr newManipulator) |
Sets the focus navigation manipulator of the focus scope. More... | |
FocusChainNode | tryMoveFocusInScope (FocusManager::FocusChainDirection direction) |
Tries to set the focus to a node relative to the current focus node of the focus scope using the focus chain navigation. More... | |
FocusChainNode | tryRestoreScopeFocusedNode (FocusChainNode currentFocus, FocusManager::FocusReason reason, FocusManager::FocusChainDirection direction) |
Tries to restore the focus to the last-focused node of a focus scope. More... | |
Node::VisitorResult | visitFocusChain (FocusScopeVisitor &visitor) |
Visits the focus chain of the focus scope, and calls the visitor on each node. More... | |
Node::VisitorResult | visitFocusScope (FocusScopeVisitor &visitor) |
Visits the focusable nodes of the focus scope, including nested focus scope nodes. More... | |
virtual | ~FocusScope () |
Destructor. More... | |
FocusChainIndex | getLastFocused () const |
Returns the focus chain index of the last-focused node of a focus scope. More... | |
void | setLastFocused (const FocusChainIndex &lastFocus) |
Sets the focus chain index of the last-focused node of the focus scope. More... | |
void | clearLastFocused () |
Clears the focus chain index of the last-focused node of a focus scope. More... | |
FocusChainNode | getLastFocusedNode () const |
Returns the last-focused node of a focus scope. More... | |
FocusChainNode | setLastFocusedNode (const Node &lastFocused) |
Sets the last-focused node of a focus scope. More... | |
void | clearLastFocusedNode () |
Set the Node::FocusedProperty value to false, and clears the last-focused node of a focus scope. More... | |
Protected Member Functions | |
void | notifyNodeAttached (Node &node) override |
Overrides ModalScope::notifyNodeAttached(). More... | |
EventQueue::ProcessingResult | processTouchPoint (const TouchPoint &point) override |
Overrides ModalScope::processTouchPoint() for popup focus scopes. More... | |
Protected Member Functions inherited from kanzi::ModalScope | |
void | joinScope (FocusScope &target) override |
Overrides FocusScope::joinScope();. More... | |
void | notifyNodeAttached (Node &node) override |
Overrides FocusScope::notifyNodeAttached() for popups. More... | |
void | notifyNodeDetached (Node &node) override |
Overrides FocusScope::notifyNodeDetached() for popups. More... | |
void | notifyNodeVisibilityChanged (Node &node) override |
Overrides FocusScopeCore::notifyNodeVisibilityChanged(). More... | |
void | notifyScopeInFront (ModalScope *previous, FocusManager::FocusReason reason) |
Notifies that this scope is brought to the front of the scope stack. More... | |
void | notifyScopeSentToBack (ModalScope &next, FocusManager::FocusReason reason) |
Notifies that this scope is sent to the back of the scope stack. More... | |
void | notifyScopeTypeChange (FocusScope &oldScopeData) override |
Overrides FocusScope::notifyScopeTypeChange();. More... | |
EventQueue::ProcessingResult | processTouchPoint (const TouchPoint &point) override |
Overrides FocusScopeCore::processTouchPoint(). More... | |
void | splitScope (FocusScope *source, FocusChainNode targetLastFocusNode) override |
Overrides FocusScope::splitScope();. More... | |
Protected Member Functions inherited from kanzi::FocusFence | |
FocusFence (Node &root, ScopeFlag flags) | |
Constructor. More... | |
Protected Member Functions inherited from kanzi::FocusScope | |
void | focusNavigationHandler (FocusManager::MoveFocusMessageArguments &args) |
Navigates the focus in a scope. More... | |
FocusScope (Node &scopeNode, ScopeFlag flags) | |
Constructor. More... | |
void | invalidateFocusChain () override |
Overrides FocusScopeCore::invalidateFocusChain(). More... | |
void | joinScope (FocusScope &target) override |
Overrides FocusScopeCore::joinScope(). More... | |
void | notifyNodeAttached (Node &node) override |
Overrides FocusScopeCore::notifyNodeAttached(). More... | |
void | notifyNodeDetached (Node &node) override |
Overrides FocusScopeCore::notifyNodeDetached(). More... | |
void | notifyScopeTypeChange (FocusScope &oldScopeData) override |
Overrides FocusScopeCore::notifyScopeTypeChange(). More... | |
void | splitScope (FocusScope *target, FocusChainNode targetLastFocusedNode) override |
Overrides FocusScopeCore::splitScope(). More... | |
void | swapScopeData (FocusScope &other) |
Swaps the focus scope data of this scope with the focus scope data of the source scope. More... | |
Additional Inherited Members | |
Public Types inherited from kanzi::FocusScope | |
using | FocusChainSharedPtr = shared_ptr< FocusChain > |
The focus chain pointer type. More... | |
Static Public Member Functions inherited from kanzi::FocusScope | |
static FocusScopePtr | create (FocusManager::FocusScopeType type, Node &rootNode, FocusManager::ScopeStack &scopeStack) |
Creates an instance of a focus scope type, with the rootNode as the focus scope node. More... | |
Protected Types inherited from kanzi::FocusScope | |
enum | ScopeFlag { ScopeFlag::EnterFocusWithNavigationAllowed, ScopeFlag::LeaveFocusWithNavigationAllowed, ScopeFlag::CanGetLastFocusedNode, ScopeFlag::DisableAll, ScopeFlag::EnableAll } |
Defines the scope flags. More... | |
Protected Attributes inherited from kanzi::ModalScope | |
Node::MessageSubscriptionToken | m_bringScopeToFrontMessageToken |
Message subscription token for FocusManager::BringScopeToFrontMessage. More... | |
Node2DWeakPtr | m_rootForKey |
The root node until which the key messages are bubbled. More... | |
Node2DWeakPtr | m_rootForTouch |
The root node where the touch hit testing is started for the modal scope. More... | |
FocusManager::ScopeStack & | m_scopeStack |
The focus scope stack. More... | |
Node::MessageSubscriptionToken | m_sendScopeToBackMessageToken |
Message subscription token for FocusManager::SendScopeToBaskMessage. More... | |
Protected Attributes inherited from kanzi::FocusScope | |
const ScopeFlag | m_scopeFlags |
The scope flags. More... | |
Implements the popup scopes.
|
explicit |
Constructor.
|
override |
Destructor.
|
overridevirtual |
Returns the scope type.
Reimplemented from kanzi::ModalScope.
|
overrideprotected |
Overrides ModalScope::notifyNodeAttached().
|
overrideprotected |
Overrides ModalScope::processTouchPoint() for popup focus scopes.