UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CEFTextInputMethodContext.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
7#if WITH_CEF3 && !PLATFORM_LINUX
8
9#include "Layout/Geometry.h"
10#include "Widgets/SWindow.h"
11
12#if PLATFORM_WINDOWS
15#endif
16
17#pragma push_macro("OVERRIDE")
18#undef OVERRIDE // cef headers provide their own OVERRIDE macro
20#if PLATFORM_APPLE
22#endif
23#include "include/cef_client.h"
24#if PLATFORM_APPLE
26#endif
28#pragma pop_macro("OVERRIDE")
29
30#if PLATFORM_WINDOWS
33#endif
34
36#include "Layout/Geometry.h"
37
39class FCEFImeHandler;
40class SWindow;
41
43{
44public:
45
47
49
50 void AbortComposition();
51
52 bool UpdateCachedGeometry(const FGeometry& AllottedGeometry);
53
54 bool CEFCompositionRangeChanged(const CefRange& SelectionRange, const CefRenderHandler::RectList& CharacterBounds);
55
56private:
57 void ResetComposition();
58
59public:
60
61 // ITextInputMethodContext Interface
62 virtual bool IsComposing() override;
63
64private:
65 virtual bool IsReadOnly() override;
66 virtual uint32 GetTextLength() override;
67 virtual void GetSelectionRange(uint32& BeginIndex, uint32& Length, ECaretPosition& CaretPosition) override;
68 virtual void SetSelectionRange(const uint32 BeginIndex, const uint32 Length, const ECaretPosition CaretPosition) override;
69 virtual void GetTextInRange(const uint32 BeginIndex, const uint32 Length, FString& OutString) override;
70 virtual void SetTextInRange(const uint32 BeginIndex, const uint32 Length, const FString& InString) override;
71 virtual int32 GetCharacterIndexFromPoint(const FVector2D& Point) override;
72 virtual bool GetTextBounds(const uint32 BeginIndex, const uint32 Length, FVector2D& Position, FVector2D& Size) override;
73 virtual void GetScreenBounds(FVector2D& Position, FVector2D& Size) override;
74 virtual TSharedPtr<FGenericWindow> GetWindow() override;
75 virtual void BeginComposition() override;
76 virtual void UpdateCompositionRange(const int32 InBeginIndex, const uint32 InLength) override;
77 virtual void EndComposition() override;
78
79private:
83
84 FGeometry CachedGeometry;
85 bool bIsComposing;
86 int32 CompositionBeginIndex;
87 uint32 CompositionLength;
88
91 ECaretPosition SelectionCaretPosition;
92
93 std::vector<CefRect> CefCompositionBounds;
94
95 FString CompositionString;
96};
97
98#endif
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 PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define THIRD_PARTY_INCLUDES_START
Definition GenericPlatformCompilerPreSetup.h:63
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
uint32 Size
Definition VulkanMemory.cpp:4034
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition ITextInputMethodSystem.h:15
virtual void GetTextInRange(const uint32 InBeginIndex, const uint32 InLength, FString &OutString)=0
virtual void SetTextInRange(const uint32 InBeginIndex, const uint32 InLength, const FString &InString)=0
virtual void GetScreenBounds(FVector2D &OutPosition, FVector2D &OutSize)=0
virtual bool IsReadOnly()=0
virtual void GetSelectionRange(uint32 &OutBeginIndex, uint32 &OutLength, ECaretPosition &OutCaretPosition)=0
virtual uint32 GetTextLength()=0
virtual bool IsComposing()=0
virtual bool GetTextBounds(const uint32 InBeginIndex, const uint32 InLength, FVector2D &OutPosition, FVector2D &OutSize)=0
virtual TSharedPtr< FGenericWindow > GetWindow()=0
virtual void EndComposition()=0
virtual void SetSelectionRange(const uint32 InBeginIndex, const uint32 InLength, const ECaretPosition InCaretPosition)=0
virtual int32 GetCharacterIndexFromPoint(const FVector2D &InPoint)=0
virtual void UpdateCompositionRange(const int32 InBeginIndex, const uint32 InLength)=0
virtual void BeginComposition()=0
Definition SWindow.h:243
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition SharedPointer.h:1295
Definition Voronoi.cpp:10
Definition Geometry.h:40