Skip to main content

NSCollectionViewDelegate

Trait NSCollectionViewDelegate 

Source
pub unsafe trait NSCollectionViewDelegate: NSObjectProtocol {
Show 29 methods // Provided methods fn collectionView_canDragItemsAtIndexPaths_withEvent( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, event: &NSEvent, ) -> bool where Self: Sized + Message { ... } fn collectionView_canDragItemsAtIndexes_withEvent( &self, collection_view: &NSCollectionView, indexes: &NSIndexSet, event: &NSEvent, ) -> bool where Self: Sized + Message { ... } fn collectionView_writeItemsAtIndexPaths_toPasteboard( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, pasteboard: &NSPasteboard, ) -> bool where Self: Sized + Message { ... } fn collectionView_writeItemsAtIndexes_toPasteboard( &self, collection_view: &NSCollectionView, indexes: &NSIndexSet, pasteboard: &NSPasteboard, ) -> bool where Self: Sized + Message { ... } fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths( &self, collection_view: &NSCollectionView, drop_url: &NSURL, index_paths: &NSSet<NSIndexPath>, ) -> Retained<NSArray<NSString>> where Self: Sized + Message { ... } fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes( &self, collection_view: &NSCollectionView, drop_url: &NSURL, indexes: &NSIndexSet, ) -> Retained<NSArray<NSString>> where Self: Sized + Message { ... } unsafe fn collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, event: &NSEvent, drag_image_offset: NSPointPointer, ) -> Retained<NSImage> where Self: Sized + Message { ... } unsafe fn collectionView_draggingImageForItemsAtIndexes_withEvent_offset( &self, collection_view: &NSCollectionView, indexes: &NSIndexSet, event: &NSEvent, drag_image_offset: NSPointPointer, ) -> Retained<NSImage> where Self: Sized + Message { ... } unsafe fn collectionView_validateDrop_proposedIndexPath_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, proposed_drop_index_path: &mut Retained<NSIndexPath>, proposed_drop_operation: NonNull<NSCollectionViewDropOperation>, ) -> NSDragOperation where Self: Sized + Message { ... } unsafe fn collectionView_validateDrop_proposedIndex_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, proposed_drop_index: NonNull<NSInteger>, proposed_drop_operation: NonNull<NSCollectionViewDropOperation>, ) -> NSDragOperation where Self: Sized + Message { ... } fn collectionView_acceptDrop_indexPath_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, index_path: &NSIndexPath, drop_operation: NSCollectionViewDropOperation, ) -> bool where Self: Sized + Message { ... } fn collectionView_acceptDrop_index_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, index: NSInteger, drop_operation: NSCollectionViewDropOperation, ) -> bool where Self: Sized + Message { ... } fn collectionView_pasteboardWriterForItemAtIndexPath( &self, collection_view: &NSCollectionView, index_path: &NSIndexPath, ) -> Option<Retained<ProtocolObject<dyn NSPasteboardWriting>>> where Self: Sized + Message { ... } fn collectionView_pasteboardWriterForItemAtIndex( &self, collection_view: &NSCollectionView, index: NSUInteger, ) -> Option<Retained<ProtocolObject<dyn NSPasteboardWriting>>> where Self: Sized + Message { ... } fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths( &self, collection_view: &NSCollectionView, session: &NSDraggingSession, screen_point: NSPoint, index_paths: &NSSet<NSIndexPath>, ) where Self: Sized + Message { ... } fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes( &self, collection_view: &NSCollectionView, session: &NSDraggingSession, screen_point: NSPoint, indexes: &NSIndexSet, ) where Self: Sized + Message { ... } fn collectionView_draggingSession_endedAtPoint_dragOperation( &self, collection_view: &NSCollectionView, session: &NSDraggingSession, screen_point: NSPoint, operation: NSDragOperation, ) where Self: Sized + Message { ... } fn collectionView_updateDraggingItemsForDrag( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, ) where Self: Sized + Message { ... } fn collectionView_shouldChangeItemsAtIndexPaths_toHighlightState( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, highlight_state: NSCollectionViewItemHighlightState, ) -> Retained<NSSet<NSIndexPath>> where Self: Sized + Message { ... } fn collectionView_didChangeItemsAtIndexPaths_toHighlightState( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, highlight_state: NSCollectionViewItemHighlightState, ) where Self: Sized + Message { ... } fn collectionView_shouldSelectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, ) -> Retained<NSSet<NSIndexPath>> where Self: Sized + Message { ... } fn collectionView_shouldDeselectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, ) -> Retained<NSSet<NSIndexPath>> where Self: Sized + Message { ... } fn collectionView_didSelectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, ) where Self: Sized + Message { ... } fn collectionView_didDeselectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, ) where Self: Sized + Message { ... } fn collectionView_willDisplayItem_forRepresentedObjectAtIndexPath( &self, collection_view: &NSCollectionView, item: &NSCollectionViewItem, index_path: &NSIndexPath, ) where Self: Sized + Message { ... } fn collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath( &self, collection_view: &NSCollectionView, view: &NSView, element_kind: &NSCollectionViewSupplementaryElementKind, index_path: &NSIndexPath, ) where Self: Sized + Message { ... } fn collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath( &self, collection_view: &NSCollectionView, item: &NSCollectionViewItem, index_path: &NSIndexPath, ) where Self: Sized + Message { ... } fn collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath( &self, collection_view: &NSCollectionView, view: &NSView, element_kind: &NSCollectionViewSupplementaryElementKind, index_path: &NSIndexPath, ) where Self: Sized + Message { ... } fn collectionView_transitionLayoutForOldLayout_newLayout( &self, collection_view: &NSCollectionView, from_layout: &NSCollectionViewLayout, to_layout: &NSCollectionViewLayout, ) -> Retained<NSCollectionViewTransitionLayout> where Self: Sized + Message { ... }
}
Available on crate feature NSCollectionView only.
Expand description

Provided Methods§

Source

fn collectionView_canDragItemsAtIndexPaths_withEvent( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, event: &NSEvent, ) -> bool
where Self: Sized + Message,

Available on crate features NSEvent and NSResponder and NSView only.
Source

fn collectionView_canDragItemsAtIndexes_withEvent( &self, collection_view: &NSCollectionView, indexes: &NSIndexSet, event: &NSEvent, ) -> bool
where Self: Sized + Message,

Available on crate features NSEvent and NSResponder and NSView only.
Source

fn collectionView_writeItemsAtIndexPaths_toPasteboard( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, pasteboard: &NSPasteboard, ) -> bool
where Self: Sized + Message,

👎Deprecated:

Use -collectionView:pasteboardWriterForItemAtIndexPath: instead

Available on crate features NSPasteboard and NSResponder and NSView only.
Source

fn collectionView_writeItemsAtIndexes_toPasteboard( &self, collection_view: &NSCollectionView, indexes: &NSIndexSet, pasteboard: &NSPasteboard, ) -> bool
where Self: Sized + Message,

👎Deprecated:

Use -collectionView:pasteboardWriterForItemAtIndexPath: instead

Available on crate features NSPasteboard and NSResponder and NSView only.
Source

fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths( &self, collection_view: &NSCollectionView, drop_url: &NSURL, index_paths: &NSSet<NSIndexPath>, ) -> Retained<NSArray<NSString>>
where Self: Sized + Message,

👎Deprecated:

Use NSFilePromiseReceiver objects instead

Available on crate features NSResponder and NSView only.
Source

fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes( &self, collection_view: &NSCollectionView, drop_url: &NSURL, indexes: &NSIndexSet, ) -> Retained<NSArray<NSString>>
where Self: Sized + Message,

👎Deprecated:

Use NSFilePromiseReceiver objects instead

Available on crate features NSResponder and NSView only.
Source

unsafe fn collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, event: &NSEvent, drag_image_offset: NSPointPointer, ) -> Retained<NSImage>
where Self: Sized + Message,

Available on crate features NSEvent and NSImage and NSResponder and NSView only.
§Safety

drag_image_offset must be a valid pointer.

Source

unsafe fn collectionView_draggingImageForItemsAtIndexes_withEvent_offset( &self, collection_view: &NSCollectionView, indexes: &NSIndexSet, event: &NSEvent, drag_image_offset: NSPointPointer, ) -> Retained<NSImage>
where Self: Sized + Message,

Available on crate features NSEvent and NSImage and NSResponder and NSView only.
§Safety

drag_image_offset must be a valid pointer.

Source

unsafe fn collectionView_validateDrop_proposedIndexPath_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, proposed_drop_index_path: &mut Retained<NSIndexPath>, proposed_drop_operation: NonNull<NSCollectionViewDropOperation>, ) -> NSDragOperation
where Self: Sized + Message,

Available on crate features NSDragging and NSResponder and NSView only.
§Safety

proposed_drop_operation must be a valid pointer.

Source

unsafe fn collectionView_validateDrop_proposedIndex_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, proposed_drop_index: NonNull<NSInteger>, proposed_drop_operation: NonNull<NSCollectionViewDropOperation>, ) -> NSDragOperation
where Self: Sized + Message,

Available on crate features NSDragging and NSResponder and NSView only.
§Safety
  • proposed_drop_index must be a valid pointer.
  • proposed_drop_operation must be a valid pointer.
Source

fn collectionView_acceptDrop_indexPath_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, index_path: &NSIndexPath, drop_operation: NSCollectionViewDropOperation, ) -> bool
where Self: Sized + Message,

Available on crate features NSDragging and NSResponder and NSView only.
Source

fn collectionView_acceptDrop_index_dropOperation( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, index: NSInteger, drop_operation: NSCollectionViewDropOperation, ) -> bool
where Self: Sized + Message,

Available on crate features NSDragging and NSResponder and NSView only.
Source

fn collectionView_pasteboardWriterForItemAtIndexPath( &self, collection_view: &NSCollectionView, index_path: &NSIndexPath, ) -> Option<Retained<ProtocolObject<dyn NSPasteboardWriting>>>
where Self: Sized + Message,

Available on crate features NSPasteboard and NSResponder and NSView only.
Source

fn collectionView_pasteboardWriterForItemAtIndex( &self, collection_view: &NSCollectionView, index: NSUInteger, ) -> Option<Retained<ProtocolObject<dyn NSPasteboardWriting>>>
where Self: Sized + Message,

Available on crate features NSPasteboard and NSResponder and NSView only.
Source

fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths( &self, collection_view: &NSCollectionView, session: &NSDraggingSession, screen_point: NSPoint, index_paths: &NSSet<NSIndexPath>, )
where Self: Sized + Message,

Available on crate features NSDraggingSession and NSResponder and NSView only.
Source

fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes( &self, collection_view: &NSCollectionView, session: &NSDraggingSession, screen_point: NSPoint, indexes: &NSIndexSet, )
where Self: Sized + Message,

Available on crate features NSDraggingSession and NSResponder and NSView only.
Source

fn collectionView_draggingSession_endedAtPoint_dragOperation( &self, collection_view: &NSCollectionView, session: &NSDraggingSession, screen_point: NSPoint, operation: NSDragOperation, )
where Self: Sized + Message,

Available on crate features NSDragging and NSDraggingSession and NSResponder and NSView only.
Source

fn collectionView_updateDraggingItemsForDrag( &self, collection_view: &NSCollectionView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, )
where Self: Sized + Message,

Available on crate features NSDragging and NSResponder and NSView only.
Source

fn collectionView_shouldChangeItemsAtIndexPaths_toHighlightState( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, highlight_state: NSCollectionViewItemHighlightState, ) -> Retained<NSSet<NSIndexPath>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_didChangeItemsAtIndexPaths_toHighlightState( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, highlight_state: NSCollectionViewItemHighlightState, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_shouldSelectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, ) -> Retained<NSSet<NSIndexPath>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_shouldDeselectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, ) -> Retained<NSSet<NSIndexPath>>
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_didSelectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_didDeselectItemsAtIndexPaths( &self, collection_view: &NSCollectionView, index_paths: &NSSet<NSIndexPath>, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_willDisplayItem_forRepresentedObjectAtIndexPath( &self, collection_view: &NSCollectionView, item: &NSCollectionViewItem, index_path: &NSIndexPath, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView and NSViewController only.
Source

fn collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath( &self, collection_view: &NSCollectionView, view: &NSView, element_kind: &NSCollectionViewSupplementaryElementKind, index_path: &NSIndexPath, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath( &self, collection_view: &NSCollectionView, item: &NSCollectionViewItem, index_path: &NSIndexPath, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView and NSViewController only.
Source

fn collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath( &self, collection_view: &NSCollectionView, view: &NSView, element_kind: &NSCollectionViewSupplementaryElementKind, index_path: &NSIndexPath, )
where Self: Sized + Message,

Available on crate features NSResponder and NSView only.
Source

fn collectionView_transitionLayoutForOldLayout_newLayout( &self, collection_view: &NSCollectionView, from_layout: &NSCollectionViewLayout, to_layout: &NSCollectionViewLayout, ) -> Retained<NSCollectionViewTransitionLayout>
where Self: Sized + Message,

Available on crate features NSCollectionViewLayout and NSCollectionViewTransitionLayout and NSResponder and NSView only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSCollectionViewDelegate

Source§

impl ProtocolType for dyn NSCollectionViewDelegate

Source§

const NAME: &'static str = "NSCollectionViewDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> NSCollectionViewDelegate for ProtocolObject<T>

Implementors§