UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WindowsConsoleOutputDevice2.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
7#include "UObject/NameTypes.h"
8
13{
14private:
15 uint16 TextAttribute;
16
18 bool OverrideColorSet;
19
20 class FConsoleWindow;
22 FRWLock WindowRWLock;
23 TArray<FString> CommandHistory;
24 int32 CommandHistoryCursor = 0;
25
27 ELogVerbosity::Type AllowedLogVerbosity = ELogVerbosity::All;
28
29#if !UE_BUILD_SHIPPING
31 struct FLogHighlight
32 {
34 FName Category;
35
37 const TCHAR* Color = nullptr;
38
39 bool operator == (FName InCategory) const
40 {
41 return Category == InCategory;
42 }
43 };
44
47
49 struct FLogStringHighlight
50 {
52 TStringBuilder<128> SearchString;
53
55 const TCHAR* Color = nullptr;
56 };
57
60#endif
61
65 void SaveToINI();
66
67 static const FString& GetConfigFilename();
68
69public:
70
76
82 APPLICATIONCORE_API virtual void Show( bool ShowWindow );
83
89 APPLICATIONCORE_API virtual bool IsShown();
90
91 APPLICATIONCORE_API virtual bool IsAttached();
92
93 APPLICATIONCORE_API virtual bool CanBeUsedOnAnyThread() const override;
94
101 APPLICATIONCORE_API virtual void Serialize( const TCHAR* Data, ELogVerbosity::Type Verbosity, const class FName& Category, const double Time ) override;
102 APPLICATIONCORE_API virtual void Serialize( const TCHAR* Data, ELogVerbosity::Type Verbosity, const class FName& Category ) override;
103
105
106 bool GetPreviousCommand(FString& OutCommand);
107 bool GetNextCommand(FString& OutCommand);
108 bool GetLastCommand(FString& OutCommand);
109 void AddCommand(const FString& InCommand);
110private:
113};
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
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
uint16_t uint16
Definition binka_ue_file_header.h:7
Definition NameTypes.h:617
Definition OutputDeviceConsole.h:14
Definition WindowsConsoleOutputDevice2.cpp:38
Definition WindowsConsoleOutputDevice2.h:13
bool GetNextCommand(FString &OutCommand)
Definition WindowsConsoleOutputDevice2.cpp:3260
bool GetLastCommand(FString &OutCommand)
Definition WindowsConsoleOutputDevice2.cpp:3283
virtual APPLICATIONCORE_API void Show(bool ShowWindow)
Definition WindowsConsoleOutputDevice2.cpp:2996
virtual APPLICATIONCORE_API bool CanBeUsedOnAnyThread() const override
Definition WindowsConsoleOutputDevice2.cpp:3240
APPLICATIONCORE_API void SetColor(const TCHAR *Color)
Definition WindowsConsoleOutputDevice2.cpp:3201
virtual APPLICATIONCORE_API bool IsShown()
Definition WindowsConsoleOutputDevice2.cpp:3117
void AddCommand(const FString &InCommand)
Definition WindowsConsoleOutputDevice2.cpp:3271
APPLICATIONCORE_API ~FWindowsConsoleOutputDevice2()
Definition WindowsConsoleOutputDevice2.cpp:2927
APPLICATIONCORE_API FWindowsConsoleOutputDevice2()
Definition WindowsConsoleOutputDevice2.cpp:2791
virtual APPLICATIONCORE_API bool IsAttached()
Definition WindowsConsoleOutputDevice2.cpp:3235
bool GetPreviousCommand(FString &OutCommand)
Definition WindowsConsoleOutputDevice2.cpp:3245
Definition Array.h:670
Definition StringBuilder.h:509
Definition CriticalSection.h:14
Type
Definition LogVerbosity.h:17
@ All
Definition LogVerbosity.h:56