UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ISlateStyle Class Referenceabstract

#include <ISlateStyle.h>

+ Inheritance diagram for ISlateStyle:

Public Member Functions

 ISlateStyle ()
 
virtual ~ISlateStyle ()
 
virtual const FNameGetStyleSetName () const =0
 
virtual void GetResources (TArray< const FSlateBrush * > &OutResources) const =0
 
virtual FString GetContentRootDir () const =0
 
virtual TArray< FNameGetEntriesUsingBrush (const FName BrushName) const =0
 
template<typename WidgetStyleType >
const WidgetStyleTypeGetWidgetStyle (FName PropertyName, const ANSICHAR *Specifier, const WidgetStyleType *DefaultValue, bool bWarnIfNotFound) const
 
template<typename WidgetStyleType >
const WidgetStyleTypeGetWidgetStyle (FName PropertyName, const ANSICHAR *Specifier=nullptr, const WidgetStyleType *DefaultValue=nullptr) const
 
template<typename WidgetStyleType >
bool HasWidgetStyle (FName PropertyName, const ANSICHAR *Specifier=nullptr) const
 
const FSlateWidgetStyleGetWidgetStyle (const FName &WidgetStyleTypeName, FName PropertyName, const ANSICHAR *Specifier=nullptr, const FSlateWidgetStyle *DefaultValue=nullptr, bool bWarnIfNotFound=true) const
 
