UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSlateStyleRegistry Class Reference

#include <SlateStyleRegistry.h>

Static Public Member Functions

static SLATECORE_API void RegisterSlateStyle (const ISlateStyle &InSlateStyle)
 
static SLATECORE_API void UnRegisterSlateStyle (const ISlateStyle &InSlateStyle)
 
static SLATECORE_API void UnRegisterSlateStyle (const FName StyleSetName)
 
static SLATECORE_API const ISlateStyleFindSlateStyle (const FName &InSlateStyleName)
 
static SLATECORE_API bool IterateAllStyles (const TFunctionRef< bool(const ISlateStyle &)> &Iter)
 
static SLATECORE_API void GetAllResources (TArray< const FSlateBrush * > &OutResources)
 
static SLATECORE_API TArray< FNameGetSylesUsingBrush (const FName BrushName)
 

Detailed Description

A central repository that can be used to track and manage chunks of slate style data.

Member Function Documentation

◆ FindSlateStyle()

const ISlateStyle * FSlateStyleRegistry::FindSlateStyle ( const FName InSlateStyleName)
static

Find a slate style in the repository.

Parameters
InSlateStyleNameThe name of the slate style to find.
Returns
The slate style, or null if it couldn't be found

◆ GetAllResources()

void FSlateStyleRegistry::GetAllResources ( TArray< const FSlateBrush * > &  OutResources)
static

Populate an array of slate brushes with all of the resources used by the registered styles.

Parameters
OutResourcesArray of slate brushes to populate.

◆ GetSylesUsingBrush()

TArray< FName > FSlateStyleRegistry::GetSylesUsingBrush ( const FName  BrushName)
static

Gets the names of every style entry using a brush Note: this function is expensive and is not designed to be used in performance critical situations

Parameters
BrushNameThe name of the brush to find style entries from
Returns
Array of style names using the brush

◆ IterateAllStyles()

bool FSlateStyleRegistry::IterateAllStyles ( const TFunctionRef< bool(const ISlateStyle &)> &  Iter)
static

Iterate all the slate style known to this registry

Parameters
IterA predicate to call for each known style that returns true to continue iteration, and false to terminate iteration
Returns
true where to loop completed, of false if it was terminated by the predicate

◆ RegisterSlateStyle()

void FSlateStyleRegistry::RegisterSlateStyle ( const ISlateStyle InSlateStyle)
static

Add a slate style to the repository.

Parameters
ISlateStyleinterface to a user-definable style to add.

◆ UnRegisterSlateStyle() [1/2]

void FSlateStyleRegistry::UnRegisterSlateStyle ( const FName  StyleSetName)
static

Removes a slate style from the repository (by name).

Parameters
StyleSetNameThe name of the style set to remove.

◆ UnRegisterSlateStyle() [2/2]

void FSlateStyleRegistry::UnRegisterSlateStyle ( const ISlateStyle InSlateStyle)
static

Remove a slate style from the repository.

Parameters
ISlateStyleInterface to the style to remove.

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