Mac Developer Library

Developer

Quartz Framework Reference IKImageBrowserItem Protocol Reference

Options
Deployment Target:

On This Page
Language:

IKImageBrowserItem

The IKImageBrowserItem informal protocol declares the methods that an instance of the IKImageBrowserView class uses to access the contents of its data source for a given item. Some of the methods in this protocol are needed frequently, so you should implement them efficiently.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


import Quartz @import Quartz;

Availability


Available in OS X v10.5 and later.
  • Returns a unique string that identifies the data source item.

    Declaration

    Swift

    func imageUID() -> String!

    Objective-C

    - (NSString *)imageUID

    Return Value

    The string that identifies the data source item

    Discussion

    Your data source must implement this method. The image browser view uses this identifier to associate the data source item and its cache.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the representation type of the image to display.

    Declaration

    Swift

    func imageRepresentationType() -> String!

    Objective-C

    - (NSString *)imageRepresentationType

    Return Value

    A string that specifies the image representation type. The string can be any of the constants defined in “Image Representation Types”.

    Discussion

    Your data source must implement this method.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the image to display.

    Declaration

    Swift

    func imageRepresentation() -> AnyObject!

    Objective-C

    - (id)imageRepresentation

    Return Value

    The image to display; can return nil if the item has no image to display.

    Discussion

    Your data source must implement this method. This method is called frequently, so the receiver should cache the returned instance.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the version of the item.

    Declaration

    Swift

    func imageVersion() -> Int

    Objective-C

    - (NSUInteger)imageVersion

    Return Value

    The version of the item.

    Discussion

    This method is optional. The receiver can return a new version to let the image browser know that it should not use its cache for the item.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the display title of the image.

    Declaration

    Swift

    func imageTitle() -> String!

    Objective-C

    - (NSString *)imageTitle

    Return Value

    The display title of the image.

    Discussion

    This method is optional.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the display subtitle of the image.

    Declaration

    Swift

    func imageSubtitle() -> String!

    Objective-C

    - (NSString *)imageSubtitle

    Return Value

    The display subtitle of the image.

    Discussion

    This method is optional.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns whether this item is selectable.

    Declaration

    Swift

    func isSelectable() -> Bool

    Objective-C

    - (BOOL)isSelectable

    Return Value

    YEStrue if the item is selectable; NOfalse otherwise.

    Discussion

    This method is optional. You can prevent selection of this item by returning NOfalse.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Representation types for images.

    Declaration

    Swift

    let IKImageBrowserPathRepresentationType: NSString! let IKImageBrowserNSURLRepresentationType: NSString! let IKImageBrowserNSImageRepresentationType: NSString! let IKImageBrowserCGImageRepresentationType: NSString! let IKImageBrowserCGImageSourceRepresentationType: NSString! let IKImageBrowserNSDataRepresentationType: NSString! let IKImageBrowserNSBitmapImageRepresentationType: NSString! let IKImageBrowserQTMovieRepresentationType: NSString! let IKImageBrowserQTMoviePathRepresentationType: NSString! let IKImageBrowserQCCompositionRepresentationType: NSString! let IKImageBrowserQCCompositionPathRepresentationType: NSString! let IKImageBrowserQuickLookPathRepresentationType: NSString! let IKImageBrowserIconRefPathRepresentationType: NSString! let IKImageBrowserIconRefRepresentationType: NSString! let IKImageBrowserPDFPageRepresentationType: NSString!

    Objective-C

    NSString * const IKImageBrowserPathRepresentationType; NSString * const IKImageBrowserNSURLRepresentationType; NSString * const IKImageBrowserNSImageRepresentationType; NSString * const IKImageBrowserCGImageRepresentationType; NSString * const IKImageBrowserCGImageSourceRepresentationType; NSString * const IKImageBrowserNSDataRepresentationType; NSString * const IKImageBrowserNSBitmapImageRepresentationType; NSString * const IKImageBrowserQTMovieRepresentationType; NSString * const IKImageBrowserQTMoviePathRepresentationType; NSString * const IKImageBrowserQCCompositionRepresentationType; NSString * const IKImageBrowserQCCompositionPathRepresentationType; NSString * const IKImageBrowserQuickLookPathRepresentationType; NSString * const IKImageBrowserIconRefPathRepresentationType; NSString * const IKImageBrowserIconRefRepresentationType; NSString * const IKImageBrowserPDFPageRepresentationType;

    Constants

    • IKImageBrowserPathRepresentationType

      IKImageBrowserPathRepresentationType

      A path representation (NSString).

      Available in OS X v10.5 and later.

    • IKImageBrowserNSURLRepresentationType

      IKImageBrowserNSURLRepresentationType

      An NSURLobject.

      Available in OS X v10.5 and later.

    • IKImageBrowserNSImageRepresentationType

      IKImageBrowserNSImageRepresentationType

      An NSImage object.

      Available in OS X v10.5 and later.

    • IKImageBrowserCGImageRepresentationType

      IKImageBrowserCGImageRepresentationType

      A CGImageRef object.

      Available in OS X v10.5 and later.

    • IKImageBrowserCGImageSourceRepresentationType

      IKImageBrowserCGImageSourceRepresentationType

      A CGImageSourceRef object.

      Available in OS X v10.5 and later.

    • IKImageBrowserNSDataRepresentationType

      IKImageBrowserNSDataRepresentationType

      An NSData object.

      Available in OS X v10.5 and later.

    • IKImageBrowserNSBitmapImageRepresentationType

      IKImageBrowserNSBitmapImageRepresentationType

      An NSBitmapImageRep object.

      Available in OS X v10.5 and later.

    • IKImageBrowserQTMovieRepresentationType

      IKImageBrowserQTMovieRepresentationType

      A QTMovie object.

      Available in OS X v10.5 and later.

    • IKImageBrowserQTMoviePathRepresentationType

      IKImageBrowserQTMoviePathRepresentationType

      A path (NSString) or URL (NSURL) to a QuickTime movie.

      Available in OS X v10.5 and later.

    • IKImageBrowserQCCompositionRepresentationType

      IKImageBrowserQCCompositionRepresentationType

      A QCComposition object.

      Available in OS X v10.5 and later.

    • IKImageBrowserQCCompositionPathRepresentationType

      IKImageBrowserQCCompositionPathRepresentationType

      A path (NSString) or URL (NSURL) to a Quartz Composer composition.

      Available in OS X v10.5 and later.

    • IKImageBrowserQuickLookPathRepresentationType

      IKImageBrowserQuickLookPathRepresentationType

      A path (NSString) or URL (NSURL) to load data using QuickLook.

      Available in OS X v10.5 and later.

    • IKImageBrowserIconRefPathRepresentationType

      IKImageBrowserIconRefPathRepresentationType

      A path to an icon.

      Available in OS X v10.5 and later.

    • IKImageBrowserIconRefRepresentationType

      IKImageBrowserIconRefRepresentationType

      An icon.

      Available in OS X v10.5 and later.

    • IKImageBrowserPDFPageRepresentationType

      IKImageBrowserPDFPageRepresentationType

      A PDFPage instance or a CGPDFPageRef.

      Available in OS X v10.6 and later.

    Import Statement