Toolbox 0.0.1
Ritchie's accessible game engine'
Loading...
Searching...
No Matches
Dropdown< TItemType, TView > Class Template Referenceabstract
Inheritance diagram for Dropdown< TItemType, TView >:
IInputField< TValue > IUpdateThemeProperties IMouseUpHandler IMouseDownHandler IMouseLeaveHandler IMouseEnterHandler IDropdownButtonVisual ILoseFocusHandler IGainFocusHandler IMouseClickHandler Widget StringDropdown

Public Member Functions

 Dropdown ()
 
void SetValue (TItemType newValue)
 
void SetItems (IEnumerable< TItemType > itemSource)
 
 DropdownCollection (Dropdown< TItemType, TView > dropdown)
 
IEnumerator< TItemType > GetEnumerator ()
 
int IndexOf (TItemType item)
 
void SetItems (IEnumerable< TItemType > itemSource)
 
void Add (TItemType item)
 
void Clear ()
 
bool Contains (TItemType item)
 
void CopyTo (TItemType[] array, int arrayIndex)
 
bool Remove (TItemType item)
 
 DropdownListAdapter (Dropdown< TItemType, TView > dropdown)
 
void UpdateItems ()
 
void OnMouseClick (MouseButtonEvent e)
 
void OnMouseEnter (MouseMoveEvent e)
 
void OnMouseLeave (MouseMoveEvent e)
 
void OnMouseDown (MouseButtonEvent e)
 
void OnMouseUp (MouseButtonEvent e)
 
 DropdownViewHolder (int itemIndex, Box root)
 
void UpdateView (TItemType data, bool isActiveItem)
 
void OnMouseClick (MouseButtonEvent e)
 
void OnFocusGained (FocusEvent e)
 
void OnFocusLost (FocusEvent e)
 
 DropdownOverlay (Dropdown< TItemType, TView > dropdown)
 
void OnMouseScroll (MouseScrollEvent e)
 
void OnMouseDown (MouseButtonEvent e)
 
void OnMouseUp (MouseButtonEvent e)
 
void OnMouseClick (MouseButtonEvent e)
 
void OnMouseEnter (MouseMoveEvent e)
 
void OnMouseLeave (MouseMoveEvent e)
 
void OnMouseDown (MouseButtonEvent e)
 
void OnMouseUp (MouseButtonEvent e)
 
void UpdateThemeProperties ()
 Retrieves layout properties from the visual style. Called by the UI system on every frame before layout updates occur. If layout properties change during this method call, the widget will automatically invalidate its own layout.
 
- Public Member Functions inherited from Widget
T? FindParent< T > ()
 
IEnumerable< WidgetEnumerateChildren ()
 
bool ContainsChild (Widget? widget)
 
bool BelongsToParent (Widget widget)
 
void InvalidateClipping (bool recursive=false)
 
void InvalidateGeometry (bool invalidateChildren=false)
 
IVisualStyleGetVisualStyleOverride ()
 Walks up the widget tree from this widget to the top-level, returning the first visual style override that isn't null. If no widgets in the path override the global visual style, then null will be returned.
 
bool IsInsideClipRegion (Point point)
 
GetCustomProperty< T > ()
 
void SetCustomProperty< T > (T newValue)
 
GetCustomProperties< T > ()
 
IFontFamily GetFont (PresetFontFamily family)
 
void GiveFocus ()
 
readonly struct BackgroundStyleProperties (Texture2D? fillImage, Color fillColor, int strokeThickness, Color strokeColor, Rounding rounding)
 
virtual void Inspect (IInspector inspector)
 
void InvalidateOwnLayout ()
 
void Invalidate (InvalidationMode invalidationMode)
 
void InvalidateLayout ()
 
void UpdateLayout (IGuiContext context, LayoutRect availableSpace)
 
Point GetCachedContentSize (Point availableSize)
 
- Public Member Functions inherited from IInputField< TValue >
void SetValue (TValue newValue)
 

Public Attributes

Action< int >? Clicked
 

Protected Member Functions

override Point GetContentSize (Point availableSize)
 
override void ArrangeChildren (IGuiContext context, LayoutRect availableSpace)
 
override void BeforeRender ()
 
override void RebuildGeometry (GeometryHelper geometry)
 
override void RebuildClippingZone (GeometryHelper geometry)
 
override DropdownViewHolder CreateViewHolder (int itemIndex, Box rootWidget)
 
override void UpdateView (DropdownViewHolder viewHolder)
 
override void RebuildGeometry (GeometryHelper geometry)
 
override Point GetContentSize (Point availableSize)
 
override void BeforeRender ()
 
