Toolbox 0.0.1
Ritchie's accessible game engine'
Loading...
Searching...
No Matches
Widget Class Reference

The base class of every user interface element. More...

Inheritance diagram for Widget:
DockSpace ConfigurationWidget EditorWidget InspectorWidget PropertyEditorWidget< TPropertyValue > InspectorField InspectorHeader Page ComponentDrawer FileIcon RecentProjectsList SplitView EditorSplashScreenWidget MenuOverlay TabList ThingTree EditorConfigurationField< TValue, TWidget > EditorSectionHeader ViewportWidget ListAdapter< TContainerWidget, TViewHolder > CodeEditor ColorButton ColorPicker ColorSlider ContainerWidget ContentWidget TreeView Dropdown< TItemType, TView > DropdownItemView< TItemType > EnumDropdown< TEnum > Icon IconButton Image Label ContextMenu Menu MenuBar MenuDivider NumberField< TNumber > Pressable ProgressBar ScrollBar Slider Switch TextField TextWidget Toggle

Classes

class  TopLevelCollection
 
class  WidgetCollection
 

Public Member Functions

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)
 

Protected Member Functions

virtual void RebuildClippingZone (GeometryHelper geometry)
 
virtual void RebuildGeometry (GeometryHelper geometry)
 
virtual void BeforeRender ()
 
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)
 
virtual void ArrangeChildren (IGuiContext context, LayoutRect availableSpace)
 
virtual Point GetContentSize (Point availableSize)
 
bool SendSignal< TSignal > (TSignal signal, SignalDirection direction=SignalDirection.Up)
 Send a signal of type TSignal from this widget.
 

Properties

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

static ? Action< Widget, LayoutRectWidgetRepainting = null
 

Detailed Description

The base class of every user interface element.

Member Function Documentation

◆ ArrangeChildren()

virtual void ArrangeChildren ( IGuiContext context,
LayoutRect availableSpace )
inlineprotectedvirtual

◆ BeforeRender()

virtual void BeforeRender ( )
inlineprotectedvirtual

Reimplemented in MenuBarItem, and MenuItem.

◆ FindParent< T >()

T? FindParent< T > ( )
inline
Type Constraints
T :Widget 

◆ GetContentSize()

virtual Point GetContentSize ( Point availableSize)
inlineprotectedvirtual

◆ GetCustomProperties< T >()

T GetCustomProperties< T > ( )
inline
Type Constraints
T :CustomPropertyObject 

◆ GetCustomProperty< T >()

T GetCustomProperty< T > ( )
inline
Type Constraints
T :struct 

◆ GetThemeProperties< TThemeProperties >()

void GetThemeProperties< TThemeProperties > ( ref TThemeProperties properties,
InvalidationMode invalidationMode = InvalidationMode::LayoutAndGeometry )
inlineprotected
Type Constraints
TThemeProperties :struct 

◆ GetVisualStyleOverride()

IVisualStyle? GetVisualStyleOverride ( )
inline

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.

Returns
The visual style override for this widget or one of its parents, or null if there are no overriding widgets.

◆ OnAddedToParent()

virtual void OnAddedToParent ( )
inlineprotectedvirtual

◆ OnRemovedFromParent()

virtual void OnRemovedFromParent ( )
inlineprotectedvirtual

Reimplemented in PlayView, and MenuBarItem.

◆ RebuildClippingZone()

virtual void RebuildClippingZone ( GeometryHelper geometry)
inlineprotectedvirtual

Reimplemented in EditorPanel.

◆ RebuildGeometry()

virtual void RebuildGeometry ( GeometryHelper geometry)
inlineprotectedvirtual

◆ SendSignal< TSignal >()

bool SendSignal< TSignal > ( TSignal signal,
SignalDirection direction = SignalDirection::Up )
inlineprotected

Send a signal of type TSignal from this widget.

Parameters
signalThe signal to send.
directionA value indicating where to send the signal.
Template Parameters
TSignalThe type of signal to send.
Returns
True if the signal was handled, false otherwise.

◆ SetCustomProperty< T >()

void SetCustomProperty< T > ( T newValue)
inline
Type Constraints
T :struct 

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