UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CocoaTextView.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
6#if WITH_ACCESSIBILITY
8#endif
9
10#ifdef __OBJC__
11//INherit from FCocoaAccessibilityView to allow descendants (FMetalView in particular) to be visible to Voiceover
12#if WITH_ACCESSIBILITY
14#else
16#endif
17{
21}
22
26
27- (bool)imkKeyDown:(NSEvent*)Event;
28
29//@protocol NSTextInputClient
30//@required
31/* The receiver inserts aString replacing the content specified by replacementRange. aString can be either an NSString or NSAttributedString instance.
32 */
33- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange;
34
35/* The receiver invokes the action specified by aSelector.
36 */
37- (void)doCommandBySelector:(SEL)aSelector;
38
39/* The receiver inserts aString replacing the content specified by replacementRange. aString can be either an NSString or NSAttributedString instance. selectedRange specifies the selection inside the string being inserted; hence, the location is relative to the beginning of aString. When aString is an NSString, the receiver is expected to render the marked text with distinguishing appearance (i.e. NSTextView renders with -markedTextAttributes).
40 */
41- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange;
42
43/* The receiver unmarks the marked text. If no marked text, the invocation of this method has no effect.
44 */
46
47/* Returns the selection range. The valid location is from 0 to the document length.
48 */
50
51/* Returns the marked range. Returns {NSNotFound, 0} if no marked range.
52 */
54
55/* Returns whether or not the receiver has marked text.
56 */
58
59/* Returns attributed string specified by aRange. It may return nil. If non-nil return value and actualRange is non-NULL, it contains the actual range for the return value. The range can be adjusted from various reasons (i.e. adjust to grapheme cluster boundary, performance optimization, etc).
60 */
62
63/* Returns an array of attribute names recognized by the receiver.
64 */
66
67/* Returns the first logical rectangular area for aRange. The return value is in the screen coordinate. The size value can be negative if the text flows to the left. If non-NULL, actuallRange contains the character range corresponding to the returned area.
68 */
69- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange;
70
71/* Returns the index for character that is nearest to aPoint. aPoint is in the screen coordinate system.
72 */
74
75//@optional
76/* Returns an attributed string representing the receiver's document content. An NSTextInputClient can implement this interface if can be done efficiently. The caller of this interface can random access arbitrary portions of the receiver's content more efficiently.
77 */
78//- (NSAttributedString *)attributedString;
79
80/* Returns the fraction of distance for aPoint from the left side of the character. This allows caller to perform precise selection handling.
81 */
82//- (CGFloat)fractionOfDistanceThroughGlyphForPoint:(NSPoint)aPoint;
83
84/* Returns the baseline position relative to the origin of rectangle returned by -firstRectForCharacterRange:actualRange:. This information allows the caller to access finer-grained character position inside the NSTextInputClient document.
85 */
86//- (CGFloat)baselineDeltaForCharacterAtIndex:(NSUInteger)anIndex;
87
88/* Returns the window level of the receiver. An NSTextInputClient can implement this interface to specify its window level if it is higher than NSFloatingWindowLevel.
89 */
91
92/* Returns if the marked text is in vertical layout.
93 */
94//- (BOOL)drawsVerticallyForCharacterAtIndex:(NSUInteger)charIndex NS_AVAILABLE_MAC(10_6);
95
96@end
97
98#else // __OBJC__
99
100class FCocoaTextView;
101
102#endif // __OBJC__
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
Definition CocoaTextView.cpp:7
Definition ITextInputMethodSystem.h:15
Definition SharedPointer.h:692
Definition SharedPointer.h:153
int32 BOOL
Definition MinimalWindowsApi.h:64