Navigation
API > API/Plugins > API/Plugins/SlateInspectorToolset
Renders a text-based accessibility snapshot of a Slate widget tree.
Walks the tree depth-first, emitting one line per meaningful widget with role, label, state flags, and a compact ref identifier. Structural containers (SBox, SBorder, SOverlay, etc.) are elided and their children are emitted at the parent's indent level.
| Name | FSlateInspectorToolsetSnapshotRenderer |
| Type | class |
| Header File | /Engine/Plugins/Experimental/Toolsets/SlateInspectorToolset/Source/SlateInspectorToolset/Public/SlateInspectorToolsetSnapshotRenderer.h |
| Include Path | #include "SlateInspectorToolsetSnapshotRenderer.h" |
Syntax
class FSlateInspectorToolsetSnapshotRenderer
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bMapsInitialized | bool | SlateInspectorToolsetSnapshotRenderer.h | |
| CustomLabelExtractors | TMap< FName, TFunction< FString(TSharedRef< SWidget >)> > | Custom label extractors registered via RegisterLabelExtractor. | SlateInspectorToolsetSnapshotRenderer.h |
| CustomStateFlagsExtractors | TMap< FName, TFunction< TArray< FString >(TSharedRef< SWidget >)> > | Custom state flags extractors registered via RegisterStateFlagsExtractor. | SlateInspectorToolsetSnapshotRenderer.h |
| RoleToRefPrefix | TMap< FString, FString > | Map from role string to ref prefix (e.g., "button" -> "b"). | SlateInspectorToolsetSnapshotRenderer.h |
| StructuralContainers | TSet< FName > | Set of structural container type names that should be skipped (children promoted). | SlateInspectorToolsetSnapshotRenderer.h |
| TemplatePrefixToRole | TArray< TPair< FString, FString > > | Prefix-based role mapping for template types (e.g., "SComboBox" matches "SComboBox<...>"). | SlateInspectorToolsetSnapshotRenderer.h |
| TypeToRole | TMap< FName, FString > | Map from widget type name to role string (e.g., "SButton" -> "button"). | SlateInspectorToolsetSnapshotRenderer.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void EnsureMapsInitialized() |
Initializes the type-to-role and structural-skip maps on first use. | SlateInspectorToolsetSnapshotRenderer.h | |
static FString ExtractLabel
(
TSharedRef< SWidget > Widget, |
Extract a human-readable label from a widget via type-specific methods. | SlateInspectorToolsetSnapshotRenderer.h | |
static FString ExtractStateFlags
(
TSharedRef< SWidget > Widget, |
Extract state flags (visibility, enabled, checked, focused). | SlateInspectorToolsetSnapshotRenderer.h | |
| Look up role for a widget type, handling template types via prefix matching. | SlateInspectorToolsetSnapshotRenderer.h | ||
static void RegisterLabelExtractor
(
const FName& WidgetType, |
Register a custom label extractor for a widget type. | SlateInspectorToolsetSnapshotRenderer.h | |
static void RegisterStateFlagsExtractor
(
const FName& WidgetType, |
Register a custom state flags extractor for a widget type. | SlateInspectorToolsetSnapshotRenderer.h | |
| Register a custom widget type so it appears in snapshots. | SlateInspectorToolsetSnapshotRenderer.h | ||
static FString Render
(
TSharedPtr< SWidget > Root, |
Render a snapshot starting from the given root widget. | SlateInspectorToolsetSnapshotRenderer.h | |
static void RenderWidget
(
FStringBuilderBase& Output, |
Recursive depth-first walk. | SlateInspectorToolsetSnapshotRenderer.h |