Class ColorToolbar
A toolbar that contains a color swatch for the previous color, a color swatch for the current color, and an eye dropper button.
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public class ColorToolbar : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement
Constructors
ColorToolbar()
Default constructor.
Declaration
public ColorToolbar()
Fields
currentColorSwatchUssClassName
The Uss class name of the current color swatch.
Declaration
public const string currentColorSwatchUssClassName = "appui-colortoolbar__currentcolorswatch"
Field Value
Type | Description |
---|---|
string |
eyeDropperUssClassName
The Uss class name of the eye dropper button.
Declaration
public const string eyeDropperUssClassName = "appui-colortoolbar__eyedropper"
Field Value
Type | Description |
---|---|
string |
previousColorSwatchUssClassName
The Uss class name of the previous color swatch.
Declaration
public const string previousColorSwatchUssClassName = "appui-colortoolbar__previouscolorswatch"
Field Value
Type | Description |
---|---|
string |
swatchContainerUssClassName
The Uss class name of the swatch container.
Declaration
public const string swatchContainerUssClassName = "appui-colortoolbar__swatchcontainer"
Field Value
Type | Description |
---|---|
string |
ussClassName
The main Uss class name of this element.
Declaration
public const string ussClassName = "appui-colortoolbar"
Field Value
Type | Description |
---|---|
string |
Properties
currentColor
The current color swatch value.
Declaration
public Color currentColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
eyeDropperButton
The eye dropper button.
Declaration
public ActionButton eyeDropperButton { get; }
Property Value
Type | Description |
---|---|
ActionButton |
previousColor
The previous color swatch value.
Declaration
public Color previousColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
previousColorSwatch
The previous color swatch.
Declaration
public ColorSwatch previousColorSwatch { get; }
Property Value
Type | Description |
---|---|
ColorSwatch |
Events
previousColorSwatchClicked
The event that is invoked when the previous color swatch is clicked.
Declaration
public event Action previousColorSwatchClicked
Event Type
Type | Description |
---|---|
Action |