Class FocusManagerMetadata

Defines properties and message types for FocusManager.

Property Types

See also PropertyType
FocusManagerMetadata.FocusOrderProperty

Sets the focus chain order of the node within the focus scope.

FocusManagerMetadata.CyclicFocusNavigationProperty

Sets whether the focus chain navigation within the focus scope is cyclic. When you enable this property:

  • When the user navigates in the forward direction and the focus reaches the last focusable UI element of the focus scope, the focus navigation moves to the first focusable UI element.
  • When the user navigates in the backward direction and the focus reaches the first focusable UI element of the focus scope, the focus navigation moves to the last focusable UI element.
FocusManagerMetadata.FocusScopeTypeProperty

Sets the type of the focus scope node:

  • Group groups focusable nodes.
  • Fence keeps the focus chain navigation inside the scope and does not allow the focus chain navigation to enter or leave that scope.
  • Modal overlay blocks the key and touch input that originates outside of its boundaries and keeps the focus navigation within the scope boundaries.
  • Auto-Closing Modal overlay loses focus when key or touch input originates from a node that is outside of its node tree, and suppresses that input.
  • Modeless overlay propagates the key and touch input that originates outside of its boundaries to the nodes outside of its boundaries.
  • Auto-Closing Modeless overlay loses focus when key or touch input originates from a node that is outside of its boundaries, and propagates that input.
FocusManagerMetadata.FocusOnPressProperty

Sets where to set the focus when the user presses the node that has this property:

  • None (0) keeps the focus where it was. This is the default.
  • Node (1) sets the focus to the node.
  • Node or ancestor (2) sets the focus to the node or, if that fails, to the closest focusable ancestor node.
  • Node or overlay (3) sets the focus to the node or, if that fails, to the closest ancestor overlay scope, which then forwards the focus according to its settings.

The descendants of the node where you set this property inherit value of the property.

Message Types

See also MessageType
FocusManagerMetadata.AboutToLoseFocusMessage

Kanzi sends this message before the focused node loses focus.

Arguments: FocusManagerMetadata.PreFocusMessageArguments

FocusManagerMetadata.AboutToGainFocusMessage

Kanzi sends this message before a focusable node receives focus.

Arguments: FocusManagerMetadata.PreFocusMessageArguments

FocusManagerMetadata.FocusLostMessage

Kanzi sends this message to the node that lost focus.

Arguments: FocusManagerMetadata.PostFocusMessageArguments

FocusManagerMetadata.FocusGainedMessage

Kanzi sends this message to the node that received focus.

Arguments: FocusManagerMetadata.PostFocusMessageArguments

FocusManagerMetadata.OverlayBroughtToFrontMessage

Occurs when an overlay focus scope becomes the foremost overlay scope in the overlay focus scope stack.

Arguments: FocusManagerMetadata.OverlayBroughtToFrontMessageArguments

FocusManagerMetadata.ScopeBroughtToFrontMessage

Occurs when an overlay focus scope is brought to front. Deprecated. Use Overlay Brought To Front instead.

Arguments: FocusManagerMetadata.OverlayBroughtToFrontMessageArguments

FocusManagerMetadata.OverlaySentToBackMessage

Occurs when an overlay focus scope is no longer the foremost overlay scope in the overlay focus scope stack.

Arguments: FocusManagerMetadata.OverlaySentToBackMessageArguments

FocusManagerMetadata.ScopeSentToBackMessage

Occurs when a foremost overlay focus scope is sent to back. Deprecated. Use Overlay Sent to Back instead.

Arguments: FocusManagerMetadata.OverlaySentToBackMessageArguments

FocusManagerMetadata.FocusEnteredFocusScopeMessage

When focus enters a focus scope, Kanzi sends this message to the focus scope node that contains the node that gains focus.

Arguments: FocusManagerMetadata.FocusEnteredFocusScopeMessageArguments

FocusManagerMetadata.FocusLeftFocusScopeMessage

When focus leaves a focus scope, Kanzi sends this message to the focus scope node that contains the node that loses focus.

Arguments: FocusManagerMetadata.FocusLeftFocusScopeMessageArguments

FocusManagerMetadata.OverlayGainedFocusMessage

When an overlay scope gains focus, Kanzi sends this message to the overlay scope node that contains the node that gains focus.

Arguments: FocusManagerMetadata.OverlayGainedFocusMessageArguments

FocusManagerMetadata.OverlayLostFocusMessage

When an overlay scope loses focus, Kanzi sends this message to the overlay scope node that contains the node that loses focus.

Arguments: FocusManagerMetadata.OverlayLostFocusMessageArguments

FocusManagerMetadata.MoveScopeFocusForwardMessage

When a focus scope node receives this message, it moves the focus to the next focusable node of the focus scope.

Arguments: FocusManagerMetadata.MoveFocusMessageArguments

FocusManagerMetadata.MoveScopeFocusBackwardMessage

When a focus scope node receives this message, it moves the focus to the previous focusable node of the focus scope.

Arguments: FocusManagerMetadata.MoveFocusMessageArguments

FocusManagerMetadata.InputOutsideOverlayMessageMessage

Kanzi sends this message to an overlay focus scope when the application area outside the boundaries of that overlay receives input.

Arguments: FocusManagerMetadata.InputOutsideOverlayMessageArguments

Message Arguments

Message arguments classes define message arguments used for different message types. Each class defines a number of property types - arguments - together with getter and setter functions for them.

FocusManagerMetadata.FocusEnteredFocusScopeMessageArguments

FocusManagerMetadata.FocusLeftFocusScopeMessageArguments

FocusManagerMetadata.InputOutsideOverlayMessageArguments

FocusManagerMetadata.MoveFocusMessageArguments

FocusManagerMetadata.OverlayBroughtToFrontMessageArguments

FocusManagerMetadata.OverlayGainedFocusMessageArguments

FocusManagerMetadata.OverlayLostFocusMessageArguments

FocusManagerMetadata.OverlaySentToBackMessageArguments

FocusManagerMetadata.PostFocusMessageArguments

FocusReasonProperty

Sets the focus reason:

  • Force Focus. Focus was forced on the node.
  • Focus Chain Navigation. Focus was moved as a result of navigation in the focus chain.
  • Node Hidden. The Visible property of the focused node was disabled.
  • Force Focus to Root. Focus was forced on the root node of the focus scope.
Example
local value = arguments:getFocusReasonProperty()
arguments:setFocusReasonProperty(value)

FocusManagerMetadata.PreFocusMessageArguments

FocusManagerMetadata.ScopeStateChangeMessageArguments

ReasonValueProperty

The reason the modal or popup focus scope state is changed:

  • Force Focus specifies that the focus scope is explicitly brought to front or sent to back.
Example
local value = arguments:getReasonValueProperty()
arguments:setReasonValueProperty(value)