{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class AnchorPopup<T> | App UI | 0.5.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AnchorPopup<T>

    Base class for Popup that can be anchored to another UI Element.

    Inheritance
    object
    Popup
    Popup<T>
    AnchorPopup<T>
    MenuBuilder
    Popover
    Tooltip
    Inherited Members
    Popup<T>.m_LastFocusedElement
    Popup<T>.shown
    Popup<T>.dismissed
    Popup<T>.SetKeyboardDismiss(bool)
    Popup<T>.SetLastFocusedElement(Focusable)
    Popup<T>.InvokeShownEventHandlers()
    Popup.k_NextFrameDurationMs
    Popup.k_PopupShow
    Popup.k_PopupDismiss
    Popup.handler
    Popup.keyboardDismissEnabled
    Popup.view
    Popup.targetParent
    Popup.contentView
    Popup.context
    Popup.Dismiss()
    Popup.Dismiss(DismissType)
    Popup.Show()
    Popup.GetFocusableElement()
    Popup.ShouldAnimate()
    Popup.OnViewKeyDown(KeyDownEvent)
    Popup.FindSuitableParent(VisualElement)
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.AppUI.UI
    Assembly: solution.dll
    Syntax
    public abstract class AnchorPopup<T> : Popup<T> where T : AnchorPopup<T>
    Type Parameters
    Name Description
    T

    The sealed anchor popup class type.

    Constructors

    Name Description
    AnchorPopup(VisualElement, ApplicationContext, VisualElement, VisualElement)

    Default constructor.

    Properties

    Name Description
    anchor

    The popup's anchor.

    arrowVisible

    True if the small arrow used next to the anchor should be visible, False otherwise.

    containerPadding

    The padding in pixels, inside the popup panel's container.

    crossOffset

    The offset in pixels, in the direction of the secondary placement vector.

    currentPlacement

    The current placement. The current placement can be different from the placement set with SetPlacement(PopoverPlacement), based on the current position of the anchor on the screen and the ability to flip placement.

    offset

    The offset in pixels, in the direction of the primary placement vector.

    outsideClickDismissEnabled

    True if the the popup can be dismissed by clicking outside of it, False otherwise.

    outsideClickStrategy

    The strategy used to determine if the click is outside of the popup.

    placement

    The desired placement. You can set the desired placement using SetPlacement(PopoverPlacement).

    shouldFlip

    True if the popup will be displayed at the opposite position if there's not enough place using the preferred placement, False otherwise.

    Methods

    Name Description
    AnimateViewIn()

    Start the animation for this popup.

    AnimateViewOut(DismissType)

    Start the hide animation for this popup.

    GetMovableElement()

    Method which must return the visual element that needs to be moved, based on the anchor position and size.

    HideView(DismissType)

    Called when the popup's Handler has received a k_PopupDismiss message.

    InvokeDismissedEventHandlers(DismissType)

    Called when the popup has been dismissed. This method will invoke any handlers attached to the dismissed event.

    RefreshPosition()

    Recompute the position of the popup based on the anchor's position and size, but also others properties such as the offset, crossOffset, shouldFlip and placement.

    SetAnchor(VisualElement)

    Set a new value for the anchor property. This will trigger a refresh of the current popup position automatically.

    SetArrowVisible(bool)

    Set a new value for the arrowVisible property. This will trigger a refresh of the current popup position automatically.

    SetContainerPadding(int)

    Set a new value for the containerPadding property. This will trigger a refresh of the current popup position automatically.

    SetCrossOffset(int)

    Set a new value for the crossOffset property.

    SetOffset(int)

    Set a new value for the offset property.

    SetOutsideClickDismiss(bool)

    Activate the possibility to dismiss the popup by clicking outside of it.

    SetOutsideClickStrategy(OutsideClickStrategy)

    Set the strategy used to determine if the click is outside of the popup.

    SetPlacement(PopoverPlacement)

    Set the preferred placement value. This will trigger a refresh of the current popup position automatically.

    SetShouldFlip(bool)

    Set a new value for the shouldFlip property. This will trigger a refresh of the current popup position automatically.

    ShouldDismiss(DismissType)

    Returns True if the popup should be dismissed, False otherwise.

    ShowView()

    Called when the popup's Handler has received a k_PopupShow message. In this method the view should become visible at some point (directly or via an animation).

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)