override void ArrangeChildren (IGuiContext context, LayoutRect availableSpace)
 
override void RebuildGeometry (GeometryHelper geometry)
 
- Protected Member Functions inherited from Widget
virtual bool ShouldRenderChild (Widget childWidget)
 
virtual void OnAddedToParent ()
 
virtual void OnRemovedFromParent ()
 
virtual void OnParentChanged ()
 
bool GetTextColor (ref Color color, Color? fallbackColor=null)
 
void GetThemeProperties< TThemeProperties > (ref TThemeProperties properties, InvalidationMode invalidationMode=InvalidationMode.LayoutAndGeometry)
 
bool SendSignal< TSignal > (TSignal signal, SignalDirection direction=SignalDirection.Up)
 Send a signal of type TSignal from this widget.
 

Properties

ICollection< TItemType > Items [get]
 
ref readonly DropdownButtonVisualState VisualProperties [get]
 Gets a read-only reference to the visual properties associated with the widget.
 
int SelectedIndex [get, set]
 
string Placeholder [get, set]
 
TItemType DefaultValue [get, set]
 
TItemType Value [get, set]
 
int Count [get]
 
bool IsReadOnly [get]
 
TItemType this[int index] [get]
 
ref readonly DropdownItemVisualState VisualProperties [get]
 Gets a read-only reference to the visual properties associated with the widget.
 
bool IsActive [set]
 
Action? Callback [get, set]
 
override? GuiManager GuiManager [get]
 
ref readonly DropdownOverlayVisualState VisualProperties [get]
 Gets a read-only reference to the visual properties associated with the widget.
 
LayoutRect DropdownArea [get]
 
- Properties inherited from Widget
int ChildCount [get]
 
string? Name [get, set]
 
ulong ScreenReaderId [get]
 
ScreenReaderNode ScreenReaderNode [get]
 
bool IsLayoutValid [get]
 
ulong UniqueId [get]
 
Matrix4x4 ComputedTransformMatrix [get]
 
AccessibilityRole Role [get, set]
 Gets or sets a AccessibilityRole value representing the role of this Widget shown to accessibility software. Screen readers use this value to figure out what kind of UI element the widget is.
 
WidgetLabelledBy [get, set]
 
string RoleDescription [get, set]
 
string AccessibleLabel [get, set]
 Gets or sets the accessible label for this widget. This string is read aloud by screen readers.
 
bool ClipSelf [get, set]
 
Quaternion Rotation [get, set]
 
Vector3 Scale [get, set]
 
Point PositionOffset [get, set]
 
Point ComputedPositionOffset [get]
 
BackgroundStyleProperties BackgroundStyle [get, set]
 
IWidgetEffectRenderEffect [get, set]
 
bool IsFocused [get]
 
bool IsChildFocused [get]
 
LayoutRectClippedContentArea [get]
 
ClippingMode ClippingMode [get, set]
 
bool Enabled [get, set]
 
float RenderOpacity [get, set]
 
bool HierarchyEnabled [get]
 
float ComputedOpacity [get]
 
IVisualStyleVisualStyleOverride [get, set]
 
WidgetParent [get]
 
WidgetRoot [get]
 
virtual ? GuiManager GuiManager [get]
 
IOrderedCollection< WidgetInternalChildren [get]
 
WidgetContextMenuWidget [get, set]
 Gets or sets a widget to be shown when the user right-clicks this widget or one of its children.
 
bool IsVisible [get]
 
Visibility Visibility [get, set]
 
LayoutRect PaintArea [get]
 
Padding Margin [get, set]
 
Padding Padding [get, set]
 
int MinimumWidth [get, set]
 
int MinimumHeight [get, set]
 
int MaximumWidth [get, set]
 
int MaximumHeight [get, set]
 
Point MinimumSize [get, set]
 
Point MaximumSize [get, set]
 
HorizontalAlignment HorizontalAlignment [get, set]
 
VerticalAlignment VerticalAlignment [get, set]
 
LayoutRect LayoutArea [get]
 
Widget LayoutRoot [get, protected set]
 
PopoverLocationPreference PopoverLocation [get, set]
 
PopoverContent? PopoverContent [get, set]
 

Events

Action< int >? SelectedIndexChanged
 
Action< TItemType > OnValueChanged
 
- Events inherited from Widget
static ? Action< Widget, LayoutRectWidgetRepainting = null
 
- Events inherited from IInputField< TValue >
Action< TValue >? OnValueChanged
 

Member Function Documentation

◆ ArrangeChildren() [1/2]

override void ArrangeChildren ( IGuiContext context,
LayoutRect availableSpace )
inlineprotectedvirtual

