Flutter iOS Embedder
FlutterUndoManagerDelegate.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERUNDOMANAGERDELEGATE_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERUNDOMANAGERDELEGATE_H_
7 
8 #import <Foundation/Foundation.h>
9 
11 
12 typedef NS_ENUM(NSInteger, FlutterUndoRedoDirection) {
13  // NOLINTBEGIN(readability-identifier-naming)
14  FlutterUndoRedoDirectionUndo,
15  FlutterUndoRedoDirectionRedo,
16  // NOLINTEND(readability-identifier-naming)
17 };
18 
19 /**
20  * Protocol for undo manager changes from the `FlutterUndoManagerPlugin`, typically a
21  * `FlutterEngine`.
22  */
23 @protocol FlutterUndoManagerDelegate <NSObject>
24 
25 /**
26  * The `NSUndoManager` that should be managed by the `FlutterUndoManagerPlugin`.
27  * When the delegate is `FlutterEngine` this will be the `FlutterViewController`'s undo manager.
28  */
29 @property(nonatomic, readonly, nullable) NSUndoManager* undoManager;
30 
31 /**
32  * Used to notify the active view when undo manager state (can redo/can undo)
33  * changes, in order to force keyboards to update undo/redo buttons.
34  */
35 @property(nonatomic, readonly, nullable) UIView<UITextInput>* activeTextInputView;
36 
37 /**
38  * Pass changes to the framework through the undo manager channel.
39  */
40 - (void)handleUndoWithDirection:(FlutterUndoRedoDirection)direction;
41 
42 @end
44 
45 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERUNDOMANAGERDELEGATE_H_
NS_ENUM
NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSInteger, FlutterUndoRedoDirection)
Definition: FlutterUndoManagerDelegate.h:12
NS_ASSUME_NONNULL_END
#define NS_ASSUME_NONNULL_END
Definition: FlutterMacros.h:20
NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_BEGIN
Definition: FlutterMacros.h:19
FlutterUndoManagerDelegate-p::activeTextInputView
UIView< UITextInput > * activeTextInputView
Definition: FlutterUndoManagerDelegate.h:35
FlutterUndoManagerDelegate-p
Definition: FlutterUndoManagerDelegate.h:23
FlutterUndoManagerDelegate-p::undoManager
NSUndoManager * undoManager
Definition: FlutterUndoManagerDelegate.h:29