Search Results for

    Show / Hide Table of Contents

    Class EnumComboBox

    The custom combobox for enum editing. Supports some special cases for flag enums.

    Inheritance
    System.Object
    Control
    FlaxEditor.GUI.ComboBox
    EnumComboBox
    EnumValue
    Implements
    System.IComparable
    IDrawable
    Inherited Members
    Control.Resize(Float2)
    Control.UpdateBounds()
    Control.UpdateTransform()
    Control.SetAnchorPreset(AnchorPresets, Boolean, Boolean)
    Control.Dispose()
    Control.Update(Single)
    Control.Draw()
    Control.PerformLayout(Boolean)
    Control.ClearState()
    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.OnNavigate(NavDirection, Float2, Control, List<Control>)
    Control.NavigationFocus()
    Control.OnSubmit()
    Control.OnMouseEnter(Float2)
    Control.OnMouseMove(Float2)
    Control.OnMouseLeave()
    Control.OnMouseWheel(Float2, Single)
    Control.OnMouseDown(Float2, MouseButton)
    Control.OnMouseUp(Float2, MouseButton)
    Control.OnMouseDoubleClick(Float2, MouseButton)
    Control.OnCharInput(Char)
    Control.OnKeyDown(KeyboardKeys)
    Control.OnKeyUp(KeyboardKeys)
    Control.IsTouchPointerOver(Int32)
    Control.OnTouchEnter(Float2, Int32)
    Control.OnTouchDown(Float2, Int32)
    Control.OnTouchMove(Float2, Int32)
    Control.OnTouchUp(Float2, Int32)
    Control.OnTouchLeave(Int32)
    Control.OnTouchLeave()
    Control.OnDragEnter(Float2, DragData)
    Control.OnDragMove(Float2, DragData)
    Control.OnDragDrop(Float2, DragData)
    Control.OnDragLeave()
    Control.DoDragDrop(DragData)
    Control.LinkTooltip(String, Tooltip)
    Control.UnlinkTooltip()
    Control.OnShowTooltip(String, Float2, Rectangle)
    Control.OnTooltipShown(Tooltip)
    Control.OnTestTooltipOverControl(Float2)
    Control.RayCast(Float2, Control)
    Control.IntersectsContent(Float2, Float2)
    Control.ContainsPoint(Float2, Boolean)
    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.OnSizeChanged()
    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.OnDestroy()
    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.ContainsFocus
    Control.IsFocused
    Control.IsNavFocused
    Control.IsMouseOver
    Control.IsTouchOver
    Control.IsDragOver
    Control.Tooltip
    Control.ShowTooltip
    Control.EditorBounds
    Control.LocationChanged
    Control.SizeChanged
    Control.ParentChanged
    Control.VisibleChanged
    Namespace: FlaxEditor.GUI
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public class EnumComboBox : ComboBox, IComparable, IDrawable

    Constructors

    EnumComboBox(Type, EnumComboBox.BuildEntriesDelegate, EnumDisplayAttribute.FormatMode)

    Initializes a new instance of the EnumElement class.

    Declaration
    public EnumComboBox(Type type, EnumComboBox.BuildEntriesDelegate customBuildEntriesDelegate = null, EnumDisplayAttribute.FormatMode formatMode)
    Parameters
    System.Type type

    The enum type.

    EnumComboBox.BuildEntriesDelegate customBuildEntriesDelegate

    The custom entries layout builder. Allows to hide existing or add different enum values to editor.

    EnumDisplayAttribute.FormatMode formatMode

    The formatting mode.

    Fields

    _cachedValue

    The cached value from the UI.

    Declaration
    protected long _cachedValue
    Field Value
    System.Int64

    _entries

    The enum entries. The same order as items in combo box.

    Declaration
    protected readonly List<EnumComboBox.Entry> _entries
    Field Value
    System.Collections.Generic.List<EnumComboBox.Entry>

    _enumType

    The enum type.

    Declaration
    protected readonly Type _enumType
    Field Value
    System.Type

    _hasValueCached

    True if has value cached, otherwise false.

    Declaration
    protected bool _hasValueCached
    Field Value
    System.Boolean

    Properties

    EnumTypeValue

    Gets or sets the value of the enum (may not be int).

    Declaration
    public object EnumTypeValue { get; set; }
    Property Value
    System.Object

    IsFlags

    Gets a value indicating whether this enum has flags.

    Declaration
    public bool IsFlags { get; }
    Property Value
    System.Boolean

    Value

    Gets or sets the value.

    Declaration
    public long Value { get; set; }
    Property Value
    System.Int64

    Methods

    BuildEntriesDefault(Type, List<EnumComboBox.Entry>, EnumDisplayAttribute.FormatMode)

    Builds the default entries for the given enum type.

    Declaration
    public static void BuildEntriesDefault(Type type, List<EnumComboBox.Entry> entries, EnumDisplayAttribute.FormatMode formatMode)
    Parameters
    System.Type type

    The type.

    System.Collections.Generic.List<EnumComboBox.Entry> entries

    The output entries.

    EnumDisplayAttribute.FormatMode formatMode

    The formatting mode.

    CacheValue()

    Caches the selected UI enum value.

    Declaration
    protected void CacheValue()

    OnItemClicked(Int32)

    Declaration
    protected override void OnItemClicked(int index)
    Parameters
    System.Int32 index

    Overrides
    FlaxEditor.GUI.ComboBox.OnItemClicked(System.Int32)

    OnLayoutMenuButton(ContextMenuButton, Int32, Boolean)

    Declaration
    protected override void OnLayoutMenuButton(ContextMenuButton button, int index, bool construct = false)
    Parameters
    FlaxEditor.GUI.ContextMenu.ContextMenuButton button

    System.Int32 index

    System.Boolean construct

    Overrides
    FlaxEditor.GUI.ComboBox.OnLayoutMenuButton(FlaxEditor.GUI.ContextMenu.ContextMenuButton, System.Int32, System.Boolean)

    OnValueChanged()

    Called when value gets changed.

    Declaration
    protected virtual void OnValueChanged()

    Events

    EnumValueChanged

    Occurs when value gets changed.

    Declaration
    public event Action<EnumComboBox> EnumValueChanged
    Event Type
    System.Action<EnumComboBox>

    ValueChanged

    Occurs when value gets changed.

    Declaration
    public event Action ValueChanged
    Event Type
    System.Action

    Extension Methods

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

    See Also

    FlaxEditor.GUI.ComboBox
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat