Kanzi 3.9.10
kanzi::AutoClosingModalScope Class Reference

Implements the auto-closing modal scopes. More...

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

Inheritance diagram for kanzi::AutoClosingModalScope:
[legend]

Public Member Functions

 AutoClosingModalScope (Node &root)
 Constructor.
 
OverlayScopegetInputPropagationOverlay () const override
 Overrides OverlayScope::getInputPropagationOverlay().
 
FocusScopeType getType () const override
 Returns the scope type.
 
- Public Member Functions inherited from kanzi::OverlayScope
OverlayScopegetOverlayScope () const override
 Overrides FocusScope::getOverlayScope() by always returning nullptr, because overlay scopes have no owning overlay scopes.
 
FocusScopegetParent () const override
 Overrides FocusScope::getParent() by always returning nullptr, because overlay scopes have no parent scopes.
 
bool isForemostScope () const
 Checks whether the focus scope is the foremost scope of the overlay scope stack.
 
bool isInputEnabled () const
 Returns whether input handling is enabled for the overlay scope.
 
bool isNodeInScope (const Node &node) const override
 Overrides FocusScope::isNodeInScope().
 
virtual void notifyOverlayBelowGainedFocus (OverlayScope *overlay)
 Notifies an overlay focus scope that an overlay below it gained the focus.
 
void removeFocus (kanzi::FocusReason reason)
 Removes focus from the overlay but preserves last-focused information.
 
FocusChainNode tryMoveFocusAcrossNestedScopes (FocusChainDirection direction)
 Tries to set the focus to a node relative to the focused node of the overlay focus scope, using the focus chain navigation.
 
FocusChainNode trySetFocus (Node &node)
 Tries to set the focus to a node of the focus scope.
 
 ~OverlayScope () override
 Destructor.
 
- Public Member Functions inherited from kanzi::FocusFence
 FocusFence (Node &root)
 Constructor.
 
FocusScopeType getType () const override
 Returns the type of the focus scope.
 
- Public Member Functions inherited from kanzi::FocusScope
bool canFocusEnter () const
 Returns whether the focus can enter the focus scope.
 
bool canFocusLeave () const
 Returns whether the focus can leave the focus scope.
 
bool canGetLastFocused () const
 Returns whether the focus scope node can be the last-focused node of its owning focus scope.
 
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.
 
FocusChainNode findNodeToRestoreFocusOn ()
 Finds a focusable node to which tryRestoreScopeFocusedNode() restores the focus when called with Direction set to Next and Reason set to Force.
 
FocusChainNode getFocus () const
 Returns the focus node of a focus scope.
 
FocusChainSharedPtr getFocusChainSnapshot ()
 Returns a snapshot of the focus chain of a focus scope.
 
FocusChainSharedPtr getFocusChainSnapshot (bool onlyEffectivelyVisible)
 Returns a snapshot of the focus chain of a focus scope.
 
FocusNavigationManipulatorSharedPtr getFocusNavigationManipulator () const
 Returns the focus navigation manipulator of a focus scope.
 
NodegetRoot () const
 Returns the focus scope node.
 
bool isAttached () const
 Returns whether a focus scope node is attached.
 
bool isFocusChainEmpty () const
 Returns whether the focus chain of a focus scope is empty.
 
bool isFocusChainEmpty (bool onlyEffectivelyVisible) const
 Returns whether the focus chain of a focus scope is empty.
 
void setFocusNavigationManipulator (FocusNavigationManipulatorSharedPtr newManipulator)
 Sets the focus navigation manipulator of the focus scope.
 
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.
 
FocusChainNode tryRestoreScopeFocusedNode (Node *currentFocus, FocusReason reason, FocusChainDirection direction)
 Tries to restore the focus to the last-focused node of a focus scope.
 
Node::VisitorResult visitFocusChain (FocusScopeVisitor &visitor)
 Visits the focus chain of the focus scope, and calls the visitor on each node.
 
Node::VisitorResult visitFocusScope (FocusScopeVisitor &visitor)
 Visits the focusable nodes of the focus scope, including nested focus scope nodes.
 
virtual ~FocusScope ()
 Destructor.
 
FocusChainIndex getLastFocused () const
 Returns the focus chain index of the last-focused node of a focus scope.
 
void setLastFocused (const FocusChainIndex &lastFocus)
 Sets the focus chain index of the last-focused node of the focus scope.
 
void clearLastFocused ()
 Clears the focus chain index of the last-focused node of a focus scope.
 
FocusChainNode getLastFocusedNode () const
 Returns the last-focused node of a focus scope.
 
FocusChainNode setLastFocusedNode (const Node &lastFocused)
 Sets the last-focused node of a focus scope.
 
void clearLastFocusedNode ()
 Set the Node::FocusedProperty value to false, Node::FocusStateProperty to FocusState::NoFocus, and clears the last-focused node of a focus scope.
 

Additional Inherited Members

- Public Types inherited from kanzi::FocusScope
using FocusChainSharedPtr
 The focus chain pointer type.
 
- 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.
 
static FocusScopePtr create (Node &rootNode)
 Creates a focus scope type instance with the rootNode as the root of the focus scope.
 
static void swapScope (FocusScopePtr &newScopeInfo, FocusScopePtr &nodeScopeInfo)
 Safely swaps the focus scope info nodeScopeInfo of a node with the newScopeInfo.
 
- Protected Member Functions inherited from kanzi::OverlayScope
void enableInput (bool enable)
 Enables or disables input handling for the overlay scope.
 
void joinScope (FocusScope &target) override
 Overrides FocusScope::joinScope();.
 
void notifyNodeAttached (Node &node) override
 Overrides FocusScope::notifyNodeAttached().
 
void notifyNodeDetached (Node &node) override
 Overrides FocusScope::notifyNodeDetached().
 
void notifyNodeVisibilityChanged (Node &node) override
 FocusManager calls this method to notify the overlay focus scope about the Node::VisibleProperty value changes in a node.
 
void notifyOverlayExcludedFromStack (bool wasFocused, bool wasForemost) final
 Notifies the overlay scope that it got excluded from the overlay scope stack.
 
void notifyOverlayIncludedInStack (bool isFocused, bool isForemost) final
 Notifies the overlay scope that it got included in the overlay scope stack.
 
void notifyScopeTypeChange (FocusScope &oldScopeData) override
 Overrides FocusScope::notifyScopeTypeChange();.
 
 OverlayScope (Node &root)
 Constructor.
 
void splitScope (FocusScope *source, FocusChainNode targetLastFocusNode) override
 Overrides FocusScope::splitScope();.
 
FocusChainNode trySetFocus (Node &node, FocusReason reason) override
 Overrides OverlayScopeCore::trySetFocus();.
 
void updateContentVisibility (Node &node)
 Updates the visibility of the content of an overlay focus scope.
 
void updateOverlayInFront (OverlayScope *previous)
 Notifies that this scope is brought to the front of the scope stack.
 
void updateOverlayRemovedFromFront (OverlayScope *newForemost)
 Notifies that this focus scope is no longer the foremost focus scope in the focus scope stack.
 
- Protected Member Functions inherited from kanzi::FocusFence
 FocusFence (Node &root, ScopeFlag flags)
 Constructor.
 
- Protected Member Functions inherited from kanzi::FocusScope
void focusNavigationHandler (FocusManager::MoveFocusMessageArguments &args)
 Navigates the focus in a scope.
 
 FocusScope (Node &scopeNode, ScopeFlag flags)
 Constructor.
 
void invalidateFocusChain ()
 Invalidates the focus chain of the focus scope, including the focus chain snapshots of its nested focus scopes.
 
void notifyInvalidateFocusChain () override
 Kanzi calls this method to invalidate the focus chain snapshots of the focus scope.
 
void notifyNodeAttached (Node &node) override
 FocusManager calls this method when a node is attached to the node tree.
 
void notifyNodeDetached (Node &node) override
 FocusManager calls this method to notify that a node from the scope is detached.
 
void swapScopeData (FocusScope &other)
 Swaps the focus scope data of this scope with the focus scope data of the source scope.
 

Detailed Description

Implements the auto-closing modal scopes.

Since
Kanzi 3.9.2

Constructor & Destructor Documentation

◆ AutoClosingModalScope()

kanzi::AutoClosingModalScope::AutoClosingModalScope ( Node & root)
explicit

Constructor.

Member Function Documentation

◆ getType()

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

Returns the scope type.

Returns
Returns FocusScopeType::AutoClosingModal.

Implements kanzi::FocusScope.

◆ getInputPropagationOverlay()

OverlayScope * kanzi::AutoClosingModalScope::getInputPropagationOverlay ( ) const
inlineoverridevirtual

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