Skip to main content

NSTableViewDataSource

Trait NSTableViewDataSource 

Source
pub unsafe trait NSTableViewDataSource: NSObjectProtocol {
    // Provided methods
    fn numberOfRowsInTableView(&self, table_view: &NSTableView) -> NSInteger
       where Self: Sized + Message { ... }
    fn tableView_objectValueForTableColumn_row(
        &self,
        table_view: &NSTableView,
        table_column: Option<&NSTableColumn>,
        row: NSInteger,
    ) -> Option<Retained<AnyObject>>
       where Self: Sized + Message { ... }
    unsafe fn tableView_setObjectValue_forTableColumn_row(
        &self,
        table_view: &NSTableView,
        object: Option<&AnyObject>,
        table_column: Option<&NSTableColumn>,
        row: NSInteger,
    )
       where Self: Sized + Message { ... }
    fn tableView_sortDescriptorsDidChange(
        &self,
        table_view: &NSTableView,
        old_descriptors: &NSArray<NSSortDescriptor>,
    )
       where Self: Sized + Message { ... }
    fn tableView_pasteboardWriterForRow(
        &self,
        table_view: &NSTableView,
        row: NSInteger,
    ) -> Option<Retained<ProtocolObject<dyn NSPasteboardWriting>>>
       where Self: Sized + Message { ... }
    fn tableView_draggingSession_willBeginAtPoint_forRowIndexes(
        &self,
        table_view: &NSTableView,
        session: &NSDraggingSession,
        screen_point: NSPoint,
        row_indexes: &NSIndexSet,
    )
       where Self: Sized + Message { ... }
    fn tableView_draggingSession_endedAtPoint_operation(
        &self,
        table_view: &NSTableView,
        session: &NSDraggingSession,
        screen_point: NSPoint,
        operation: NSDragOperation,
    )
       where Self: Sized + Message { ... }
    fn tableView_updateDraggingItemsForDrag(
        &self,
        table_view: &NSTableView,
        dragging_info: &ProtocolObject<dyn NSDraggingInfo>,
    )
       where Self: Sized + Message { ... }
    fn tableView_writeRowsWithIndexes_toPasteboard(
        &self,
        table_view: &NSTableView,
        row_indexes: &NSIndexSet,
        pboard: &NSPasteboard,
    ) -> bool
       where Self: Sized + Message { ... }
    fn tableView_validateDrop_proposedRow_proposedDropOperation(
        &self,
        table_view: &NSTableView,
        info: &ProtocolObject<dyn NSDraggingInfo>,
        row: NSInteger,
        drop_operation: NSTableViewDropOperation,
    ) -> NSDragOperation
       where Self: Sized + Message { ... }
    fn tableView_acceptDrop_row_dropOperation(
        &self,
        table_view: &NSTableView,
        info: &ProtocolObject<dyn NSDraggingInfo>,
        row: NSInteger,
        drop_operation: NSTableViewDropOperation,
    ) -> bool
       where Self: Sized + Message { ... }
    fn tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes(
        &self,
        table_view: &NSTableView,
        drop_destination: &NSURL,
        index_set: &NSIndexSet,
    ) -> Retained<NSArray<NSString>>
       where Self: Sized + Message { ... }
}
Available on crate feature NSTableView only.
Expand description

Provided Methods§

Source

fn numberOfRowsInTableView(&self, table_view: &NSTableView) -> NSInteger
where Self: Sized + Message,

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

fn tableView_objectValueForTableColumn_row( &self, table_view: &NSTableView, table_column: Option<&NSTableColumn>, row: NSInteger, ) -> Option<Retained<AnyObject>>
where Self: Sized + Message,

Available on crate features NSControl and NSResponder and NSTableColumn and NSView only.
Source

unsafe fn tableView_setObjectValue_forTableColumn_row( &self, table_view: &NSTableView, object: Option<&AnyObject>, table_column: Option<&NSTableColumn>, row: NSInteger, )
where Self: Sized + Message,

Available on crate features NSControl and NSResponder and NSTableColumn and NSView only.
§Safety

object should be of the correct type.

Source

fn tableView_sortDescriptorsDidChange( &self, table_view: &NSTableView, old_descriptors: &NSArray<NSSortDescriptor>, )
where Self: Sized + Message,

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

fn tableView_pasteboardWriterForRow( &self, table_view: &NSTableView, row: NSInteger, ) -> Option<Retained<ProtocolObject<dyn NSPasteboardWriting>>>
where Self: Sized + Message,

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

fn tableView_draggingSession_willBeginAtPoint_forRowIndexes( &self, table_view: &NSTableView, session: &NSDraggingSession, screen_point: NSPoint, row_indexes: &NSIndexSet, )
where Self: Sized + Message,

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

fn tableView_draggingSession_endedAtPoint_operation( &self, table_view: &NSTableView, session: &NSDraggingSession, screen_point: NSPoint, operation: NSDragOperation, )
where Self: Sized + Message,

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

fn tableView_updateDraggingItemsForDrag( &self, table_view: &NSTableView, dragging_info: &ProtocolObject<dyn NSDraggingInfo>, )
where Self: Sized + Message,

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

fn tableView_writeRowsWithIndexes_toPasteboard( &self, table_view: &NSTableView, row_indexes: &NSIndexSet, pboard: &NSPasteboard, ) -> bool
where Self: Sized + Message,

👎Deprecated:

Use -tableView:pasteboardWriterForRow: instead

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

fn tableView_validateDrop_proposedRow_proposedDropOperation( &self, table_view: &NSTableView, info: &ProtocolObject<dyn NSDraggingInfo>, row: NSInteger, drop_operation: NSTableViewDropOperation, ) -> NSDragOperation
where Self: Sized + Message,

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

fn tableView_acceptDrop_row_dropOperation( &self, table_view: &NSTableView, info: &ProtocolObject<dyn NSDraggingInfo>, row: NSInteger, drop_operation: NSTableViewDropOperation, ) -> bool
where Self: Sized + Message,

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

fn tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes( &self, table_view: &NSTableView, drop_destination: &NSURL, index_set: &NSIndexSet, ) -> Retained<NSArray<NSString>>
where Self: Sized + Message,

👎Deprecated:

Use NSFilePromiseReceiver objects instead

Available on crate features NSControl and NSResponder and NSView only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSTableViewDataSource

Source§

impl ProtocolType for dyn NSTableViewDataSource

Source§

const NAME: &'static str = "NSTableViewDataSource"

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> NSTableViewDataSource for ProtocolObject<T>

Implementors§

Source§

impl<SectionIdentifierType: ?Sized, ItemIdentifierType: ?Sized> NSTableViewDataSource for NSTableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType>

Available on crate feature NSTableViewDiffableDataSource only.