ImageAndTextCell

Dockyard > Objective-C Classes > ImageAndTextCell

ImageAndTextCell

Class Description

Displays an icon next to the text, similar to Finder's list view. Because ImageAndTextCell is a subclass of NSTextFieldCell, it retains all of the text formatting abilities of its superclass. Also supports setting an alternate icon for when the cell is highlighted. This class was created by Apple as part of the DragNDropOutlineView example, although it was modified slightly by Belkadan Software for use in Dockyard Manager.

By Chuck Pisula

Methods

- alternateImage

- currentImage

- image

- setAlternateImage:

- setImage:

Method Detail

alternateImage

- (NSImage *)alternateImage

Returns the cell's alternate image. This image is displayed when the cell is highlighted (if it exists).

See also: image, currentImage, setAlternateImage:

currentImage

- (NSImage *)currentImage

Returns the image currently being displayed. If the cell is highlighted and an alternate image has been set, the image returned is the alternate image. Otherwise, it is the regular image.

See also: image, alternateImage

image

- (NSImage *)image

Returns the cell's regular image. This image is displayed when the cell is not highlighted, or always if there is no alternate image.

See also: alternateImage, currentImage, setImage:

setAlternateImage:

- (void)setAlternateImage:(NSImage *)anImage

Sets the cell's alternate image to `anImage`. If `anImage` is `nil`, clears the alternate image.

See also: alternateImage, setImage:

setImage:

- (void)setImage:(NSImage *)anImage

Sets the cell's regular image to `anImage`. If `anImage` is `nil`, clears the regular image.

See also: image, setAlternateImage:

This page was generated with DocYouMeant, a program created by Belkadan Software