#include <FlutterTextInputPlugin.h>
Instance Methods | |
| (instancetype) | - NS_UNAVAILABLE |
| (instancetype) | - initWithDelegate: |
| (void) | - handleMethodCall:result: |
| (void) | - reset |
| (UIView< UITextInput > *) | - textInputView |
| (void) | - setUpIndirectScribbleInteraction: |
| (void) | - resetViewResponder |
| (BOOL) | - showEditMenu: |
| (ios(16.0) | - API_AVAILABLE |
| (instancetype) | - initWithDelegate: |
| (BOOL) | - isFirstResponder |
| (BOOL) | - handleKeyEvent: |
| (NSRect) | - firstRectForCharacterRange:actualRange: |
| (NSDictionary *) | - editingState |
Class Methods | |
| (instancetype) | + NS_UNAVAILABLE |
Protected Attributes | |
| : NSObject <FlutterKeySecondaryResponder | |
Properties | |
| UIIndirectScribbleInteractionDelegate UIViewController * | viewController |
| id< FlutterIndirectScribbleDelegate > | indirectScribbleDelegate |
| NSMutableDictionary< UIScribbleElementIdentifier, NSValue * > * | scribbleElements |
| FlutterTextField * | client |
| FlutterViewController * | currentViewController |
| NSTextInputContext * | textInputContext |
| NSString * | customRunLoopMode |
A plugin to handle text input.
Responsible for bridging the native macOS text input system with the Flutter framework text editing classes, via system channels.
This is not an FlutterPlugin since it needs access to FlutterViewController internals, so needs to be managed differently.
When accessibility is on, accessibility bridge creates a NSTextField, i.e. FlutterTextField, for every text field in the Flutter. This plugin acts as a field editor for those NSTextField[s].
Definition at line 33 of file FlutterTextInputPlugin.h.
| - (ios(16.0) API_AVAILABLE |
| - (NSDictionary *) editingState |
Provided by category FlutterTextInputPlugin(TestMethods).
Referenced by flutter::testing::TEST(), and flutter::testing::TEST().
| - (NSRect) firstRectForCharacterRange: | (NSRange) | range | |
| actualRange: | (NSRangePointer) | actualRange | |
Provided by category FlutterTextInputPlugin(TestMethods).
| - (BOOL) handleKeyEvent: | (NSEvent*) | event |
Handles key down events received from the view controller, responding YES if the event was handled.
Note, the Apple docs suggest that clients should override essentially all the mouse and keyboard event-handling methods of NSResponder. However, experimentation indicates that only key events are processed by the native layer; Flutter processes mouse events. Additionally, processing both keyUp and keyDown results in duplicate processing of the same keys.
Definition at line 342 of file FlutterTextInputPlugin.mm.
References _channel, FlutterMethodChannel::methodChannelWithName:binaryMessenger:codec:, and self.
| - (void) handleMethodCall: | (FlutterMethodCall*) | call | |
| result: | (FlutterResult) | result | |
Provided by category FlutterTextInputPlugin(TestMethods).
Definition at line 2515 of file FlutterTextInputPlugin.mm.
Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), and flutter::testing::TEST().
| - (instancetype) initWithDelegate: | (id<FlutterTextInputDelegate>) | NS_DESIGNATED_INITIALIZER |
Definition at line 2515 of file FlutterTextInputPlugin.mm.
| - (instancetype) initWithDelegate: | (id<FlutterTextInputPluginDelegate>) | delegate |
Initializes a text input plugin that coordinates key event handling with |viewController|.
Definition at line 342 of file FlutterTextInputPlugin.mm.
| - (BOOL) isFirstResponder |
Whether this plugin is the first responder of this NSWindow.
When accessibility is on, this plugin is set as the first responder to act as the field editor for FlutterTextFields.
Returns false if accessibility is off.
Definition at line 342 of file FlutterTextInputPlugin.mm.
| - (instancetype) NS_UNAVAILABLE |
| + (instancetype) NS_UNAVAILABLE |
| - (void) reset |
Reset the text input plugin to prepare for a hot restart.
This hides the software keyboard and text editing context menu.
Definition at line 2515 of file FlutterTextInputPlugin.mm.
| - (void) resetViewResponder |
Definition at line 2515 of file FlutterTextInputPlugin.mm.
| - (void) setUpIndirectScribbleInteraction: | (id<FlutterViewResponder>) | viewResponder |
These are used by the UIIndirectScribbleInteractionDelegate methods to handle focusing on the correct element.
Definition at line 2515 of file FlutterTextInputPlugin.mm.
| - (BOOL) showEditMenu: | (ios(16.0)) | API_AVAILABLE |
Definition at line 2515 of file FlutterTextInputPlugin.mm.
| - (UIView< UITextInput > *) textInputView |
The UITextInput implementation used to control text entry.
This is used by AccessibilityBridge to forward interactions with iOS' accessibility system.
Definition at line 2515 of file FlutterTextInputPlugin.mm.
|
protected |
Definition at line 186 of file FlutterTextInputPlugin.h.
|
readwritenonatomicweak |
The NSTextField that currently has this plugin as its field editor.
Must be nil if accessibility is off.
Definition at line 48 of file FlutterTextInputPlugin.h.
|
readnonatomicweak |
Returns the view controller text input plugin is currently attached to, nil if not attached to any view controller.
Definition at line 54 of file FlutterTextInputPlugin.h.
Referenced by flutter::testing::TEST().
|
readwritenonatomicassign |
Provided by category FlutterTextInputPlugin(TestMethods).
Definition at line 91 of file FlutterTextInputPlugin.h.
|
readwritenonatomicweak |
Definition at line 37 of file FlutterTextInputPlugin.h.
|
readwritenonatomicstrong |
Definition at line 39 of file FlutterTextInputPlugin.h.
|
readwritenonatomicassign |
Provided by category FlutterTextInputPlugin(TestMethods).
Definition at line 90 of file FlutterTextInputPlugin.h.
|
readwritenonatomicweak |
Definition at line 36 of file FlutterTextInputPlugin.h.