Search Results for

    Show / Hide Table of Contents

    Class DropPanel

    Drop Panel arranges control vertically and provides feature to collapse contents.

    Inheritance
    System.Object
    Control
    ContainerControl
    DropPanel
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    ContainerControl._children
    ContainerControl._containsFocus
    ContainerControl._isLayoutLocked
    ContainerControl.LockChildrenRecursive()
    ContainerControl.UnlockChildrenRecursive()
    ContainerControl.RemoveChildren()
    ContainerControl.DisposeChildren()
    ContainerControl.AddChild<T>()
    ContainerControl.AddChild<T>(T)
    ContainerControl.RemoveChild(Control)
    ContainerControl.GetChild(Int32)
    ContainerControl.GetChild<T>()
    ContainerControl.GetChildIndex(Control)
    ContainerControl.GetChildIndexAt(Float2)
    ContainerControl.GetChildAt(Float2)
    ContainerControl.GetChildAt(Float2, Func<Control, Boolean>)
    ContainerControl.GetChildAtRecursive(Float2)
    ContainerControl.GetClientArea()
    ContainerControl.SortChildren()
    ContainerControl.SortChildrenRecursive()
    ContainerControl.OnChildrenChanged()
    ContainerControl.IntersectsChildContent(Control, Float2, Float2)
    ContainerControl.OnNavigate(NavDirection, Float2, Control, List<Control>)
    ContainerControl.NavigationWrap(NavDirection, Float2, List<Control>, Float2)
    ContainerControl.UpdateContainsFocus()
    ContainerControl.UpdateChildrenBounds()
    ContainerControl.OnDestroy()
    ContainerControl.ClearState()
    ContainerControl.DrawSelf()
    ContainerControl.ContainsPoint(Float2, Boolean)
    ContainerControl.PerformLayout(Boolean)
    ContainerControl.RayCast(Float2, Control)
    ContainerControl.OnMouseEnter(Float2)
    ContainerControl.OnMouseWheel(Float2, Single)
    ContainerControl.IsTouchPointerOver(Int32)
    ContainerControl.OnTouchEnter(Float2, Int32)
    ContainerControl.OnTouchDown(Float2, Int32)
    ContainerControl.OnTouchMove(Float2, Int32)
    ContainerControl.OnTouchUp(Float2, Int32)
    ContainerControl.OnTouchLeave(Int32)
    ContainerControl.OnCharInput(Char)
    ContainerControl.OnKeyDown(KeyboardKeys)
    ContainerControl.OnKeyUp(KeyboardKeys)
    ContainerControl.OnDragEnter(Float2, DragData)
    ContainerControl.OnDragMove(Float2, DragData)
    ContainerControl.OnDragLeave()
    ContainerControl.OnDragDrop(Float2, DragData)
    ContainerControl.OnSizeChanged()
    ContainerControl.Children
    ContainerControl.ChildrenCount
    ContainerControl.HasChildren
    ContainerControl.ContainsFocus
    ContainerControl.ClipChildren
    ContainerControl.CullChildren
    ContainerControl.IsTouchOver
    Control.Resize(Float2)
    Control.UpdateBounds()
    Control.UpdateTransform()
    Control.SetAnchorPreset(AnchorPresets, Boolean, Boolean)
    Control.Dispose()
    Control.Focus()
    Control.Defocus()
    Control.OnGotFocus()
    Control.OnLostFocus()
    Control.OnStartContainsFocus()
    Control.OnEndContainsFocus()
    Control.Focus(Control)
    Control.StartMouseCapture(Boolean)
    Control.EndMouseCapture()
    Control.OnEndMouseCapture()
    Control.GetNavTarget(NavDirection)
    Control.GetNavOrigin(NavDirection)
    Control.NavigationFocus()
    Control.OnSubmit()
    Control.OnTouchLeave()
    Control.DoDragDrop(DragData)
    Control.LinkTooltip(String, Tooltip)
    Control.UnlinkTooltip()
    Control.OnTooltipShown(Tooltip)
    Control.IntersectsContent(Float2, Float2)
    Control.PointToParent(ContainerControl, Float2)
    Control.PointToParent(Float2)
    Control.PointToParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(Float2)
    Control.PointFromParent(ContainerControl, Float2)
    Control.PointToWindow(Float2)
    Control.PointFromWindow(Float2)
    Control.PointToScreen(Float2)
    Control.PointFromScreen(Float2)
    Control.OnLocationChanged()
    Control.SetScaleInternal(Float2)
    Control.SetPivotInternal(Float2)
    Control.SetShearInternal(Float2)
    Control.SetRotationInternal(Single)
    Control.OnVisibleChanged()
    Control.OnParentChangedInternal()
    Control.AddUpdateCallbacks(RootControl)
    Control.RemoveUpdateCallbacks(RootControl)
    Control.SetUpdate(Control.UpdateDelegate, Control.UpdateDelegate)
    Control.OnParentResized()
    Control.CompareTo(Object)
    Control.Compare(Control)
    Control.Top
    Control.Bottom
    Control.Left
    Control.Right
    Control.UpperLeft
    Control.UpperRight
    Control.BottomRight
    Control.BottomLeft
    Control.Scale
    Control.Pivot
    Control.Shear
    Control.Rotation
    Control.HasParent
    Control.BackgroundColor
    Control.BackgroundBrush
    Control.Enabled
    Control.EnabledInHierarchy
    Control.Visible
    Control.VisibleInHierarchy
    Control.IsDisposing
    Control.Root
    Control.RootWindow
    Control.DpiScale
    Control.ScreenPos
    Control.AutoFocus
    Control.IsFocused
    Control.IsNavFocused
    Control.IsMouseOver
    Control.IsDragOver
    Control.Tooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEngine.GUI
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [ActorToolbox("GUI")]
    public class DropPanel : ContainerControl, IComparable, IDrawable

    Constructors

    DropPanel()

    Initializes a new instance of the DropPanel class.

    Declaration
    public DropPanel()

    Fields

    _animationProgress

    The animation progress (normalized).

    Declaration
    protected float _animationProgress
    Field Value
    System.Single

    _cachedHeight

    The cached height of the control.

    Declaration
    protected float _cachedHeight
    Field Value
    System.Single

    _headerHeight

    The header height.

    Declaration
    protected float _headerHeight
    Field Value
    System.Single

    _headerTextMargin

    The header text margin.

    Declaration
    protected Margin _headerTextMargin
    Field Value
    Margin

    _isClosed

    The 'is closed' flag.

    Declaration
    protected bool _isClosed
    Field Value
    System.Boolean

    _itemsMargin

    The items margin.

    Declaration
    protected Margin _itemsMargin
    Field Value
    Margin

    _mouseButtonLeftDown

    The 'mouse down' flag (over header) for the left mouse button.

    Declaration
    protected bool _mouseButtonLeftDown
    Field Value
    System.Boolean

    _mouseButtonRightDown

    The 'mouse down' flag (over header) for the right mouse button.

    Declaration
    protected bool _mouseButtonRightDown
    Field Value
    System.Boolean

    _mouseOverHeader

    The 'mouse over header' flag (over header).

    Declaration
    protected bool _mouseOverHeader
    Field Value
    System.Boolean

    HeaderTextColor

    Gets or sets the color used to draw header text.

    Declaration
    [EditorDisplay("Header Style", null)]
    [EditorOrder(2010)]
    [ExpandGroups]
    public Color HeaderTextColor
    Field Value
    Color

    Properties

    ArrowImageClosed

    Gets or sets the image used to render drop panel drop arrow icon when panel is closed.

    Declaration
    [EditorDisplay("Icon Style", null)]
    [EditorOrder(2031)]
    [Tooltip("The image used to render drop panel drop arrow icon when panel is closed.")]
    public IBrush ArrowImageClosed { get; set; }
    Property Value
    IBrush

    ArrowImageOpened

    Gets or sets the image used to render drop panel drop arrow icon when panel is opened.

    Declaration
    [EditorDisplay("Icon Style", null)]
    [EditorOrder(2030)]
    [Tooltip("The image used to render drop panel drop arrow icon when panel is opened.")]
    [ExpandGroups]
    public IBrush ArrowImageOpened { get; set; }
    Property Value
    IBrush

    CloseAnimationTime

    Gets or sets the panel close/open animation duration (in seconds).

    Declaration
    [EditorOrder(10)]
    [Limit(0F, 100F, 0.01F)]
    [Tooltip("The panel close/open animation duration (in seconds).")]
    public float CloseAnimationTime { get; set; }
    Property Value
    System.Single

    EnableContainmentLines

    Gets or sets a value indicating whether to enable containment line drawing,

    Declaration
    [EditorOrder(2)]
    public bool EnableContainmentLines { get; set; }
    Property Value
    System.Boolean

    EnableDropDownIcon

    Gets or sets a value indicating whether enable drop down icon drawing.

    Declaration
    [EditorOrder(1)]
    public bool EnableDropDownIcon { get; set; }
    Property Value
    System.Boolean

    HeaderColor

    Gets or sets the color of the header.

    Declaration
    [EditorDisplay("Header Style", null)]
    [EditorOrder(2011)]
    public Color HeaderColor { get; set; }
    Property Value
    Color

    HeaderColorMouseOver

    Gets or sets the color of the header when mouse is over.

    Declaration
    [EditorDisplay("Header Style", null)]
    [EditorOrder(2012)]
    public Color HeaderColorMouseOver { get; set; }
    Property Value
    Color

    HeaderHeight

    Gets or sets the height of the header.

    Declaration
    [EditorOrder(20)]
    [Limit(1F, 10000F, 0.1F)]
    [Tooltip("The height of the panel header.")]
    public float HeaderHeight { get; set; }
    Property Value
    System.Single

    HeaderRectangle

    Gets the header rectangle.

    Declaration
    protected Rectangle HeaderRectangle { get; }
    Property Value
    Rectangle

    HeaderText

    Gets or sets the header text.

    Declaration
    [EditorOrder(10)]
    [Tooltip("The text to show on a panel header.")]
    public string HeaderText { get; set; }
    Property Value
    System.String

    HeaderTextFont

    Gets or sets the font used to render panel header text.

    Declaration
    [EditorDisplay("Header Text Style", null)]
    [EditorOrder(2020)]
    [ExpandGroups]
    public FontReference HeaderTextFont { get; set; }
    Property Value
    FontReference

    HeaderTextMargin

    Gets or sets the header margin.

    Declaration
    [EditorOrder(30)]
    [Tooltip("The margin of the header text area.")]
    public Margin HeaderTextMargin { get; set; }
    Property Value
    Margin

    HeaderTextMaterial

    Gets or sets the custom material used to render the text. It must has domain set to GUI and have a public texture parameter named Font used to sample font atlas texture with font characters data.

    Declaration
    [EditorDisplay("Header Text Style", null)]
    [EditorOrder(2021)]
    [Tooltip("Custom material used to render the header text. It must has domain set to GUI and have a public texture parameter named Font used to sample font atlas texture with font characters data.")]
    public MaterialBase HeaderTextMaterial { get; set; }
    Property Value
    MaterialBase

    IsClosed

    Gets or sets a value indicating whether this panel is closed.

    Declaration
    [EditorOrder(0)]
    [Tooltip("If checked, the panel is closed, otherwise is open.")]
    public bool IsClosed { get; set; }
    Property Value
    System.Boolean

    ItemsMargin

    Gets or sets the item slots margin (the space between items).

    Declaration
    [EditorOrder(10)]
    [Tooltip("The item slots margin (the space between items).")]
    public Margin ItemsMargin { get; set; }
    Property Value
    Margin

    ShowTooltip

    Gets a value indicating whether show control tooltip (control is in a proper state, tooltip text is valid, etc.). Can be used to implement custom conditions for showing tooltips (eg. based on current mouse location within the control bounds).

    Declaration
    protected override bool ShowTooltip { get; }
    Property Value
    System.Boolean

    Overrides
    Control.ShowTooltip
    Remarks

    Tooltip can be only visible if mouse is over the control area (see IsMouseOver).

    Methods

    CanNavigateChild(Control)

    Checks if this container control can more with focus navigation into the given child control.

    Declaration
    protected override bool CanNavigateChild(Control child)
    Parameters
    Control child

    The child.

    Returns
    System.Boolean

    True if can navigate to it, otherwise false.

    Overrides
    ContainerControl.CanNavigateChild(Control)

    Close(Boolean)

    Closes the group.

    Declaration
    public void Close(bool animate = false)
    Parameters
    System.Boolean animate

    Enable/disable animation feature.

    Draw()

    Draw the control and the children.

    Declaration
    public override void Draw()
    Overrides
    ContainerControl.Draw()

    DrawChildren()

    Draws the children. Can be overridden to provide some customizations. Draw is performed with applied clipping mask for the client area.

    Declaration
    protected override void DrawChildren()
    Overrides
    ContainerControl.DrawChildren()

    GetDesireClientArea(out Rectangle)

    Gets the desire client area rectangle for all the controls.

    Declaration
    public override void GetDesireClientArea(out Rectangle rect)
    Parameters
    Rectangle rect

    The client area rectangle for child controls.

    Overrides
    ContainerControl.GetDesireClientArea(out Rectangle)

    OnChildResized(Control)

    Called when child control gets resized.

    Declaration
    public override void OnChildResized(Control control)
    Parameters
    Control control

    The resized control.

    Overrides
    ContainerControl.OnChildResized(Control)

    OnMouseDoubleClick(Float2, MouseButton)

    When mouse double clicks over control's area

    Declaration
    public override bool OnMouseDoubleClick(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    ContainerControl.OnMouseDoubleClick(Float2, MouseButton)

    OnMouseDown(Float2, MouseButton)

    When mouse goes down over control's area

    Declaration
    public override bool OnMouseDown(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    ContainerControl.OnMouseDown(Float2, MouseButton)

    OnMouseLeave()

    When mouse leaves control's area

    Declaration
    public override void OnMouseLeave()
    Overrides
    ContainerControl.OnMouseLeave()

    OnMouseMove(Float2)

    When mouse moves over control's area

    Declaration
    public override void OnMouseMove(Float2 location)
    Parameters
    Float2 location

    Mouse location in Control Space

    Overrides
    ContainerControl.OnMouseMove(Float2)

    OnMouseUp(Float2, MouseButton)

    When mouse goes up over control's area

    Declaration
    public override bool OnMouseUp(Float2 location, MouseButton button)
    Parameters
    Float2 location

    Mouse location in Control Space

    MouseButton button

    Mouse buttons state (flags)

    Returns
    System.Boolean

    True if event has been handled, otherwise false

    Overrides
    ContainerControl.OnMouseUp(Float2, MouseButton)

    OnShowTooltip(out String, out Float2, out Rectangle)

    Called when tooltip wants to be shown. Allows modifying its appearance.

    Declaration
    public override bool OnShowTooltip(out string text, out Float2 location, out Rectangle area)
    Parameters
    System.String text

    The tooltip text to show.

    Float2 location

    The popup start location (in this control local space).

    Rectangle area

    The allowed area of mouse movement to show tooltip (in this control local space).

    Returns
    System.Boolean

    True if can show tooltip, otherwise false to skip.

    Overrides
    Control.OnShowTooltip(out String, out Float2, out Rectangle)

    OnTestTooltipOverControl(ref Float2)

    Called when tooltip is visible and tests if the given mouse location (in control space) is valid (is over the content).

    Declaration
    public override bool OnTestTooltipOverControl(ref Float2 location)
    Parameters
    Float2 location

    The location.

    Returns
    System.Boolean

    True if tooltip can be still visible, otherwise false.

    Overrides
    Control.OnTestTooltipOverControl(ref Float2)

    Open(Boolean)

    Opens the group.

    Declaration
    public void Open(bool animate = false)
    Parameters
    System.Boolean animate

    Enable/disable animation feature.

    PerformLayoutAfterChildren()

    Perform layout for that container control after performing it for child controls.

    Declaration
    protected override void PerformLayoutAfterChildren()
    Overrides
    ContainerControl.PerformLayoutAfterChildren()

    PerformLayoutBeforeChildren()

    Perform layout for that container control before performing it for child controls.

    Declaration
    protected override void PerformLayoutBeforeChildren()
    Overrides
    ContainerControl.PerformLayoutBeforeChildren()

    Toggle()

    Toggles open state

    Declaration
    public void Toggle()

    Update(Single)

    Perform control update and all its children

    Declaration
    public override void Update(float deltaTime)
    Parameters
    System.Single deltaTime

    Delta time in seconds

    Overrides
    ContainerControl.Update(Single)

    Events

    IsClosedChanged

    Occurs when drop panel is opened or closed.

    Declaration
    public event Action<DropPanel> IsClosedChanged
    Event Type
    System.Action<DropPanel>

    MouseButtonRightClicked

    Occurs when mouse right-clicks over the header.

    Declaration
    public event Action<DropPanel, Float2> MouseButtonRightClicked
    Event Type
    System.Action<DropPanel, Float2>

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)

    See Also

    ContainerControl
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat