NSObjectIKImageBrowserItem

Trait NSObjectIKImageBrowserItem 

Source
pub unsafe trait NSObjectIKImageBrowserItem:
    ClassType
    + Sized
    + Sealed {
    // Provided methods
    unsafe fn imageUID(&self) -> Option<Retained<NSString>> { ... }
    unsafe fn imageRepresentationType(&self) -> Option<Retained<NSString>> { ... }
    unsafe fn imageRepresentation(&self) -> Option<Retained<AnyObject>> { ... }
    unsafe fn imageVersion(&self) -> NSUInteger { ... }
    unsafe fn imageTitle(&self) -> Option<Retained<NSString>> { ... }
    unsafe fn imageSubtitle(&self) -> Option<Retained<NSString>> { ... }
    unsafe fn isSelectable(&self) -> bool { ... }
}
Available on crate feature IKImageBrowserView only.
Expand description

Category “IKImageBrowserItem” on NSObject.

The IKImageBrowserItem informal protocol declares the methods that an instance of IKImageBrowserView uses to access the contents of its data source for a given item.

Some of the methods in this protocol, such as image are called very frequently, so they must be efficient.

Provided Methods§

Source

unsafe fn imageUID(&self) -> Option<Retained<NSString>>

Returns a unique string that identify this data source item (required).

The image browser uses this identifier to keep the correspondance between its cache and the data source item

Source

unsafe fn imageRepresentationType(&self) -> Option<Retained<NSString>>

Returns the representation of the image to display (required).

Keys for imageRepresentationType are defined below.

Source

unsafe fn imageRepresentation(&self) -> Option<Retained<AnyObject>>

Returns the image to display (required). Can return nil if the item has no image to display.

Source

unsafe fn imageVersion(&self) -> NSUInteger

Returns a version of this item. The receiver can return a new version to let the image browser knows that it shouldn’t use its cache for this item

Source

unsafe fn imageTitle(&self) -> Option<Retained<NSString>>

Returns the title to display as a NSString. Use setValue:forKey: with IKImageBrowserCellsTitleAttributesKey on the IKImageBrowserView instance to set text attributes.

Source

unsafe fn imageSubtitle(&self) -> Option<Retained<NSString>>

Returns the subtitle to display as a NSString. Use setValue:forKey: with IKImageBrowserCellsSubtitleAttributesKey on the IKImageBrowserView instance to set text attributes.

Source

unsafe fn isSelectable(&self) -> bool

Returns whether this item is selectable.

The receiver can implement this methods to forbid selection of this item by returning NO.

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 NSObjectIKImageBrowserItem for NSObject

Available on crate feature ImageKit only.

Implementors§