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>> { ... }
}IKImageBrowserView 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§
Sourceunsafe fn numberOfItemsInImageBrowser(
&self,
a_browser: Option<&IKImageBrowserView>,
) -> NSUInteger
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.
§Safety
a_browser might not allow None.
Sourceunsafe fn imageBrowser_itemAtIndex(
&self,
a_browser: Option<&IKImageBrowserView>,
index: NSUInteger,
) -> Option<Retained<AnyObject>>
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 .
§Safety
a_browser might not allow None.
Sourceunsafe fn imageBrowser_removeItemsAtIndexes(
&self,
a_browser: Option<&IKImageBrowserView>,
indexes: Option<&NSIndexSet>,
)
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).
§Safety
a_browsermight not allowNone.indexesmight not allowNone.
Sourceunsafe fn imageBrowser_moveItemsAtIndexes_toIndex(
&self,
a_browser: Option<&IKImageBrowserView>,
indexes: Option<&NSIndexSet>,
destination_index: NSUInteger,
) -> bool
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).
§Safety
a_browsermight not allowNone.indexesmight not allowNone.
Sourceunsafe fn imageBrowser_writeItemsAtIndexes_toPasteboard(
&self,
a_browser: Option<&IKImageBrowserView>,
item_indexes: Option<&NSIndexSet>,
pasteboard: Option<&NSPasteboard>,
) -> NSUInteger
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
§Safety
a_browsermight not allowNone.item_indexesmight not allowNone.pasteboardmight not allowNone.
Sourceunsafe fn numberOfGroupsInImageBrowser(
&self,
a_browser: Option<&IKImageBrowserView>,
) -> NSUInteger
unsafe fn numberOfGroupsInImageBrowser( &self, a_browser: Option<&IKImageBrowserView>, ) -> NSUInteger
Sourceunsafe fn imageBrowser_groupAtIndex(
&self,
a_browser: Option<&IKImageBrowserView>,
index: NSUInteger,
) -> Option<Retained<NSDictionary>>
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.
§Safety
a_browser might not allow None.
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§
impl NSObjectIKImageBrowserDataSource for NSObject
ImageKit only.