Inherits from | |
Conforms to | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.0 and later. |
Companion guide | |
Declared in | NSBrowserCell.h |
Related sample code |
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.
+ (NSImage *)branchImage
The default image used for branch NSBrowserCell
objects. The default image is a right-pointing triangle.
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
.
NSBrowserCell.h
Returns the default image for branch browser cells that are highlighted.
+ (NSImage *)highlightedBranchImage
The default image used for branch NSBrowserCell
objects that are highlighted. This is a lighter version of the image returned by branchImage
.
Override this method if you want a different image.
NSBrowserCell.h
Returns the receiver’s image for the highlighted state.
- (NSImage *)alternateImage
The image used for the browser cell in its highlighted state or nil
if no image is set.
NSBrowserCell.h
Returns the highlight color that the receiver wants to display.
- (NSColor *)highlightColorInView:(NSView *)controlView
The view for which to return the highlight color.
The highlight color.
NSBrowserCell.h
Returns the receiver’s image.
- (NSImage *)image
The image of the receiver or nil
if no image is set.
NSBrowserCell.h
Returns whether the receiver is a leaf or a branch cell.
- (BOOL)isLeaf
YES
if the receiver is a leaf cell; otherwise NO
.
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.
NSBrowserCell.h
Returns a Boolean value indicating whether the cell is ready to display.
- (BOOL)isLoaded
YES
if the receiver’s state has been set and the cell is ready to display; otherwise NO
.
NSBrowserCell.h
Unhighlights the receiver and unsets its state.
- (void)reset
NSBrowserCell.h
Highlights the receiver and sets its state.
- (void)set
NSBrowserCell.h
Sets the receiver’s image for the highlighted state, retaining the image.
- (void)setAlternateImage:(NSImage *)newAltImage
The new image for the browser cell in its highlighted state. If newAltImage is nil
, it removes the alternate image for the receiver. newAltImage is drawn vertically centered on the left edge of the browser cell.
Note that newAltImage 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 newAltImage is the correct size for drawing in the browser cell.
NSBrowserCell.h
Sets the receiver’s image, retaining the image.
- (void)setImage:(NSImage *)newImage
The new image. If newImage is nil
, it removes the image for the receiver. newImage is drawn vertically centered on the left edge of the browser cell.
Note that newImage 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 newImage is the correct size for drawing in the browser cell.
NSBrowserCell.h
Sets whether the receiver is a leaf or a branch cell.
- (void)setLeaf:(BOOL)flag
YES
if the receiver is a leaf cell; otherwise NO
.
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.
NSBrowserCell.h
Sets whether the receiver’s state has been set and the cell is ready to display.
- (void)setLoaded:(BOOL)flag
YES
if the receiver’s state has been set and the cell is ready to display; otherwise NO
.
NSBrowserCell.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-01)