UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SlateIcon.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
7struct FSlateBrush;
8
13{
18
28
29public:
30
34 friend bool operator==(const FSlateIcon& A, const FSlateIcon& B)
35 {
36 return A.IsSet() == B.IsSet()
37 && A.StyleSetName == B.StyleSetName
38 && A.StyleName == B.StyleName
39 && A.SmallStyleName == B.SmallStyleName
40 && A.StatusOverlayStyleName == B.StatusOverlayStyleName;
41 }
42
46 friend bool operator!=(const FSlateIcon& A, const FSlateIcon& B)
47 {
48 return !(A == B);
49 }
50
51public:
52
59 SLATECORE_API const FSlateBrush* GetIcon( ) const;
60
67
75
82
84
91 const FName& GetSmallStyleName() const
92 {
93 return SmallStyleName;
94 }
95
102 const FName& GetStyleName() const
103 {
104 return StyleName;
105 }
106
113 SLATECORE_API const class ISlateStyle* GetStyleSet() const;
114
121 const FName& GetStyleSetName() const
122 {
123 return StyleSetName;
124 }
125
131 const bool IsSet() const
132 {
133 return StyleSetName != NAME_None && StyleName != NAME_None;
134 }
135
136private:
137
138 // The name of the style set the icon can be found in.
139 FName StyleSetName;
140
141 // The name of the style for the icon.
142 FName StyleName;
143
144 // The name of the style for the small icon.
145 FName SmallStyleName;
146
147 // Name of the style for the status overlay icon
148 FName StatusOverlayStyleName;
149};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition NameTypes.h:617
Definition ISlateStyle.h:18
Definition SlateBrush.h:239
Definition SlateIcon.h:13
const FName & GetStyleSetName() const
Definition SlateIcon.h:121
friend bool operator!=(const FSlateIcon &A, const FSlateIcon &B)
Definition SlateIcon.h:46
const bool IsSet() const
Definition SlateIcon.h:131
SLATECORE_API const class ISlateStyle * GetStyleSet() const
Definition SlateIcon.cpp:48
const FName & GetStyleName() const
Definition SlateIcon.h:102
friend bool operator==(const FSlateIcon &A, const FSlateIcon &B)
Definition SlateIcon.h:34
const FName & GetSmallStyleName() const
Definition SlateIcon.h:91
SLATECORE_API FSlateIcon()
Definition SlateIcon.cpp:11
SLATECORE_API const FSlateBrush * GetOptionalIcon() const
Definition SlateIcon.cpp:67
SLATECORE_API const FSlateBrush * GetOptionalSmallIcon() const
Definition SlateIcon.cpp:73
SLATECORE_API const FSlateBrush * GetIcon() const
Definition SlateIcon.cpp:54
SLATECORE_API const FSlateBrush * GetOverlayIcon() const
Definition SlateIcon.cpp:79
SLATECORE_API const FSlateBrush * GetSmallIcon() const
Definition SlateIcon.cpp:31