UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TextStoreACP.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 "Containers/Array.h"
9
11#include <TextStor.h>
12#include <msctf.h>
14
16
17class FTextStoreACP : public ITextStoreACP, public ITfContextOwnerCompositionSink
18{
19public:
21 virtual ~FTextStoreACP() {}
22
23 // IUnknown Interface Begin
25 STDMETHODIMP_(ULONG) AddRef(void);
27 // IUnknown Interface End
28
29 // ITextStoreACP Interface Begin
33
36
37 // Selection Methods
40
41 // Attributes Methods
47
48 // View Methods
54
55 // Plain Character Methods
60
61 // Embedded Character Methods
67 // ITextStoreACP Interface End
68
69 // ITfContextOwnerCompositionSink Interface Begin
73 // ITfContextOwnerCompositionSink Interface End
74
75private:
76 // Reference count for IUnknown Implementation
77 ULONG ReferenceCount;
78
79 // Associated text context that genericizes interfacing with text editing widgets.
81
82 struct FSupportedAttribute
83 {
84 FSupportedAttribute(const TS_ATTRID* const InId) : WantsDefault(false), Id(InId)
85 {
86 VariantInit(&(DefaultValue));
87 }
88
89 bool WantsDefault;
90 const TS_ATTRID* const Id;
91 VARIANT DefaultValue;
92 };
93
94 TArray<FSupportedAttribute> SupportedAttributes;
95
96 struct FLockManager
97 {
98 FLockManager() : LockType(0), IsPendingLockUpgrade(false)
99 {}
100
101 DWORD LockType;
102 bool IsPendingLockUpgrade;
103 } LockManager;
104
105public:
107 {
109
110 // Sink object for ITextStoreACP Implementation
112
114
115 // Flags defining what events the sink object should be notified of.
118
120 {
122 {}
123
124 // Composition view object for managing compositions.
126
128
129public:
130 // Document manager object for managing contexts.
132
133 // Context object for pushing context on to document manager.
135
136 // Context owner composition services object for terminating compositions.
138
140};
141
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition TextStoreACP.h:18
STDMETHODIMP GetWnd(TsViewCookie vcView, __RPC__deref_out_opt HWND *phwnd)
Definition TextStoreACP.cpp:507
STDMETHODIMP RequestAttrsAtPosition(LONG acpPos, ULONG cFilterAttrs, __RPC__in_ecount_full_opt(cFilterAttrs) const TS_ATTRID *paFilterAttrs, DWORD dwFlags)
Definition TextStoreACP.cpp:369
STDMETHODIMP InsertTextAtSelection(DWORD dwFlags, __RPC__in_ecount_full(cch) const WCHAR *pchText, ULONG cch, __RPC__out LONG *pacpStart, __RPC__out LONG *pacpEnd, __RPC__out TS_TEXTCHANGE *pChange)
Definition TextStoreACP.cpp:589
STDMETHODIMP_(ULONG) Release(void)
STDMETHODIMP QueryInsertEmbedded(__RPC__in const GUID *pguidService, __RPC__in const FORMATETC *pFormatEtc, __RPC__out BOOL *pfInsertable)
Definition TextStoreACP.cpp:726
STDMETHODIMP RetrieveRequestedAttrs(ULONG ulCount, __RPC__out_ecount_part(ulCount, *pcFetched) TS_ATTRVAL *paAttrVals, __RPC__out ULONG *pcFetched)
Definition TextStoreACP.cpp:403
STDMETHODIMP RequestLock(DWORD dwLockFlags, HRESULT *phrSession)
Definition TextStoreACP.cpp:177
STDMETHODIMP FindNextAttrTransition(LONG acpStart, LONG acpHalt, ULONG cFilterAttrs, __RPC__in_ecount_full_opt(cFilterAttrs) const TS_ATTRID *paFilterAttrs, DWORD dwFlags, __RPC__out LONG *pacpNext, __RPC__out BOOL *pfFound, __RPC__out LONG *plFoundOffset)
Definition TextStoreACP.cpp:396
STDMETHODIMP OnEndComposition(__RPC__in_opt ITfCompositionView *pComposition)
Definition TextStoreACP.cpp:820
TComPtr< ITfContextOwnerCompositionServices > TSFContextOwnerCompositionServices
Definition TextStoreACP.h:137
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj)
Definition TextStoreACP.cpp:39
STDMETHODIMP GetScreenExt(TsViewCookie vcView, __RPC__out RECT *prc)
Definition TextStoreACP.cpp:484
STDMETHODIMP QueryInsert(LONG acpInsertStart, LONG acpInsertEnd, ULONG cch, __RPC__out LONG *pacpResultStart, __RPC__out LONG *pacpResultEnd)
Definition TextStoreACP.cpp:566
STDMETHODIMP UnadviseSink(__RPC__in_opt IUnknown *punk)
Definition TextStoreACP.cpp:138
STDMETHODIMP SetText(DWORD dwFlags, LONG acpStart, LONG acpEnd, __RPC__in_ecount_full(cch) const WCHAR *pchText, ULONG cch, __RPC__out TS_TEXTCHANGE *pChange)
Definition TextStoreACP.cpp:671
STDMETHODIMP AdviseSink(__RPC__in REFIID riid, __RPC__in_opt IUnknown *punk, DWORD dwMask)
Definition TextStoreACP.cpp:80
STDMETHODIMP GetFormattedText(LONG acpStart, LONG acpEnd, __RPC__deref_out_opt IDataObject **ppDataObject)
Definition TextStoreACP.cpp:714
STDMETHODIMP GetEndACP(__RPC__out LONG *pacp)
Definition TextStoreACP.cpp:258
STDMETHODIMP SetSelection(ULONG ulCount, __RPC__in_ecount_full(ulCount) const TS_SELECTION_ACP *pSelection)
Definition TextStoreACP.cpp:313
STDMETHODIMP_(ULONG) AddRef(void)
STDMETHODIMP GetSelection(ULONG ulIndex, ULONG ulCount, __RPC__out_ecount_part(ulCount, *pcFetched) TS_SELECTION_ACP *pSelection, __RPC__out ULONG *pcFetched)
Definition TextStoreACP.cpp:272
STDMETHODIMP OnStartComposition(__RPC__in_opt ITfCompositionView *pComposition, __RPC__out BOOL *pfOk)
Definition TextStoreACP.cpp:757
STDMETHODIMP InsertEmbeddedAtSelection(DWORD dwFlags, __RPC__in_opt IDataObject *pDataObject, __RPC__out LONG *pacpStart, __RPC__out LONG *pacpEnd, __RPC__out TS_TEXTCHANGE *pChange)
Definition TextStoreACP.cpp:745
STDMETHODIMP OnUpdateComposition(__RPC__in_opt ITfCompositionView *pComposition, __RPC__in_opt ITfRange *pRangeNew)
Definition TextStoreACP.cpp:782
STDMETHODIMP InsertEmbedded(DWORD dwFlags, LONG acpStart, LONG acpEnd, __RPC__in_opt IDataObject *pDataObject, __RPC__out TS_TEXTCHANGE *pChange)
Definition TextStoreACP.cpp:733
STDMETHODIMP GetText(LONG acpStart, LONG acpEnd, __RPC__out_ecount_part(cchPlainReq, *pcchPlainOut) WCHAR *pchPlain, ULONG cchPlainReq, __RPC__out ULONG *pcchPlainOut, __RPC__out_ecount_part(ulRunInfoReq, *pulRunInfoOut) TS_RUNINFO *prgRunInfo, ULONG ulRunInfoReq, __RPC__out ULONG *pulRunInfoOut, __RPC__out LONG *pacpNext)
Definition TextStoreACP.cpp:517
STDMETHODIMP GetStatus(__RPC__out TS_STATUS *pdcs)
Definition TextStoreACP.cpp:242
STDMETHODIMP RequestAttrsTransitioningAtPosition(LONG acpPos, ULONG cFilterAttrs, __RPC__in_ecount_full_opt(cFilterAttrs) const TS_ATTRID *paFilterAttrs, DWORD dwFlags)
Definition TextStoreACP.cpp:390
TfEditCookie TSFEditCookie
Definition TextStoreACP.h:139
STDMETHODIMP RequestSupportedAttrs(DWORD dwFlags, ULONG cFilterAttrs, __RPC__in_ecount_full_opt(cFilterAttrs) const TS_ATTRID *paFilterAttrs)
Definition TextStoreACP.cpp:348
struct FTextStoreACP::FComposition Composition
STDMETHODIMP GetTextExt(TsViewCookie vcView, LONG acpStart, LONG acpEnd, __RPC__out RECT *prc, __RPC__out BOOL *pfClipped)
Definition TextStoreACP.cpp:450
TComPtr< ITfContext > TSFContext
Definition TextStoreACP.h:134
STDMETHODIMP GetActiveView(__RPC__out TsViewCookie *pvcView)
Definition TextStoreACP.cpp:425
TComPtr< ITfDocumentMgr > TSFDocumentManager
Definition TextStoreACP.h:131
STDMETHODIMP GetEmbedded(LONG acpPos, __RPC__in REFGUID rguidService, __RPC__in REFIID riid, __RPC__deref_out_opt IUnknown **ppunk)
Definition TextStoreACP.cpp:702
virtual ~FTextStoreACP()
Definition TextStoreACP.h:21
struct FTextStoreACP::FAdviseSinkObject AdviseSinkObject
STDMETHODIMP GetACPFromPoint(TsViewCookie vcView, __RPC__in const POINT *pt, DWORD dwFlags, __RPC__out LONG *pacp)
Definition TextStoreACP.cpp:433
Definition ITextInputMethodSystem.h:15
Definition Array.h:670
Definition COMPointer.h:19
Definition SharedPointer.h:153
unsigned long DWORD
Definition MinimalWindowsApi.h:67
@ false
Definition radaudio_common.h:23
Definition TextStoreACP.h:107
FAdviseSinkObject()
Definition TextStoreACP.h:108
TComPtr< ITextStoreACPServices > TextStoreACPServices
Definition TextStoreACP.h:113
DWORD SinkFlags
Definition TextStoreACP.h:116
TComPtr< ITextStoreACPSink > TextStoreACPSink
Definition TextStoreACP.h:111
Definition TextStoreACP.h:120
FComposition()
Definition TextStoreACP.h:121
TComPtr< ITfCompositionView > TSFCompositionView
Definition TextStoreACP.h:125
Definition AndroidSystemIncludes.h:36