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 { ... }
}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§
Sourceunsafe fn imageUID(&self) -> Option<Retained<NSString>>
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
Sourceunsafe fn imageRepresentationType(&self) -> Option<Retained<NSString>>
unsafe fn imageRepresentationType(&self) -> Option<Retained<NSString>>
Returns the representation of the image to display (required).
Keys for imageRepresentationType are defined below.
Sourceunsafe fn imageRepresentation(&self) -> Option<Retained<AnyObject>>
unsafe fn imageRepresentation(&self) -> Option<Retained<AnyObject>>
Returns the image to display (required). Can return nil if the item has no image to display.
Sourceunsafe fn imageVersion(&self) -> NSUInteger
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
Sourceunsafe fn imageTitle(&self) -> Option<Retained<NSString>>
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.
Sourceunsafe fn imageSubtitle(&self) -> Option<Retained<NSString>>
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.
Sourceunsafe fn isSelectable(&self) -> bool
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§
impl NSObjectIKImageBrowserItem for NSObject
ImageKit only.