Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
FlutterInactiveTextInput Class Reference

#include <accessibility_text_entry.h>

Inheritance diagram for FlutterInactiveTextInput:

Instance Methods

(void) - dealloc [implementation]
 
(BOOL- hasText [implementation]
 
(NSString *) - textInRange: [implementation]
 
(void) - replaceRange:withText: [implementation]
 
(void) - setMarkedText:selectedRange: [implementation]
 
(void) - unmarkText [implementation]
 
(UITextRange *) - textRangeFromPosition:toPosition: [implementation]
 
(UITextPosition *) - positionFromPosition:offset: [implementation]
 
(UITextPosition *) - positionFromPosition:inDirection:offset: [implementation]
 
(NSComparisonResult) - comparePosition:toPosition: [implementation]
 
(NSInteger) - offsetFromPosition:toPosition: [implementation]
 
(UITextPosition *) - positionWithinRange:farthestInDirection: [implementation]
 
(UITextRange *) - characterRangeByExtendingPosition:inDirection: [implementation]
 
(UITextWritingDirection) - baseWritingDirectionForPosition:inDirection: [implementation]
 
(void) - setBaseWritingDirection:forRange: [implementation]
 
(CGRect) - firstRectForRange: [implementation]
 
(CGRect) - caretRectForPosition: [implementation]
 
(UITextPosition *) - closestPositionToPoint: [implementation]
 
(UITextPosition *) - closestPositionToPoint:withinRange: [implementation]
 
(NSArray *) - selectionRectsForRange: [implementation]
 
(UITextRange *) - characterRangeAtPoint: [implementation]
 
(void) - insertText: [implementation]
 
(void) - deleteBackward [implementation]
 

Properties

NSString * text
 
NSMutableString * markedText
 
UITextRange * selectedTextRange
 
UITextRange * markedTextRange
 
NSDictionary< NSAttributedStringKey, id > * markedTextStyle
 
id< UITextInputDelegate > inputDelegate
 

Detailed Description

An implementation of UITextInput used for text fields that do not currently have input focus.

This class is used by TextInputSemanticsObject.

Definition at line 14 of file accessibility_text_entry.h.

Method Documentation

◆ baseWritingDirectionForPosition:inDirection:

- (UITextWritingDirection) baseWritingDirectionForPosition: (UITextPosition*)  position
inDirection: (UITextStorageDirection)  direction 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

114 :(UITextPosition*)position
115 inDirection:(UITextStorageDirection)direction {
116 // Not editable. Does not apply.
117 return UITextWritingDirectionNatural;
118}

◆ caretRectForPosition:

- (CGRect) caretRectForPosition: (UITextPosition*)  position
implementation

Definition at line 10 of file accessibility_text_entry.mm.

132 :(UITextPosition*)position {
133 // This method is required but not called by accessibility API for
134 // features we are using it for. It may need to be implemented if
135 // requirements change.
136 return CGRectZero;
137}

◆ characterRangeAtPoint:

- (UITextRange *) characterRangeAtPoint: (CGPoint)  point
implementation

Definition at line 10 of file accessibility_text_entry.mm.

160 :(CGPoint)point {
161 // This method is required but not called by accessibility API for
162 // features we are using it for. It may need to be implemented if
163 // requirements change.
164 return nil;
165}

◆ characterRangeByExtendingPosition:inDirection:

- (UITextRange *) characterRangeByExtendingPosition: (UITextPosition*)  position
inDirection: (UITextLayoutDirection)  direction 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

106 :(UITextPosition*)position
107 inDirection:(UITextLayoutDirection)direction {
108 // This method is required but not called by accessibility API for
109 // features we are using it for. It may need to be implemented if
110 // requirements change.
111 return nil;
112}

◆ closestPositionToPoint:

- (UITextPosition *) closestPositionToPoint: (CGPoint)  point
implementation

Definition at line 10 of file accessibility_text_entry.mm.

139 :(CGPoint)point {
140 // This method is required but not called by accessibility API for
141 // features we are using it for. It may need to be implemented if
142 // requirements change.
143 return nil;
144}

◆ closestPositionToPoint:withinRange:

- (UITextPosition *) closestPositionToPoint: (CGPoint)  point
withinRange: (UITextRange*)  range 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

146 :(CGPoint)point withinRange:(UITextRange*)range {
147 // This method is required but not called by accessibility API for
148 // features we are using it for. It may need to be implemented if
149 // requirements change.
150 return nil;
151}

◆ comparePosition:toPosition:

- (NSComparisonResult) comparePosition: (UITextPosition*)  position
toPosition: (UITextPosition*)  other 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

84 :(UITextPosition*)position toPosition:(UITextPosition*)other {
85 // This method is required but not called by accessibility API for
86 // features we are using it for. It may need to be implemented if
87 // requirements change.
88 return NSOrderedSame;
89}

◆ dealloc

- (void) dealloc
implementation

Definition at line 10 of file accessibility_text_entry.mm.

19 {
20 [_text release];
21 [_markedText release];
22 [_markedTextRange release];
23 [_selectedTextRange release];
24 [_markedTextStyle release];
25 [super dealloc];
26}

◆ deleteBackward

- (void) deleteBackward
implementation

Definition at line 10 of file accessibility_text_entry.mm.

173 {
174 // This method is required but not called by accessibility API for
175 // features we are using it for. It may need to be implemented if
176 // requirements change.
177}

◆ firstRectForRange:

- (CGRect) firstRectForRange: (UITextRange*)  range
implementation

Definition at line 10 of file accessibility_text_entry.mm.

125 :(UITextRange*)range {
126 // This method is required but not called by accessibility API for
127 // features we are using it for. It may need to be implemented if
128 // requirements change.
129 return CGRectZero;
130}

◆ hasText

- (BOOL) hasText
implementation

Definition at line 10 of file accessibility_text_entry.mm.

28 {
29 return self.text.length > 0;
30}

◆ insertText:

- (void) insertText: (NSString*)  text
implementation

Definition at line 10 of file accessibility_text_entry.mm.

167 :(NSString*)text {
168 // This method is required but not called by accessibility API for
169 // features we are using it for. It may need to be implemented if
170 // requirements change.
171}

◆ offsetFromPosition:toPosition:

- (NSInteger) offsetFromPosition: (UITextPosition*)  from
toPosition: (UITextPosition*)  toPosition 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

91 :(UITextPosition*)from toPosition:(UITextPosition*)toPosition {
92 // This method is required but not called by accessibility API for
93 // features we are using it for. It may need to be implemented if
94 // requirements change.
95 return 0;
96}

◆ positionFromPosition:inDirection:offset:

- (UITextPosition *) positionFromPosition: (UITextPosition*)  position
inDirection: (UITextLayoutDirection)  direction
offset: (NSInteger)  offset 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

75 :(UITextPosition*)position
76 inDirection:(UITextLayoutDirection)direction
77 offset:(NSInteger)offset {
78 // This method is required but not called by accessibility API for
79 // features we are using it for. It may need to be implemented if
80 // requirements change.
81 return nil;
82}
Point offset

◆ positionFromPosition:offset:

- (UITextPosition *) positionFromPosition: (UITextPosition*)  position
offset: (NSInteger)  offset 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

68 :(UITextPosition*)position offset:(NSInteger)offset {
69 // This method is required but not called by accessibility API for
70 // features we are using it for. It may need to be implemented if
71 // requirements change.
72 return nil;
73}

◆ positionWithinRange:farthestInDirection:

- (UITextPosition *) positionWithinRange: (UITextRange*)  range
farthestInDirection: (UITextLayoutDirection)  direction 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

98 :(UITextRange*)range
99 farthestInDirection:(UITextLayoutDirection)direction {
100 // This method is required but not called by accessibility API for
101 // features we are using it for. It may need to be implemented if
102 // requirements change.
103 return nil;
104}

◆ replaceRange:withText:

- (void) replaceRange: (UITextRange*)  range
withText: (NSString*)  text 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

43 :(UITextRange*)range withText:(NSString*)text {
44 // This method is required but not called by accessibility API for
45 // features we are using it for. It may need to be implemented if
46 // requirements change.
47}

◆ selectionRectsForRange:

- (NSArray *) selectionRectsForRange: (UITextRange*)  range
implementation

Definition at line 10 of file accessibility_text_entry.mm.

153 :(UITextRange*)range {
154 // This method is required but not called by accessibility API for
155 // features we are using it for. It may need to be implemented if
156 // requirements change.
157 return @[];
158}

◆ setBaseWritingDirection:forRange:

- (void) setBaseWritingDirection: (UITextWritingDirection)  writingDirection
forRange: (UITextRange*)  range 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

120 :(UITextWritingDirection)writingDirection
121 forRange:(UITextRange*)range {
122 // Not editable. Does not apply.
123}

◆ setMarkedText:selectedRange:

- (void) setMarkedText: (NSString*)  markedText
selectedRange: (NSRange)  markedSelectedRange 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

49 :(NSString*)markedText selectedRange:(NSRange)markedSelectedRange {
50 // This method is required but not called by accessibility API for
51 // features we are using it for. It may need to be implemented if
52 // requirements change.
53}

◆ textInRange:

- (NSString *) textInRange: (UITextRange*)  range
implementation

Definition at line 10 of file accessibility_text_entry.mm.

32 :(UITextRange*)range {
33 if (!range) {
34 return nil;
35 }
36 NSAssert([range isKindOfClass:[FlutterTextRange class]],
37 @"Expected a FlutterTextRange for range (got %@).", [range class]);
38 NSRange textRange = ((FlutterTextRange*)range).range;
39 NSAssert(textRange.location != NSNotFound, @"Expected a valid text range.");
40 return [self.text substringWithRange:textRange];
41}

◆ textRangeFromPosition:toPosition:

- (UITextRange *) textRangeFromPosition: (UITextPosition*)  fromPosition
toPosition: (UITextPosition*)  toPosition 
implementation

Definition at line 10 of file accessibility_text_entry.mm.

61 :(UITextPosition*)fromPosition
62 toPosition:(UITextPosition*)toPosition {
63 NSUInteger fromIndex = ((FlutterTextPosition*)fromPosition).index;
64 NSUInteger toIndex = ((FlutterTextPosition*)toPosition).index;
65 return [FlutterTextRange rangeWithNSRange:NSMakeRange(fromIndex, toIndex - fromIndex)];
66}
instancetype rangeWithNSRange:(NSRange range)

◆ unmarkText

- (void) unmarkText
implementation

Definition at line 10 of file accessibility_text_entry.mm.

55 {
56 // This method is required but not called by accessibility API for
57 // features we are using it for. It may need to be implemented if
58 // requirements change.
59}

Property Documentation

◆ inputDelegate

- (id<UITextInputDelegate>) inputDelegate
readwritenonatomicassign

Definition at line 21 of file accessibility_text_entry.h.

◆ markedText

- (NSMutableString*) markedText
readnonatomiccopy

Definition at line 17 of file accessibility_text_entry.h.

◆ markedTextRange

- (UITextRange*) markedTextRange
readnonatomicstrong

Definition at line 19 of file accessibility_text_entry.h.

◆ markedTextStyle

- (NSDictionary<NSAttributedStringKey, id>*) markedTextStyle
readwritenonatomiccopy

Definition at line 20 of file accessibility_text_entry.h.

◆ selectedTextRange

- (UITextRange*) selectedTextRange
readwriteatomiccopy

Definition at line 18 of file accessibility_text_entry.h.

◆ text

- (NSString*) text
readwritenonatomiccopy

Definition at line 16 of file accessibility_text_entry.h.


The documentation for this class was generated from the following files: