UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
STimecode.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"
8
10#include "Misc/Attribute.h"
11#include "Misc/Timecode.h"
12#include "Styling/CoreStyle.h"
13#include "Styling/SlateColor.h"
15
16class STimecode : public SLeafWidget
17{
18public:
30 SLATE_ATTRIBUTE(FTimecode, Timecode)
32 SLATE_ATTRIBUTE(FSlateFontInfo, TimecodeFont)
34 SLATE_ATTRIBUTE(FSlateColor, TimecodeColor)
36 SLATE_ATTRIBUTE(bool, DisplayLabel)
40 SLATE_ATTRIBUTE(FSlateColor, LabelColor)
42 SLATE_ARGUMENT(bool, bDisplaySubframes)
44
46
52 TIMEMANAGEMENT_API void Construct(const FArguments& InArgs);
53
55 // SWidget overrides
56 TIMEMANAGEMENT_API virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const override;
59
61 TAttribute<FTimecode> Timecode;
62 TAttribute<FSlateFontInfo> TimecodeFont;
63 TAttribute<FSlateColor> TimecodeColor;
64
65 TAttribute<bool> bDisplayLabel;
66 TAttribute<FSlateFontInfo> LabelFont;
67 TAttribute<FSlateColor> LabelColor;
68
70 bool bDisplaySubframes = true;
71
73 TUniquePtr<FSlateTextBlockLayout> TextLayoutCache;
74};
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define SLATE_ATTRIBUTE(AttrType, AttrName)
Definition DeclarativeSyntaxSupport.h:192
#define SLATE_END_ARGS()
Definition DeclarativeSyntaxSupport.h:116
#define SLATE_ARGUMENT(ArgType, ArgName)
Definition DeclarativeSyntaxSupport.h:208
return true
Definition ExternalRpcRegistry.cpp:601
static const ISlateStyle & Get()
Definition CoreStyle.h:33
Definition PaintArgs.h:23
Definition SlateRect.h:26
Definition SlateTextBlockLayout.h:21
Definition DrawElements.h:220
Definition WidgetStyle.h:15
virtual FSlateFontInfo GetFontStyle(const FName PropertyName, const ANSICHAR *Specifier=nullptr) const =0
Definition SLeafWidget.h:29
Definition STimecode.h:17
virtual TIMEMANAGEMENT_API bool ComputeVolatility() const override
Definition STimecode.cpp:156
virtual TIMEMANAGEMENT_API FVector2D ComputeDesiredSize(float LayoutScale) const override
Definition STimecode.cpp:120
virtual TIMEMANAGEMENT_API int32 OnPaint(const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override
Definition STimecode.cpp:47
TIMEMANAGEMENT_API void Construct(const FArguments &InArgs)
Definition STimecode.cpp:34
SLATE_BEGIN_ARGS(STimecode)
Definition STimecode.h:19
Definition Attribute.h:17
Definition UniquePtr.h:107
Definition Geometry.h:40
Definition Color.h:48
Definition SlateColor.h:42
Definition SlateFontInfo.h:147
float Size
Definition SlateFontInfo.h:175
Definition Timecode.h:19