Reimplemented from Widget.

◆ ArrangeChildren() [2/2]

override void ArrangeChildren ( IGuiContext context,
LayoutRect availableSpace )
inlineprotectedvirtual

Reimplemented from Widget.

◆ BeforeRender() [1/2]

override void BeforeRender ( )
inlineprotectedvirtual

Reimplemented from Widget.

◆ BeforeRender() [2/2]

override void BeforeRender ( )
inlineprotectedvirtual

Reimplemented from Widget.

◆ GetContentSize() [1/2]

override Point GetContentSize ( Point availableSize)
inlineprotectedvirtual

Reimplemented from Widget.

◆ GetContentSize() [2/2]

override Point GetContentSize ( Point availableSize)
inlineprotectedvirtual

Reimplemented from Widget.

◆ OnFocusGained()

void OnFocusGained ( FocusEvent e)
inline

Implements IGainFocusHandler.

◆ OnFocusLost()

void OnFocusLost ( FocusEvent e)
inline

Implements ILoseFocusHandler.

◆ OnMouseClick() [1/3]

void OnMouseClick ( MouseButtonEvent e)
inline

Implements IMouseClickHandler.

◆ OnMouseClick() [2/3]

void OnMouseClick ( MouseButtonEvent e)
inline

Implements IMouseClickHandler.

◆ OnMouseClick() [3/3]

void OnMouseClick ( MouseButtonEvent e)
inline

Implements IMouseClickHandler.

◆ OnMouseDown() [1/3]

void OnMouseDown ( MouseButtonEvent e)
inline

Implements IMouseDownHandler.

◆ OnMouseDown() [2/3]

void OnMouseDown ( MouseButtonEvent e)
inline

Implements IMouseDownHandler.

◆ OnMouseDown() [3/3]

void OnMouseDown ( MouseButtonEvent e)
inline

Implements IMouseDownHandler.

◆ OnMouseEnter() [1/2]

void OnMouseEnter ( MouseMoveEvent e)
inline

Implements IMouseEnterHandler.

◆ OnMouseEnter() [2/2]

void OnMouseEnter ( MouseMoveEvent e)
inline

Implements IMouseEnterHandler.

◆ OnMouseLeave() [1/2]

void OnMouseLeave ( MouseMoveEvent e)
inline

Implements IMouseLeaveHandler.

◆ OnMouseLeave() [2/2]

void OnMouseLeave ( MouseMoveEvent e)
inline

Implements IMouseLeaveHandler.

◆ OnMouseUp() [1/3]

void OnMouseUp ( MouseButtonEvent e)
inline

Implements IMouseUpHandler.

◆ OnMouseUp() [2/3]

void OnMouseUp ( MouseButtonEvent e)
inline

Implements IMouseUpHandler.

◆ OnMouseUp() [3/3]

void OnMouseUp ( MouseButtonEvent e)
inline

Implements IMouseUpHandler.

◆ RebuildClippingZone()

override void RebuildClippingZone ( GeometryHelper geometry)
inlineprotectedvirtual

Reimplemented from Widget.

◆ RebuildGeometry() [1/3]

override void RebuildGeometry ( GeometryHelper geometry)
inlineprotectedvirtual

Reimplemented from Widget.

◆ RebuildGeometry() [2/3]

override void RebuildGeometry ( GeometryHelper geometry)
inlineprotectedvirtual

Reimplemented from Widget.

◆ RebuildGeometry() [3/3]

override void RebuildGeometry ( GeometryHelper geometry)
inlineprotectedvirtual

Reimplemented from Widget.

◆ UpdateThemeProperties()

void UpdateThemeProperties ( )
inline

Retrieves layout properties from the visual style. Called by the UI system on every frame before layout updates occur. If layout properties change during this method call, the widget will automatically invalidate its own layout.

Implements IUpdateThemeProperties.

Property Documentation

◆ Value

TItemType Value
getset

Implements IInputField< TValue >.

◆ VisualProperties [1/3]

ref readonly DropdownButtonVisualState VisualProperties
get

Gets a read-only reference to the visual properties associated with the widget.

Implements IVisual< TVisualProperties >.

◆ VisualProperties [2/3]

ref readonly DropdownItemVisualState VisualProperties
get

Gets a read-only reference to the visual properties associated with the widget.

Implements IVisual< TVisualProperties >.

◆ VisualProperties [3/3]

ref readonly DropdownOverlayVisualState VisualProperties
get

Gets a read-only reference to the visual properties associated with the widget.

Implements IVisual< TVisualProperties >.


The documentation for this class was generated from the following file: