Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | List of all members
FlutterMenuDelegate Class Reference
Inheritance diagram for FlutterMenuDelegate:

Instance Methods

(instancetype) - initWithIdentifier:channel:
 
(void) - menuWillOpen: [implementation]
 
(void) - menuDidClose: [implementation]
 

Detailed Description

An NSMenuDelegate used to listen for changes in the menu when it opens and closes.

Definition at line 159 of file FlutterMenuPlugin.mm.

Method Documentation

◆ initWithIdentifier:channel:

- (instancetype) initWithIdentifier: (int64_t)  identifier
channel: (FlutterMethodChannel*)  channel 

When this delegate receives notification that the menu opened or closed, it will send a message on the given channel to that effect for the menu item with the given id (the ID comes from the data supplied by the framework to |FlutterMenuPlugin.setMenus|).

Definition at line 171 of file FlutterMenuPlugin.mm.

174 :(int64_t)identifier channel:(FlutterMethodChannel*)channel {
175 self = [super init];
176 if (self) {
178 _channel = channel;
179 }
180 return self;
181}
int64_t _identifier
FlutterMethodChannel * _channel
static SkString identifier(const FontFamilyDesc &family, const FontDesc &font)
init(device_serial, adb_binary)
Definition _adb_path.py:12

◆ menuDidClose:

- (void) menuDidClose: (NSMenu*)  menu
implementation

Definition at line 171 of file FlutterMenuPlugin.mm.

187 :(NSMenu*)menu {
188 [_channel invokeMethod:kMenuClosedMethod arguments:@(_identifier)];
189}

◆ menuWillOpen:

- (void) menuWillOpen: (NSMenu*)  menu
implementation

Definition at line 171 of file FlutterMenuPlugin.mm.

183 :(NSMenu*)menu {
184 [_channel invokeMethod:kMenuOpenedMethod arguments:@(_identifier)];
185}

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