Search Results for

    Show / Hide Table of Contents

    Class Panel

    Panel UI control.

    Inheritance
    System.Object
    Control
    ContainerControl
    FlaxEngine.GUI.ScrollableControl
    Panel
    DockWindow
    NavigationBar
    Timeline
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    ContainerControl._children
    ContainerControl._containsFocus
    ContainerControl._isLayoutLocked
    ContainerControl.LockChildrenRecursive()
    ContainerControl.UnlockChildrenRecursive()
    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.OnNavigate(NavDirection, Float2, Control, List<Control>)
    ContainerControl.CanNavigateChild(Control)
    ContainerControl.NavigationWrap(NavDirection, Float2, List<Control>, Float2)
    ContainerControl.UpdateContainsFocus()
    ContainerControl.UpdateChildrenBounds()
    ContainerControl.PerformLayoutAfterChildren()
    ContainerControl.OnDestroy()
    ContainerControl.Update(Single)
    ContainerControl.ClearState()
    ContainerControl.DrawSelf()
    ContainerControl.DrawChildren()
    ContainerControl.RayCast(Float2, Control)
    ContainerControl.OnMouseEnter(Float2)
    ContainerControl.OnMouseMove(Float2)
    ContainerControl.OnMouseLeave()
    ContainerControl.OnMouseUp(Float2, MouseButton)
    ContainerControl.OnMouseDoubleClick(Float2, MouseButton)
    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.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.OnShowTooltip(String, Float2, Rectangle)
    Control.OnTooltipShown(Tooltip)
    Control.OnTestTooltipOverControl(Float2)
    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.ShowTooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEngine.GUI
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [ActorToolbox("GUI")]
    public class Panel : ScrollableControl, IComparable, IDrawable

    Constructors

    Panel()

    Initializes a new instance of the Panel class.

    Declaration
    public Panel()

    Panel(ScrollBars, Boolean)

    Initializes a new instance of the Panel class.

    Declaration
    public Panel(ScrollBars scrollBars, bool autoFocus = false)
    Parameters
    ScrollBars scrollBars

    The scroll bars.

    System.Boolean autoFocus

    True if control can accept user focus

    Properties

    AlwaysShowScrollbars

    Gets or sets a value indicating whether always show scrollbars. Otherwise show them only if scrolling is available.

    Declaration
    [EditorDisplay("Scrollbar Style", null)]
    [EditorOrder(1502)]
    [Tooltip("Whether always show scrollbars. Otherwise show them only if scrolling is available.")]
    public bool AlwaysShowScrollbars { get; set; }
    Property Value
    System.Boolean

    ControlsBounds

    Gets the cached scroll area bounds. Used to scroll contents of the panel control. Cached during performing layout.

    Declaration
    public Rectangle ControlsBounds { get; }
    Property Value
    Rectangle

    ScrollBars

    Gets or sets the scroll bars usage by this panel.

    Declaration
    [EditorDisplay("Scrollbar Style", null)]
    [EditorOrder(1500)]
    [Tooltip("The scroll bars usage.")]
    public ScrollBars ScrollBars { get; set; }
    Property Value
    ScrollBars

    ScrollBarsSize

    Gets or sets the size of the scroll bars.

    Declaration
    [EditorDisplay("Scrollbar Style", null)]
    [EditorOrder(1501)]
    [Tooltip("Scroll bars size.")]
    public float ScrollBarsSize { get; set; }
    Property Value
    System.Single

    ScrollbarThumbColor

    The color of the scroll bar thumb.

    Declaration
    [EditorDisplay("Scrollbar Style", null)]
    [EditorOrder(1601)]
    public Color ScrollbarThumbColor { get; set; }
    Property Value
    Color

    ScrollbarThumbSelectedColor

    The color of the scroll bar thumb when selected.

    Declaration
    [EditorDisplay("Scrollbar Style", null)]
    [EditorOrder(1602)]
    public Color ScrollbarThumbSelectedColor { get; set; }
    Property Value
    Color

    ScrollbarTrackColor

    The color of the scroll bar track.

    Declaration
    [EditorDisplay("Scrollbar Style", null)]
    [EditorOrder(1600)]
    [ExpandGroups]
    public Color ScrollbarTrackColor { get; set; }
    Property Value
    Color

    ScrollMargin

    Gets or sets the scroll margin applies to the child controls area. Can be used to expand the scroll area bounds by adding a margin.

    Declaration
    [EditorDisplay("Scrollbar Style", null)]
    [EditorOrder(1503)]
    [Tooltip("Scroll margin applies to the child controls area. Can be used to expand the scroll area bounds by adding a margin.")]
    public Margin ScrollMargin { get; set; }
    Property Value
    Margin

    ViewBottom

    Gets the view bottom.

    Declaration
    public Float2 ViewBottom { get; }
    Property Value
    Float2

    Methods

    Arrange()

    Arranges the child controls.

    Declaration
    protected virtual void Arrange()

    ArrangeAndGetBounds()

    Arranges the child controls and gets their bounds.

    Declaration
    protected virtual void ArrangeAndGetBounds()

    ContainsPoint(ref Float2, Boolean)

    Checks if this control contains given point in local Control Space.

    Declaration
    public override bool ContainsPoint(ref Float2 location, bool precise = false)
    Parameters
    Float2 location

    Point location in Control Space to check

    System.Boolean precise

    True if perform precise intersection test against the control content (eg. with hit mask or transparency threshold). Otherwise, only simple bounds-check will be performed.

    Returns
    System.Boolean

    True if point is inside control's area, otherwise false.

    Overrides
    ContainerControl.ContainsPoint(ref Float2, Boolean)

    DisposeChildren()

    Removes and disposes all the child controls

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

    Draw()

    Draw the control and the children.

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

    FastScroll()

    Cuts the scroll bars value smoothing and imminently goes to the target scroll value.

    Declaration
    public void FastScroll()

    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)

    IntersectsChildContent(Control, Float2, out Float2)

    Declaration
    public override bool IntersectsChildContent(Control child, Float2 location, out Float2 childSpaceLocation)
    Parameters
    Control child

    Float2 location

    Float2 childSpaceLocation

    Returns
    System.Boolean

    Overrides
    FlaxEngine.GUI.ScrollableControl.IntersectsChildContent(FlaxEngine.GUI.Control, FlaxEngine.Float2, FlaxEngine.Float2)

    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)

    OnDragMove(ref Float2, DragData)

    When mouse dragging moves over control's area

    Declaration
    public override DragDropEffect OnDragMove(ref Float2 location, DragData data)
    Parameters
    Float2 location

    Mouse location in Control Space

    DragData data

    The data. See DragDataText and DragDataFiles.

    Returns
    DragDropEffect

    The drag event result effect.

    Overrides
    ContainerControl.OnDragMove(ref Float2, DragData)

    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)

    OnMouseWheel(Float2, Single)

    When mouse wheel moves

    Declaration
    public override bool OnMouseWheel(Float2 location, float delta)
    Parameters
    Float2 location

    Mouse location in Control Space

    System.Single delta

    Mouse wheel move delta. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user. Normalized to [-1;1] range.

    Returns
    System.Boolean

    True if event has been handled

    Overrides
    ContainerControl.OnMouseWheel(Float2, Single)

    PerformLayout(Boolean)

    Update control layout

    Declaration
    public override void PerformLayout(bool force = false)
    Parameters
    System.Boolean force

    True if perform layout by force even if cached state wants to skip it due to optimization.

    Overrides
    ContainerControl.PerformLayout(Boolean)

    PerformLayoutBeforeChildren()

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

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

    RemoveChildren()

    Unlinks all the child controls.

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

    ScrollViewTo(Float2, Boolean)

    Scrolls the view to the given location.

    Declaration
    public void ScrollViewTo(Float2 location, bool fastScroll = false)
    Parameters
    Float2 location

    The location.

    System.Boolean fastScroll

    True of scroll to the item quickly without smoothing.

    ScrollViewTo(Control, Boolean)

    Scrolls the view to the given control area.

    Declaration
    public void ScrollViewTo(Control c, bool fastScroll = false)
    Parameters
    Control c

    The control.

    System.Boolean fastScroll

    True of scroll to the item quickly without smoothing.

    ScrollViewTo(Rectangle, Boolean)

    Scrolls the view to the given area.

    Declaration
    public void ScrollViewTo(Rectangle bounds, bool fastScroll = false)
    Parameters
    Rectangle bounds

    The bounds.

    System.Boolean fastScroll

    True of scroll to the item quickly without smoothing.

    SetViewOffset(ref Float2)

    Declaration
    protected override void SetViewOffset(ref Float2 value)
    Parameters
    Float2 value

    Overrides
    FlaxEngine.GUI.ScrollableControl.SetViewOffset(FlaxEngine.Float2)

    Extension Methods

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

    See Also

    FlaxEngine.GUI.ScrollableControl
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat