NSObjectIKImageBrowserDataSource

Trait NSObjectIKImageBrowserDataSource 

Source
pub unsafe trait NSObjectIKImageBrowserDataSource:
    ClassType
    + Sized
    + Sealed {
    // Provided methods
    unsafe fn numberOfItemsInImageBrowser(
        &self,
        a_browser: Option<&IKImageBrowserView>,
    ) -> NSUInteger { ... }
    unsafe fn imageBrowser_itemAtIndex(
        &self,
        a_browser: Option<&IKImageBrowserView>,
        index: NSUInteger,
    ) -> Option<Retained<AnyObject>> { ... }
    unsafe fn imageBrowser_removeItemsAtIndexes(
        &self,
        a_browser: Option<&IKImageBrowserView>,
        indexes: Option<&NSIndexSet>,
    ) { ... }
    unsafe fn imageBrowser_moveItemsAtIndexes_toIndex(
        &self,
        a_browser: Option<&IKImageBrowserView>,
        indexes: Option<&NSIndexSet>,
        destination_index: NSUInteger,
    ) -> bool { ... }
    unsafe fn imageBrowser_writeItemsAtIndexes_toPasteboard(
        &self,
        a_browser: Option<&IKImageBrowserView>,
        item_indexes: Option<&NSIndexSet>,
        pasteboard: Option<&NSPasteboard>,
    ) -> NSUInteger { ... }
    unsafe fn numberOfGroupsInImageBrowser(
        &self,
        a_browser: Option<&IKImageBrowserView>,
    ) -> NSUInteger { ... }
    unsafe fn imageBrowser_groupAtIndex(
        &self,
        a_browser: Option<&IKImageBrowserView>,
        index: NSUInteger,
    ) -> Option<Retained<NSDictionary>> { ... }
}
Available on crate features IKImageBrowserView and ImageKit only.
Expand description

Category “IKImageBrowserDataSource” on NSObject. The IKImageBrowserDataSource informal protocol declares the methods that an instance of IKImageBrowserView uses to access the contents of its data source object.

Provided Methods§

Source

unsafe fn numberOfItemsInImageBrowser( &self, a_browser: Option<&IKImageBrowserView>, ) -> NSUInteger

Returns the number of records managed for aBrowser by the data source object (required).

An instance of IKImageView uses this method to determine how many cells it should create and display.

Source

unsafe fn imageBrowser_itemAtIndex( &self, a_browser: Option<&IKImageBrowserView>, index: NSUInteger, ) -> Option<Retained<AnyObject>>

Returns an object for the record in aBrowser corresponding to index index (required).

The returned object must implement the required methods of IKImageBrowserItem .

Source

unsafe fn imageBrowser_removeItemsAtIndexes( &self, a_browser: Option<&IKImageBrowserView>, indexes: Option<&NSIndexSet>, )

Invoked by the image browser after it has been determined that a remove operation should be applied (optional)

The data source should update itself (usually by removing this indexes).

Source

unsafe fn imageBrowser_moveItemsAtIndexes_toIndex( &self, a_browser: Option<&IKImageBrowserView>, indexes: Option<&NSIndexSet>, destination_index: NSUInteger, ) -> bool

Invoked by the image browser after it has been determined that a reordering operation should be applied (optional).

The data source should update itself (usually by reordering its elements).

Source

unsafe fn imageBrowser_writeItemsAtIndexes_toPasteboard( &self, a_browser: Option<&IKImageBrowserView>, item_indexes: Option<&NSIndexSet>, pasteboard: Option<&NSPasteboard>, ) -> NSUInteger

This method is called after it has been determined that a drag should begin, but before the drag has been started. ‘itemIndexes’ contains the indexes that will be participating in the drag. Return the number of items effectively written to the pasteboard.

optional - drag and drop support

Source

unsafe fn numberOfGroupsInImageBrowser( &self, a_browser: Option<&IKImageBrowserView>, ) -> NSUInteger

Returns the number of groups

this method is optional

Source

unsafe fn imageBrowser_groupAtIndex( &self, a_browser: Option<&IKImageBrowserView>, index: NSUInteger, ) -> Option<Retained<NSDictionary>>

Returns the group at index ‘index’

A group is defined by a dictionay. Keys for this dictionary are defined below.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NSObjectIKImageBrowserDataSource for NSObject

Implementors§