+ /// <summary>
+ /// Sets the root view to start moving focus when DefaultAlgorithm is enabled.
+ /// This will only look for focusable Views within that View tree when looking for the next focus.
+ /// </summary>
+ /// <param name="rootView">The root view in which to find the next focusable view.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetFocusFinderRootView(View rootView)
+ {
+ Interop.FocusManager.SetFocusFinderRootView(SwigCPtr, View.getCPtr(rootView));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Reset the root view that starts moving focus when DefaultAlgorithm is enabled.
+ /// When reset, the window becomes root.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void ResetFocusFinderRootView()
+ {
+ Interop.FocusManager.ResetFocusFinderRootView(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Decide using focus indicator or not
+ /// </summary>
+ /// <param name="enable">Whether using focus indicator or not</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void EnableFocusIndicator(bool enable)
+ {
+ Interop.FocusManager.EnableFocusIndicator(SwigCPtr, enable);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Check focus indicator is enabled or not
+ /// </summary>
+ /// <returns>Whether focus indicator is enabled</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsFocusIndicatorEnabled()
+ {
+ bool ret = Interop.FocusManager.IsFocusIndicatorEnabled(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Get a default focus indicator
+ /// </summary>
+ /// <remarks>
+ /// The type actually <see cref="Tizen.NUI.BaseComponents.ImageView"/> of blue border squred png image, so it would be difficult to modify itself.
+ /// To change focus indicator, creating new indicator and assigning it to FocusIndicator are recommended.
+ /// For example,
+ /// <code>
+ /// FocusManager.Instance.FocusIndicator = new View()
+ /// {
+ /// PositionUsesPivotPoint = true,
+ /// PivotPoint = new Position(0, 0, 0),
+ /// WidthResizePolicy = ResizePolicyType.FillToParent,
+ /// HeightResizePolicy = ResizePolicyType.FillToParent,
+ /// BorderlineColor = Color.Orange,
+ /// BorderlineWidth = 4.0f,
+ /// BorderlineOffset = -1f,
+ /// BackgroundColor = new Color(0.2f, 0.2f, 0.2f, 0.2f),
+ /// };
+ /// </code>
+ /// </remarks>
+ /// <returns>instance of default focus indicator</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public View GetDefaultFocusIndicator()
+ {
+ ImageView ret = new ImageView(FrameworkInformation.ResourcePath + "keyboard_focus.9.png")
+ {
+ Name = "DefaultFocusIndicatorCreatedByNUI",
+ PositionUsesAnchorPoint = true,
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = ParentOrigin.Center,
+ Position2D = new Position2D(0, 0),
+ };
+ ret.SetResizePolicy(ResizePolicyType.FillToParent, DimensionType.AllDimensions);
+ return ret;
+ }
+