Mac Developer Library

Developer

AppKit Framework Reference NSBrowserCell Class Reference

Options
Deployment Target:

On This Page
Language:

NSBrowserCell

The NSBrowserCell class is the subclass of NSCell used by default to display data in the columns of an NSBrowser object. (Each column contains an NSMatrix filled with NSBrowserCell objects.)

The NSBrowserCell class implements the user interface of NSBrowser.

  • Returns the default image for branch cells in a browser.

    Declaration

    Swift

    class func branchImage() -> NSImage?

    Objective-C

    + (NSImage *)branchImage

    Return Value

    The default image used for branch NSBrowserCell objects. The default image is a right-pointing triangle.

    Discussion

    Override this method if you want a different image. To have a branch NSBrowserCell with no image (and no space reserved for an image), override this method to return nil.

    Availability

    Available in OS X v10.0 and later.

  • Returns the default image for branch browser cells that are highlighted.

    Declaration

    Swift

    class func highlightedBranchImage() -> NSImage?

    Objective-C

    + (NSImage *)highlightedBranchImage

    Return Value

    The default image used for branch NSBrowserCell objects that are highlighted. This is a lighter version of the image returned by branchImage.

    Discussion

    Override this method if you want a different image.

    Availability

    Available in OS X v10.0 and later.

  • The browser cell’s image.

    Declaration

    Swift

    var image: NSImage?

    Objective-C

    @property(strong) NSImage *image

    Discussion

    The image is drawn vertically centered on the left edge of the browser cell.

    Note that the image is drawn at the given size of the image. NSBrowserCell does not set the size of the image, nor does it clip the drawing of the image. Make sure this image is the correct size for drawing in the browser cell.

    When the value of this property is nil, it removes the image for the browser cell.

    Availability

    Available in OS X v10.2 and later.

  • The browser cell’s image for the highlighted state.

    Declaration

    Swift

    var alternateImage: NSImage?

    Objective-C

    @property(strong) NSImage *alternateImage

    Discussion

    The image is drawn vertically centered on the left edge of the browser cell.

    Note that the image is drawn at the given size of the image. NSBrowserCell does not set the size of the image, nor does it clip the drawing of the image. Make sure this image is the correct size for drawing in the browser cell.

    When the value of this property is nil, it removes the alternate image for the browser cell.

    Availability

    Available in OS X v10.0 and later.

  • Unhighlights the receiver and unsets its state.

    Declaration

    Swift

    func reset()

    Objective-C

    - (void)reset

    Availability

    Available in OS X v10.0 and later.

    See Also

    – set

  • Highlights the receiver and sets its state.

    Declaration

    Swift

    func set()

    Objective-C

    - (void)set

    Availability

    Available in OS X v10.0 and later.

    See Also

    – reset

  • A Boolean that indicates whether the browser cell is a leaf or a branch cell.

    Declaration

    Swift

    var leaf: Bool

    Objective-C

    @property(getter=isLeaf) BOOL leaf

    Discussion

    When the value of this property is YEStrue, the browser cell is a leaf cell.

    A branch NSBrowserCell has an image near its right edge indicating that more, hierarchically related information is available; when the user selects the cell, the NSBrowser displays a new column of NSBrowserCell objects. A leaf NSBrowserCell has no image, indicating that the user has reached a terminal piece of information; it doesn’t point to additional information.

    Availability

    Available in OS X v10.0 and later.

  • A Boolean that indicates whether the cell is ready to display.

    Declaration

    Swift

    var loaded: Bool

    Objective-C

    @property(getter=isLoaded) BOOL loaded

    Discussion

    When the value of this property is YEStrue, the browser cell’s state has been set and the cell is ready to display.

    Availability

    Available in OS X v10.0 and later.

  • Returns the highlight color that the receiver wants to display.

    Declaration

    Swift

    func highlightColorInView(_ controlView: NSView) -> NSColor?

    Objective-C

    - (NSColor *)highlightColorInView:(NSView *)controlView

    Parameters

    controlView

    The view for which to return the highlight color.

    Return Value

    The highlight color.

    Availability

    Available in OS X v10.0 and later.