Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::FocusFence Class Reference

Implements the focus fences. More...

#include <kanzi/core.ui/input/focus_scope.hpp>

Inheritance diagram for kanzi::FocusFence:
[legend]

Public Member Functions

 FocusFence (Node &root)
 Constructor. More...
 
FocusScopeType getType () const override
 Returns the type of the focus scope. 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...
 
NodeSharedPtr findNodeToRecoverFocusWhenScopeChangeTo (FocusScopePtr &newScopeInfo) const
 Finds a node to which Kanzi tries to set the focus after this focus scope changes to newScopeInfo and the scope type change itself did not restore focus to any node. More...
 
FocusChainNode findNodeToRestoreFocusOn ()
 Finds a focusable node to which tryRestoreScopeFocusedNode() restores the focus when called with Direction set to Next and Reason set to Force. 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...
 
FocusChainSharedPtr getFocusChainSnapshot (bool onlyEffectivelyVisible)
 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...
 
virtual OverlayScopegetOverlayScope () const
 Returns the overlay scope that owns the focus scope. More...
 
virtual FocusScopegetParent () const
 If a focus scope has a parent focus scope, returns the parent focus scope. More...
 
NodegetRoot () 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 isFocusChainEmpty (bool onlyEffectivelyVisible) const
 Returns whether the focus chain of a focus scope is empty. More...
 
virtual bool isNodeInScope (const Node &node) const
 Returns whether a node is in a focus scope. More...
 
void setFocusNavigationManipulator (FocusNavigationManipulatorSharedPtr newManipulator)
 Sets the focus navigation manipulator of the focus scope. More...
 
FocusChainNode tryMoveFocusInScope (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 (Node *currentFocus, FocusReason reason, 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, Node::FocusStateProperty to FocusState::NoFocus, and clears the last-focused node of a focus scope. More...
 

Protected Member Functions

 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 ()
 Invalidates the focus chain of the focus scope, including the focus chain snapshots of its nested focus scopes. More...
 
virtual void joinScope (FocusScope &target)
 Joins the last-focused node of this scope with the target focus scope, if the last-focused node of the target scope is the scope node of this focus scope. More...
 
void notifyInvalidateFocusChain () override
 Kanzi calls this method to invalidate the focus chain snapshots of the focus scope. More...
 
void notifyNodeAttached (Node &node) override
 FocusManager calls this method when a node is attached to the node tree. More...
 
void notifyNodeDetached (Node &node) override
 FocusManager calls this method to notify that a node from the scope is detached. More...
 
virtual void notifyScopeTypeChange (FocusScope &oldScopeData)
 Notifies that the focus scope type of this scope changed from oldScopeData. More...
 
virtual void splitScope (FocusScope *target, FocusChainNode targetLastFocusedNode)
 Splits the last-focused node of a target scope with this focus scope. 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 (FocusScopeType type, Node &rootNode)
 Creates an instance of a focus scope type, with the rootNode as the focus scope node. More...
 
static FocusScopePtr create (Node &rootNode)
 Creates a focus scope type instance with the rootNode as the root of the focus scope. More...
 
static void swapScope (FocusScopePtr &newScopeInfo, FocusScopePtr &nodeScopeInfo)
 Safely swaps the focus scope info nodeScopeInfo of a node with the newScopeInfo. More...
 

Detailed Description

Implements the focus fences.

Since
Kanzi 3.7.0

Constructor & Destructor Documentation

kanzi::FocusFence::FocusFence ( Node root)
explicit

Constructor.

kanzi::FocusFence::FocusFence ( Node root,
ScopeFlag  flags 
)
explicitprotected

Constructor.

Member Function Documentation

FocusScopeType kanzi::FocusFence::getType ( ) const
inlineoverridevirtual

Returns the type of the focus scope.

Returns
Returns FocusScopeType::Fence.

Implements kanzi::FocusScope.

Reimplemented in kanzi::AutoClosingModelessScope, kanzi::ModelessScope, kanzi::AutoClosingModalScope, and kanzi::ModalScope.


The documentation for this class was generated from the following file: