UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FSlateIcon Struct Reference

#include <SlateIcon.h>

Public Member Functions

SLATECORE_API FSlateIcon ()
 
SLATECORE_API FSlateIcon (const FName InStyleSetName, const FName InStyleName, const FName InSmallStyleName=NAME_None, const FName InStatusOverlayStyleName=NAME_None)
 
SLATECORE_API const FSlateBrushGetIcon () const
 
SLATECORE_API const FSlateBrushGetOptionalIcon () const
 
SLATECORE_API const FSlateBrushGetSmallIcon () const
 
SLATECORE_API const FSlateBrushGetOptionalSmallIcon () const
 
SLATECORE_API const FSlateBrushGetOverlayIcon () const
 
const FNameGetSmallStyleName () const
 
const FNameGetStyleName () const
 
SLATECORE_API const class ISlateStyleGetStyleSet () const
 
const FNameGetStyleSetName () const
 
const bool IsSet () const
 

Friends

bool operator== (const FSlateIcon &A, const FSlateIcon &B)
 
bool operator!= (const FSlateIcon &A, const FSlateIcon &B)
 

Detailed Description

Struct used to represent an icon in Slate

Constructor & Destructor Documentation

◆ FSlateIcon() [1/2]

FSlateIcon::FSlateIcon ( )

Default constructor (empty icon).

◆ FSlateIcon() [2/2]

FSlateIcon::FSlateIcon ( const FName  InStyleSetName,
const FName  InStyleName,
const FName  InSmallStyleName = NAME_None,
const FName  InStatusOverlayStyleName = NAME_None 
)

Creates and initializes a new icon from a style set and style name

Parameters
InStyleSetNameThe name of the style set the icon can be found in.
StyleNameThe name of the style for the icon
InSmallStyleNameThe name of the style for the small icon
InStatusOverlayStyleNameThe name of the style for a status icon to overlay on the base image

Member Function Documentation

◆ GetIcon()

const FSlateBrush * FSlateIcon::GetIcon ( ) const

Gets the resolved icon.

Returns
Icon brush, or FStyleDefaults::GetNoBrush() if the icon wasn't found.
See also
GetSmallIcon

◆ GetOptionalIcon()

const FSlateBrush * FSlateIcon::GetOptionalIcon ( ) const

Optionally gets the resolved icon, returning nullptr if it's not defined

Returns
Icon brush, or nullptr if the icon wasn't found.

◆ GetOptionalSmallIcon()

const FSlateBrush * FSlateIcon::GetOptionalSmallIcon ( ) const

Optionally gets the resolved small icon, returning nullptr if it's not defined

Returns
Icon brush, or nullptr if the icon wasn't found.

◆ GetOverlayIcon()

const FSlateBrush * FSlateIcon::GetOverlayIcon ( ) const

◆ GetSmallIcon()

const FSlateBrush * FSlateIcon::GetSmallIcon ( ) const

Gets the resolved small icon.

Returns
Icon brush, or FStyleDefaults::GetNoBrush() if the icon wasn't found.
See also
GetIcon

◆ GetSmallStyleName()

const FName & FSlateIcon::GetSmallStyleName ( ) const
inline

Gets the name of the style for the icon.

Returns
Style name.
See also
GetStyleName, GetStyleSet, GetStyleSetName

◆ GetStyleName()

const FName & FSlateIcon::GetStyleName ( ) const
inline

Gets the name of the style for the icon.

Returns
Style name.
See also
GetSmallStyleName, GetStyleSet, GetStyleSetName

◆ GetStyleSet()

const ISlateStyle * FSlateIcon::GetStyleSet ( ) const

Gets the resolved style set.

Returns
Style set, or nullptr if the style set wasn't found.
See also
GetSmallStyleName, GetStyleName, GetStyleSetName

◆ GetStyleSetName()

const FName & FSlateIcon::GetStyleSetName ( ) const
inline

Gets the name of the style set the icon can be found in.

Returns
Style name.
See also
GetSmallStyleName, GetStyleName, GetStyleSet

◆ IsSet()

const bool FSlateIcon::IsSet ( ) const
inline

Checks whether the icon is set to something.

Returns
true if the icon is set, false otherwise.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const FSlateIcon A,
const FSlateIcon B 
)
friend

Compare 2 slate icons for inequality

◆ operator==

bool operator== ( const FSlateIcon A,
const FSlateIcon B 
)
friend

Compare 2 slate icons for equality


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