Mac Developer Library

Developer

IKImageBrowserCell Class Reference

Options
Deployment Target:

On This Page
Language:

IKImageBrowserCell

The IKImageBrowserCell class is used to display a cell conforming to the IKImageBrowserItem Protocol protocol in an IKImageBrowserView.

  • Returns the receiver’s frame rectangle, which defines its position in its IKImageBrowserView.

    Declaration

    - (NSRect)frame

    Return Value

    The coordinates of the frame, in the IKImageBrowserView coordinate space.

    Discussion

    Subclasses should not override this method.

  • Returns the receiver’s image frame rectangle, which defines the position of the thumbnail in its IKImageBrowserView.

    Declaration

    - (NSRect)imageFrame

    Return Value

    The coordinates of the frame, in the IKImageBrowserView coordinate space.

    Discussion

    It is the developer’s responsibility to compute the imageFrame such that it lies entirely within the cell’s frame rectangle.

    Subclasses can override this method to customize the position of the thumbnail.

  • Returns the receiver’s subtitle frame rectangle.

    Declaration

    - (NSRect)subtitleFrame

    Return Value

    The coordinates of the subtitle frame, in the IKImageBrowserView coordinate space.

    Discussion

    It is the developer’s responsibility to compute the subtitleFrame such that it lies entirely within the cell’s frame rectangle.

    Subclasses can override this method to customize the position of the subtitle.

  • Returns the receiver’s title frame rectangle.

    Declaration

    - (NSRect)titleFrame

    Return Value

    The coordinates of the title frame, in the IKImageBrowserView coordinate space.

    Discussion

    It is the developer’s responsibility to compute the titleFrame such that it lies entirely within the cell’s frame rectangle.

    Subclasses can override this method to customize the position of the title.

  • Returns the receiver’s image container frame rectangle, which defines the position of the container of the thumbnail.

    Declaration

    - (NSRect)imageContainerFrame

    Return Value

    The coordinates of image container frame, in the IKImageBrowserView coordinate space.

    Discussion

    The image frame is computed automatically from the image container frame by taking in account the image alignment and the image aspect ratio.

    Subclasses can override this method to customize the position of the thumbnail container.

  • Returns the index of the receiver’s represented object in the datasource.

    Declaration

    - (NSUInteger)indexOfRepresentedItem

    Return Value

    The index of the represented object in the datasource.

    Discussion

    Subclasses should not override this method.

  • Returns the receiver’s represented object.

    Declaration

    - (id)representedItem

    Return Value

    The item represented by the cell.

    Discussion

    Subclasses should not override this method.

  • Returns whether the cell is selected.

    Declaration

    - (BOOL)isSelected

    Return Value

    YEStrue if the cell is selected, otherwise NOfalse.

    Discussion

    Subclasses should not override this method.

  • Returns the receiver’s selection frame rectangle, which defines the position of the selection rectangle in its IKImageBrowserView.

    Declaration

    - (NSRect)selectionFrame

    Return Value

    The cells selection frame, in the IKImageBrowserView coordinate space.

    Discussion

    Subclasses can override this method to customize the position of the selection frame.

  • Returns the position of the cell’s image in the frame.

    Declaration

    - (NSImageAlignment)imageAlignment

    Return Value

    The alignment of the image. See NSImageAlignment for possible values.

    Discussion

    Subclasses can override this method to customize the image alignment.

    The image frame will be computed automatically from the image container frame by taking in account the image alignment and the image aspect ratio.

  • Returns the opacity of the receiver.

    Declaration

    - (CGFloat)opacity

    Return Value

    The cell’s opacity.

    Discussion

    Possible values are between 0.0 (transparent) and 1.0 (opaque).

    Subclasses can override this method to customize the opacity of the cell.

  • Returns a layer for the specified position.

    Declaration

    - (CALayer *)layerForType:(NSString *)type

    Parameters

    type

    A string representing the layer location. See Cell Layer Positions for possible values.

    Return Value

    The CALayer to display in the specified position.

    Discussion

    Subclasses can override this method to add a Core Animation layer to the cell

  • Returns the view the receiver uses to display the cell.

    Declaration

    - (IKImageBrowserView *)imageBrowserView

    Return Value

    The browser view containing the cell.

    Discussion

    Subclasses should not override this method.

  • The possible states for the browser cell. These values are used by the cellState method.

    Declaration

    typedef enum{ IKImageStateNoImage =0, IKImageStateInvalid, IKImageStateReady, } IKImageBrowserCellState;

    Constants

    • IKImageStateNoImage

      Returned until a thumbnail has been created from the represented object.

    • IKImageStateInvalid

      The thumbnail is invalid. For example, an unsupported image is provided.

    • IKImageStateReady

      The receiver’s represented object has been set and the cell is ready to display.

  • Optional positioning of additional layers displayed with the cell. Used by the layerForType: method.

    Declaration

    NSString *const IKImageBrowserCellBackgroundLayer; NSString *const IKImageBrowserCellForegroundLayer; NSString *const IKImageBrowserCellSelectionLayer; NSString *const IKImageBrowserCellPlaceHolderLayer;

    Constants

    • IKImageBrowserCellBackgroundLayer

      Layer displayed in the background.

    • IKImageBrowserCellForegroundLayer

      Layer displayed in the foreground.

    • IKImageBrowserCellSelectionLayer

      Layer displayed as the selection.

    • IKImageBrowserCellPlaceHolderLayer

      Layer displayed as a placeholder when an image is not yet available.