implement static method

NSCollectionViewDelegateFlowLayout implement({
  1. NSSize collectionView_layout_sizeForItemAtIndexPath_(
    1. NSCollectionView,
    2. NSCollectionViewLayout,
    3. NSIndexPath
    )?,
  2. NSEdgeInsets collectionView_layout_insetForSectionAtIndex_(
    1. NSCollectionView,
    2. NSCollectionViewLayout,
    3. DartNSInteger
    )?,
  3. DartCGFloat collectionView_layout_minimumLineSpacingForSectionAtIndex_(
    1. NSCollectionView,
    2. NSCollectionViewLayout,
    3. DartNSInteger
    )?,
  4. DartCGFloat collectionView_layout_minimumInteritemSpacingForSectionAtIndex_(
    1. NSCollectionView,
    2. NSCollectionViewLayout,
    3. DartNSInteger
    )?,
  5. NSSize collectionView_layout_referenceSizeForHeaderInSection_(
    1. NSCollectionView,
    2. NSCollectionViewLayout,
    3. DartNSInteger
    )?,
  6. NSSize collectionView_layout_referenceSizeForFooterInSection_(
    1. NSCollectionView,
    2. NSCollectionViewLayout,
    3. DartNSInteger
    )?,
  7. bool collectionView_canDragItemsAtIndexPaths_withEvent_(
    1. NSCollectionView,
    2. NSSet,
    3. NSEvent
    )?,
  8. bool collectionView_canDragItemsAtIndexes_withEvent_(
    1. NSCollectionView,
    2. NSIndexSet,
    3. NSEvent
    )?,
  9. bool collectionView_writeItemsAtIndexPaths_toPasteboard_(
    1. NSCollectionView,
    2. NSSet,
    3. NSPasteboard
    )?,
  10. bool collectionView_writeItemsAtIndexes_toPasteboard_(
    1. NSCollectionView,
    2. NSIndexSet,
    3. NSPasteboard
    )?,
  11. NSArray collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths_(
    1. NSCollectionView,
    2. NSURL,
    3. NSSet
    )?,
  12. NSArray collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes_(
    1. NSCollectionView,
    2. NSURL,
    3. NSIndexSet
    )?,
  13. NSImage collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset_(
    1. NSCollectionView,
    2. NSSet,
    3. NSEvent,
    4. NSPointPointer,
    )?,
  14. NSImage collectionView_draggingImageForItemsAtIndexes_withEvent_offset_(
    1. NSCollectionView,
    2. NSIndexSet,
    3. NSEvent,
    4. NSPointPointer,
    )?,
  15. NSDragOperation collectionView_validateDrop_proposedIndexPath_dropOperation_(
    1. NSCollectionView,
    2. NSDraggingInfo,
    3. Pointer<Pointer<ObjCObject>>,
    4. Pointer<NSInteger>,
    )?,
  16. NSDragOperation collectionView_validateDrop_proposedIndex_dropOperation_(
    1. NSCollectionView,
    2. NSDraggingInfo,
    3. Pointer<NSInteger>,
    4. Pointer<NSInteger>,
    )?,
  17. bool collectionView_acceptDrop_indexPath_dropOperation_(
    1. NSCollectionView,
    2. NSDraggingInfo,
    3. NSIndexPath,
    4. NSCollectionViewDropOperation,
    )?,
  18. bool collectionView_acceptDrop_index_dropOperation_(
    1. NSCollectionView,
    2. NSDraggingInfo,
    3. DartNSInteger,
    4. NSCollectionViewDropOperation,
    )?,
  19. NSPasteboardWriting? collectionView_pasteboardWriterForItemAtIndexPath_(
    1. NSCollectionView,
    2. NSIndexPath
    )?,
  20. NSPasteboardWriting? collectionView_pasteboardWriterForItemAtIndex_(
    1. NSCollectionView,
    2. DartNSUInteger
    )?,
  21. void collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths_(
    1. NSCollectionView,
    2. NSDraggingSession,
    3. NSPoint,
    4. NSSet,
    )?,
  22. void collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes_(
    1. NSCollectionView,
    2. NSDraggingSession,
    3. NSPoint,
    4. NSIndexSet,
    )?,
  23. void collectionView_draggingSession_endedAtPoint_dragOperation_(
    1. NSCollectionView,
    2. NSDraggingSession,
    3. NSPoint,
    4. NSDragOperation,
    )?,
  24. void collectionView_updateDraggingItemsForDrag_(
    1. NSCollectionView,
    2. NSDraggingInfo
    )?,
  25. NSSet collectionView_shouldChangeItemsAtIndexPaths_toHighlightState_(
    1. NSCollectionView,
    2. NSSet,
    3. NSCollectionViewItemHighlightState
    )?,
  26. void collectionView_didChangeItemsAtIndexPaths_toHighlightState_(
    1. NSCollectionView,
    2. NSSet,
    3. NSCollectionViewItemHighlightState
    )?,
  27. NSSet collectionView_shouldSelectItemsAtIndexPaths_(
    1. NSCollectionView,
    2. NSSet
    )?,
  28. NSSet collectionView_shouldDeselectItemsAtIndexPaths_(
    1. NSCollectionView,
    2. NSSet
    )?,
  29. void collectionView_didSelectItemsAtIndexPaths_(
    1. NSCollectionView,
    2. NSSet
    )?,
  30. void collectionView_didDeselectItemsAtIndexPaths_(
    1. NSCollectionView,
    2. NSSet
    )?,
  31. void collectionView_willDisplayItem_forRepresentedObjectAtIndexPath_(
    1. NSCollectionView,
    2. NSCollectionViewItem,
    3. NSIndexPath
    )?,
  32. void collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath_(
    1. NSCollectionView,
    2. NSView,
    3. DartNSCollectionViewSupplementaryElementKind,
    4. NSIndexPath,
    )?,
  33. void collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath_(
    1. NSCollectionView,
    2. NSCollectionViewItem,
    3. NSIndexPath
    )?,
  34. void collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath_(
    1. NSCollectionView,
    2. NSView,
    3. DartNSCollectionViewSupplementaryElementKind,
    4. NSIndexPath,
    )?,
  35. NSCollectionViewTransitionLayout collectionView_transitionLayoutForOldLayout_newLayout_(
    1. NSCollectionView,
    2. NSCollectionViewLayout,
    3. NSCollectionViewLayout
    )?,
  36. bool $keepIsolateAlive = true,
})
override

Builds an object that implements the NSCollectionViewDelegateFlowLayout protocol. To implement multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.

If $keepIsolateAlive is true, this protocol will keep this isolate alive until it is garbage collected by both Dart and ObjC.

Implementation

static NSCollectionViewDelegateFlowLayout implement({
  NSSize Function(NSCollectionView, NSCollectionViewLayout, NSIndexPath)?
  collectionView_layout_sizeForItemAtIndexPath_,
  objc.NSEdgeInsets Function(
    NSCollectionView,
    NSCollectionViewLayout,
    DartNSInteger,
  )?
  collectionView_layout_insetForSectionAtIndex_,
  DartCGFloat Function(
    NSCollectionView,
    NSCollectionViewLayout,
    DartNSInteger,
  )?
  collectionView_layout_minimumLineSpacingForSectionAtIndex_,
  DartCGFloat Function(
    NSCollectionView,
    NSCollectionViewLayout,
    DartNSInteger,
  )?
  collectionView_layout_minimumInteritemSpacingForSectionAtIndex_,
  NSSize Function(NSCollectionView, NSCollectionViewLayout, DartNSInteger)?
  collectionView_layout_referenceSizeForHeaderInSection_,
  NSSize Function(NSCollectionView, NSCollectionViewLayout, DartNSInteger)?
  collectionView_layout_referenceSizeForFooterInSection_,
  bool Function(NSCollectionView, objc.NSSet, NSEvent)?
  collectionView_canDragItemsAtIndexPaths_withEvent_,
  bool Function(NSCollectionView, objc.NSIndexSet, NSEvent)?
  collectionView_canDragItemsAtIndexes_withEvent_,
  bool Function(NSCollectionView, objc.NSSet, NSPasteboard)?
  collectionView_writeItemsAtIndexPaths_toPasteboard_,
  bool Function(NSCollectionView, objc.NSIndexSet, NSPasteboard)?
  collectionView_writeItemsAtIndexes_toPasteboard_,
  objc.NSArray Function(NSCollectionView, objc.NSURL, objc.NSSet)?
  collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths_,
  objc.NSArray Function(NSCollectionView, objc.NSURL, objc.NSIndexSet)?
  collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes_,
  NSImage Function(NSCollectionView, objc.NSSet, NSEvent, NSPointPointer)?
  collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset_,
  NSImage Function(
    NSCollectionView,
    objc.NSIndexSet,
    NSEvent,
    NSPointPointer,
  )?
  collectionView_draggingImageForItemsAtIndexes_withEvent_offset_,
  NSDragOperation Function(
    NSCollectionView,
    NSDraggingInfo,
    ffi.Pointer<ffi.Pointer<objc.ObjCObject>>,
    ffi.Pointer<NSInteger>,
  )?
  collectionView_validateDrop_proposedIndexPath_dropOperation_,
  NSDragOperation Function(
    NSCollectionView,
    NSDraggingInfo,
    ffi.Pointer<NSInteger>,
    ffi.Pointer<NSInteger>,
  )?
  collectionView_validateDrop_proposedIndex_dropOperation_,
  bool Function(
    NSCollectionView,
    NSDraggingInfo,
    NSIndexPath,
    NSCollectionViewDropOperation,
  )?
  collectionView_acceptDrop_indexPath_dropOperation_,
  bool Function(
    NSCollectionView,
    NSDraggingInfo,
    DartNSInteger,
    NSCollectionViewDropOperation,
  )?
  collectionView_acceptDrop_index_dropOperation_,
  NSPasteboardWriting? Function(NSCollectionView, NSIndexPath)?
  collectionView_pasteboardWriterForItemAtIndexPath_,
  NSPasteboardWriting? Function(NSCollectionView, DartNSUInteger)?
  collectionView_pasteboardWriterForItemAtIndex_,
  void Function(NSCollectionView, NSDraggingSession, NSPoint, objc.NSSet)?
  collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths_,
  void Function(
    NSCollectionView,
    NSDraggingSession,
    NSPoint,
    objc.NSIndexSet,
  )?
  collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes_,
  void Function(
    NSCollectionView,
    NSDraggingSession,
    NSPoint,
    NSDragOperation,
  )?
  collectionView_draggingSession_endedAtPoint_dragOperation_,
  void Function(NSCollectionView, NSDraggingInfo)?
  collectionView_updateDraggingItemsForDrag_,
  objc.NSSet Function(
    NSCollectionView,
    objc.NSSet,
    NSCollectionViewItemHighlightState,
  )?
  collectionView_shouldChangeItemsAtIndexPaths_toHighlightState_,
  void Function(
    NSCollectionView,
    objc.NSSet,
    NSCollectionViewItemHighlightState,
  )?
  collectionView_didChangeItemsAtIndexPaths_toHighlightState_,
  objc.NSSet Function(NSCollectionView, objc.NSSet)?
  collectionView_shouldSelectItemsAtIndexPaths_,
  objc.NSSet Function(NSCollectionView, objc.NSSet)?
  collectionView_shouldDeselectItemsAtIndexPaths_,
  void Function(NSCollectionView, objc.NSSet)?
  collectionView_didSelectItemsAtIndexPaths_,
  void Function(NSCollectionView, objc.NSSet)?
  collectionView_didDeselectItemsAtIndexPaths_,
  void Function(NSCollectionView, NSCollectionViewItem, NSIndexPath)?
  collectionView_willDisplayItem_forRepresentedObjectAtIndexPath_,
  void Function(
    NSCollectionView,
    NSView,
    DartNSCollectionViewSupplementaryElementKind,
    NSIndexPath,
  )?
  collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath_,
  void Function(NSCollectionView, NSCollectionViewItem, NSIndexPath)?
  collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath_,
  void Function(
    NSCollectionView,
    NSView,
    DartNSCollectionViewSupplementaryElementKind,
    NSIndexPath,
  )?
  collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath_,
  NSCollectionViewTransitionLayout Function(
    NSCollectionView,
    NSCollectionViewLayout,
    NSCollectionViewLayout,
  )?
  collectionView_transitionLayoutForOldLayout_newLayout_,
  bool $keepIsolateAlive = true,
}) {
  final builder = objc.ObjCProtocolBuilder(
    debugName: 'NSCollectionViewDelegateFlowLayout',
  );
  NSCollectionViewDelegateFlowLayout
      .collectionView_layout_sizeForItemAtIndexPath_
      .implement(builder, collectionView_layout_sizeForItemAtIndexPath_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_layout_insetForSectionAtIndex_
      .implement(builder, collectionView_layout_insetForSectionAtIndex_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_layout_minimumLineSpacingForSectionAtIndex_
      .implement(
        builder,
        collectionView_layout_minimumLineSpacingForSectionAtIndex_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_layout_minimumInteritemSpacingForSectionAtIndex_
      .implement(
        builder,
        collectionView_layout_minimumInteritemSpacingForSectionAtIndex_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_layout_referenceSizeForHeaderInSection_
      .implement(
        builder,
        collectionView_layout_referenceSizeForHeaderInSection_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_layout_referenceSizeForFooterInSection_
      .implement(
        builder,
        collectionView_layout_referenceSizeForFooterInSection_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_canDragItemsAtIndexPaths_withEvent_
      .implement(builder, collectionView_canDragItemsAtIndexPaths_withEvent_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_canDragItemsAtIndexes_withEvent_
      .implement(builder, collectionView_canDragItemsAtIndexes_withEvent_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_writeItemsAtIndexPaths_toPasteboard_
      .implement(
        builder,
        collectionView_writeItemsAtIndexPaths_toPasteboard_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_writeItemsAtIndexes_toPasteboard_
      .implement(builder, collectionView_writeItemsAtIndexes_toPasteboard_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths_
      .implement(
        builder,
        collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes_
      .implement(
        builder,
        collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset_
      .implement(
        builder,
        collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_draggingImageForItemsAtIndexes_withEvent_offset_
      .implement(
        builder,
        collectionView_draggingImageForItemsAtIndexes_withEvent_offset_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_validateDrop_proposedIndexPath_dropOperation_
      .implement(
        builder,
        collectionView_validateDrop_proposedIndexPath_dropOperation_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_validateDrop_proposedIndex_dropOperation_
      .implement(
        builder,
        collectionView_validateDrop_proposedIndex_dropOperation_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_acceptDrop_indexPath_dropOperation_
      .implement(builder, collectionView_acceptDrop_indexPath_dropOperation_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_acceptDrop_index_dropOperation_
      .implement(builder, collectionView_acceptDrop_index_dropOperation_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_pasteboardWriterForItemAtIndexPath_
      .implement(builder, collectionView_pasteboardWriterForItemAtIndexPath_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_pasteboardWriterForItemAtIndex_
      .implement(builder, collectionView_pasteboardWriterForItemAtIndex_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths_
      .implement(
        builder,
        collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes_
      .implement(
        builder,
        collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_draggingSession_endedAtPoint_dragOperation_
      .implement(
        builder,
        collectionView_draggingSession_endedAtPoint_dragOperation_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_updateDraggingItemsForDrag_
      .implement(builder, collectionView_updateDraggingItemsForDrag_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_shouldChangeItemsAtIndexPaths_toHighlightState_
      .implement(
        builder,
        collectionView_shouldChangeItemsAtIndexPaths_toHighlightState_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_didChangeItemsAtIndexPaths_toHighlightState_
      .implement(
        builder,
        collectionView_didChangeItemsAtIndexPaths_toHighlightState_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_shouldSelectItemsAtIndexPaths_
      .implement(builder, collectionView_shouldSelectItemsAtIndexPaths_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_shouldDeselectItemsAtIndexPaths_
      .implement(builder, collectionView_shouldDeselectItemsAtIndexPaths_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_didSelectItemsAtIndexPaths_
      .implement(builder, collectionView_didSelectItemsAtIndexPaths_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_didDeselectItemsAtIndexPaths_
      .implement(builder, collectionView_didDeselectItemsAtIndexPaths_);
  NSCollectionViewDelegateFlowLayout
      .collectionView_willDisplayItem_forRepresentedObjectAtIndexPath_
      .implement(
        builder,
        collectionView_willDisplayItem_forRepresentedObjectAtIndexPath_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath_
      .implement(
        builder,
        collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath_
      .implement(
        builder,
        collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath_
      .implement(
        builder,
        collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath_,
      );
  NSCollectionViewDelegateFlowLayout
      .collectionView_transitionLayoutForOldLayout_newLayout_
      .implement(
        builder,
        collectionView_transitionLayoutForOldLayout_newLayout_,
      );
  builder.addProtocol($protocol);
  return NSCollectionViewDelegateFlowLayout.castFrom(
    builder.build(keepIsolateAlive: $keepIsolateAlive),
  );
}