virtual float GetFloat (const FName PropertyName, const ANSICHAR *Specifier=nullptr, float DefaultValue=FStyleDefaults::GetFloat(), const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual UE::Slate::FDeprecateVector2DResult GetVector (const FName PropertyName, const ANSICHAR *Specifier=nullptr, UE::Slate::FDeprecateVector2DParameter DefaultValue=FStyleDefaults::GetVector2D(), const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual const FLinearColorGetColor (const FName PropertyName, const ANSICHAR *Specifier=nullptr, const FLinearColor &DefaultValue=FStyleDefaults::GetColor(), const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual const FSlateColor GetSlateColor (const FName PropertyName, const ANSICHAR *Specifier=nullptr, const FSlateColor &DefaultValue=FStyleDefaults::GetSlateColor(), const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual const FMarginGetMargin (const FName PropertyName, const ANSICHAR *Specifier=nullptr, const FMargin &DefaultValue=FStyleDefaults::GetMargin(), const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual const FSlateBrushGetBrush (const FName PropertyName, const ANSICHAR *Specifier=nullptr, const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual const FSlateBrushGetOptionalBrush (const FName PropertyName, const ANSICHAR *Specifier=nullptr, const FSlateBrush *const DefaultBrush=FStyleDefaults::GetNoBrush()) const =0
 
virtual const TSharedPtr< FSlateDynamicImageBrushGetDynamicImageBrush (const FName BrushTemplate, const FName TextureName, const ANSICHAR *Specifier=nullptr, const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual const TSharedPtr< FSlateDynamicImageBrushGetDynamicImageBrush (const FName BrushTemplate, const ANSICHAR *Specifier, UTexture2D *TextureResource, const FName TextureName, const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual const TSharedPtr< FSlateDynamicImageBrushGetDynamicImageBrush (const FName BrushTemplate, UTexture2D *TextureResource, const FName TextureName, const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual FSlateBrushGetDefaultBrush () const =0
 
virtual const FSlateSoundGetSound (const FName PropertyName, const ANSICHAR *Specifier=nullptr, const ISlateStyle *RequestingStyle=nullptr) const =0
 
virtual FSlateFontInfo GetFontStyle (const FName PropertyName, const ANSICHAR *Specifier=nullptr) const =0
 
virtual TSet< FNameGetStyleKeys () const =0
 
virtual const TSet< FName > & GetWidgetStyleNames () const
 

Static Public Member Functions

static FName Join (FName A, const ANSICHAR *B)
 

Protected Types

enum class  EStyleMessageSeverity : uint8 {
  UE_DEPRECATED =(5.1, "CriticalError was removed because it can't trigger an assert at the callsite. Use 'checkf' instead.") = 0 , Error = 1 , PerformanceWarning = 2 , Warning = 3 ,
  Info = 4
}
 

Protected Member Functions

virtual const FSlateWidgetStyleGetWidgetStyleInternal (const FName DesiredTypeName, const FName StyleName, const FSlateWidgetStyle *DefaultStyle, bool bWarnIfNotFound) const =0
 
virtual void Log (EStyleMessageSeverity Severity, const FText &Message) const =0
 
virtual void LogMissingResource (EStyleMessageSeverity Severity, const FText &Message, const FName &MissingResource) const =0
 
virtual const TSharedPtr< FSlateDynamicImageBrushMakeDynamicImageBrush (const FName BrushTemplate, UTexture2D *TextureResource, const FName TextureName) const =0
 

Friends

class FSlateStyleSet
 
class ISlateStyle
 

Member Enumeration Documentation

◆ EStyleMessageSeverity

The severity of the message type Ordered according to their severity

Enumerator
UE_DEPRECATED 
Error 
PerformanceWarning 
Warning 
Info 

Constructor & Destructor Documentation

◆ ISlateStyle()

ISlateStyle::ISlateStyle ( )
inline

Constructor.

◆ ~ISlateStyle()

virtual ISlateStyle::~ISlateStyle ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ GetBrush()

virtual const FSlateBrush * ISlateStyle::GetBrush ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual
Parameters
PropertyNameName of the property to get
SpecifierAn optional string to append to the property name
Returns
an FSlateBrush property.

Implemented in FSlateGameResources, and FSlateStyleSet.

◆ GetColor()

virtual const FLinearColor & ISlateStyle::GetColor ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const FLinearColor DefaultValue = FStyleDefaults::GetColor(),
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual
Parameters
PropertyNameName of the property to get
SpecifierAn optional string to append to the property name
DefaultValueThe default value to return if the property cannot be found
Returns
a FLinearColor property.

Implemented in FSlateStyleSet.

◆ GetContentRootDir()

virtual FString ISlateStyle::GetContentRootDir ( ) const
pure virtual

Implemented in FSlateStyleSet.

◆ GetDefaultBrush()

virtual FSlateBrush * ISlateStyle::GetDefaultBrush ( ) const
pure virtual

Get default FSlateBrush.

Returns
- Default Slate brush value.

Implemented in FSlateStyleSet.

◆ GetDynamicImageBrush() [1/3]

virtual const TSharedPtr< FSlateDynamicImageBrush > ISlateStyle::GetDynamicImageBrush ( const FName  BrushTemplate,
const ANSICHAR Specifier,
UTexture2D TextureResource,
const FName  TextureName,
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual

Implemented in FSlateStyleSet.

◆ GetDynamicImageBrush() [2/3]

virtual const TSharedPtr< FSlateDynamicImageBrush > ISlateStyle::GetDynamicImageBrush ( const FName  BrushTemplate,
const FName  TextureName,
const ANSICHAR Specifier = nullptr,
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual

Implemented in FSlateStyleSet.

◆ GetDynamicImageBrush() [3/3]

virtual const TSharedPtr< FSlateDynamicImageBrush > ISlateStyle::GetDynamicImageBrush ( const FName  BrushTemplate,
UTexture2D TextureResource,
const FName  TextureName,
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual

Implemented in FSlateStyleSet.

◆ GetEntriesUsingBrush()

virtual TArray< FName > ISlateStyle::GetEntriesUsingBrush ( const FName  BrushName) const
pure virtual

Gets the names of every style entry using a brush in this style 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

Implemented in FSlateStyleSet.

◆ GetFloat()

virtual float ISlateStyle::GetFloat ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
float  DefaultValue = FStyleDefaults::GetFloat(),
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual
Parameters
PropertyNameName of the property to get
SpecifierAn optional string to append to the property name
DefaultValueThe default value to return if the property cannot be found
Returns
a float property.

Implemented in FSlateStyleSet.

◆ GetFontStyle()

virtual FSlateFontInfo ISlateStyle::GetFontStyle ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr 
) const
pure virtual
Parameters
PropertynameName of the property to get
InFontInfoThe value to set
Returns
a InFontInfo property.

Implemented in FSlateStyleSet.

◆ GetMargin()

virtual const FMargin & ISlateStyle::GetMargin ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const FMargin DefaultValue = FStyleDefaults::GetMargin(),
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual
Parameters
PropertyNameName of the property to get
SpecifierAn optional string to append to the property name
DefaultValueThe default value to return if the property cannot be found
Returns
a FMargin property.

Implemented in FSlateStyleSet.

◆ GetOptionalBrush()

virtual const FSlateBrush * ISlateStyle::GetOptionalBrush ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const FSlateBrush *const  DefaultBrush = FStyleDefaults::GetNoBrush() 
) const
pure virtual

Just like GetBrush, but returns DefaultBrush instead of the "missing brush" image when the resource is not found.

Parameters
PropertyNameName of the property to get
SpecifierAn optional string to append to the property name
Returns
an FSlateBrush property.

Implemented in FSlateGameResources, and FSlateStyleSet.

◆ GetResources()

virtual void ISlateStyle::GetResources ( TArray< const FSlateBrush * > &  OutResources) const
pure virtual

Populate an array of FSlateBrush with resources consumed by this style.

Parameters
OutResources- the array to populate.

Implemented in FSlateGameResources, and FSlateStyleSet.

◆ GetSlateColor()

virtual const FSlateColor ISlateStyle::GetSlateColor ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const FSlateColor DefaultValue = FStyleDefaults::GetSlateColor(),
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual
Parameters
PropertyNameName of the property to get
SpecifierAn optional string to append to the property name
DefaultValueThe default value to return if the property cannot be found
Returns
a FLinearColor property.

Implemented in FSlateStyleSet.

◆ GetSound()

virtual const FSlateSound & ISlateStyle::GetSound ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual

Look up a sound property specified by PropertyName and optional Specifier.

Implemented in FSlateStyleSet.

◆ GetStyleKeys()

virtual TSet< FName > ISlateStyle::GetStyleKeys ( ) const
pure virtual

Implemented in FSlateStyleSet.

◆ GetStyleSetName()

virtual const FName & ISlateStyle::GetStyleSetName ( ) const
pure virtual
Returns
The name used to identity this style set

Implemented in FSlateStyleSet.

◆ GetVector()

virtual UE::Slate::FDeprecateVector2DResult ISlateStyle::GetVector ( const FName  PropertyName,
const ANSICHAR Specifier = nullptr,
UE::Slate::FDeprecateVector2DParameter  DefaultValue = FStyleDefaults::GetVector2D(),
const ISlateStyle RequestingStyle = nullptr 
) const
pure virtual
Parameters
PropertyNameName of the property to get
SpecifierAn optional string to append to the property name
DefaultValueThe default value to return if the property cannot be found
Returns
a FVector2D property.

Implemented in FSlateStyleSet.

◆ GetWidgetStyle() [1/3]

const FSlateWidgetStyle * ISlateStyle::GetWidgetStyle ( const FName WidgetStyleTypeName,
FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const FSlateWidgetStyle DefaultValue = nullptr,
bool  bWarnIfNotFound = true 
) const
inline

◆ GetWidgetStyle() [2/3]

const WidgetStyleType & ISlateStyle::GetWidgetStyle ( FName  PropertyName,
const ANSICHAR Specifier,
const WidgetStyleType DefaultValue,
bool  bWarnIfNotFound 
) const
inline

Locates a widget style of a specified type and name. Allows customization of whether a warning should be logged.

Returns
The found widget style or the default value.

◆ GetWidgetStyle() [3/3]

const WidgetStyleType & ISlateStyle::GetWidgetStyle ( FName  PropertyName,
const ANSICHAR Specifier = nullptr,
const WidgetStyleType DefaultValue = nullptr 
) const
inline

Locates a widget style of a specified type and name.

Parameters
DefaultValueThe value to use if a widget style could not be found. If null and no style could be found, a warning will be logged.
Returns
The found widget style or the default value.

◆ GetWidgetStyleInternal()

virtual const FSlateWidgetStyle * ISlateStyle::GetWidgetStyleInternal ( const FName  DesiredTypeName,
const FName  StyleName,
const FSlateWidgetStyle DefaultStyle,
bool  bWarnIfNotFound 
) const
protectedpure virtual

Implemented in FSlateGameResources, and FSlateStyleSet.

◆ GetWidgetStyleNames()

virtual const TSet< FName > & ISlateStyle::GetWidgetStyleNames ( ) const
inlinevirtual

Reimplemented in FSlateStyleSet.

◆ HasWidgetStyle()

bool ISlateStyle::HasWidgetStyle ( FName  PropertyName,
const ANSICHAR Specifier = nullptr 
) const
inline

◆ Join()

static FName ISlateStyle::Join ( FName  A,
const ANSICHAR B 
)
inlinestatic

◆ Log()

virtual void ISlateStyle::Log ( EStyleMessageSeverity  Severity,
const FText Message 
) const
protectedpure virtual

Implemented in FSlateGameResources, and FSlateStyleSet.

◆ LogMissingResource()

virtual void ISlateStyle::LogMissingResource ( EStyleMessageSeverity  Severity,
const FText Message,
const FName MissingResource 
) const
protectedpure virtual

Implemented in FSlateStyleSet.

◆ MakeDynamicImageBrush()

virtual const TSharedPtr< FSlateDynamicImageBrush > ISlateStyle::MakeDynamicImageBrush ( const FName  BrushTemplate,
UTexture2D TextureResource,
const FName  TextureName 
) const
protectedpure virtual

Implemented in FSlateStyleSet.

Friends And Related Symbol Documentation

◆ FSlateStyleSet

friend class FSlateStyleSet
friend

◆ ISlateStyle

friend class ISlateStyle
friend

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