Class BaseTextElement
Base class for all textual App UI components.
Inheritance
BaseTextElement
Implements
Inherited Members
TextElement.HandleEventBubbleUp(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.TryGetBinding(BindingId, out Binding)
VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
CallbackEventHandler.NotifyPropertyChanged(in BindingId)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
[UxmlElement]
public abstract class BaseTextElement : TextElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IVisualElementScheduler, IBindable, INotifyValueChanged<string>, ITextEdition, ITextElementExperimentalFeatures, IExperimentalFeatures, ITextSelection, IContextOverrideElement, IAdditionalDataHolder
Constructors
BaseTextElement()
Default constructor.
Declaration
protected BaseTextElement()
Fields
contextPrefix
The context prefix used as USS selector.
Declaration
public const string contextPrefix = "appui--"
Field Value
| Type | Description |
|---|---|
| string |
Properties
langOverride
The language to use in this part of the UI.
Declaration
[Tooltip("The language to use in this part of the UI.")]
[CreateProperty]
[UxmlAttribute("lang")]
public Optional<string> langOverride { get; set; }
Property Value
| Type | Description |
|---|---|
| Optional<string> |
layoutDirectionOverride
The layout direction to use in this part of the UI.
Declaration
[Tooltip("The layout direction to use in this part of the UI.")]
[CreateProperty]
[UxmlAttribute("dir")]
public OptionalEnum<Dir> layoutDirectionOverride { get; set; }
Property Value
| Type | Description |
|---|---|
| OptionalEnum<Dir> |
preferredTooltipPlacementOverride
Preferred placement for tooltips.
Declaration
[Tooltip("Preferred placement for tooltips.\nNote that this is only a hint and the tooltip may be placed differently if there is not enough space.")]
[CreateProperty]
[UxmlAttribute("preferred-tooltip-placement")]
public OptionalEnum<PopoverPlacement> preferredTooltipPlacementOverride { get; set; }
Property Value
| Type | Description |
|---|---|
| OptionalEnum<PopoverPlacement> |
scaleOverride
The scale to use in this part of the UI.
Declaration
[Tooltip("The scale to use in this part of the UI.")]
[CreateProperty]
[UxmlAttribute("scale")]
public Optional<string> scaleOverride { get; set; }
Property Value
| Type | Description |
|---|---|
| Optional<string> |
themeOverride
The theme to use in this part of the UI.
Declaration
[Tooltip("The theme to use in this part of the UI.")]
[CreateProperty]
[UxmlAttribute("theme")]
public Optional<string> themeOverride { get; set; }
Property Value
| Type | Description |
|---|---|
| Optional<string> |
tooltipDelayMsOverride
Delay in milliseconds before showing a tooltip.
Declaration
[Tooltip("Delay in milliseconds before showing a tooltip.")]
[CreateProperty]
[UxmlAttribute("tooltip-delay-ms")]
public Optional<int> tooltipDelayMsOverride { get; set; }
Property Value
| Type | Description |
|---|---|
| Optional<int> |
Methods
GetLayoutDirectionUssClassName(Dir)
Declaration
public static string GetLayoutDirectionUssClassName(Dir enumValue)
Parameters
| Type | Name | Description |
|---|---|---|
| Dir | enumValue |
Returns
| Type | Description |
|---|---|
| string |