Inherits from: NSCell : NSObject
Conforms to: NSCoding
NSCopying (NSCell)
NSObject (NSObject)
Declared in: AppKit/NSBrowserCell.h
NSBrowserCell is the subclass of NSCell used by default to display data in the columns of an NSBrowser. (Each column contains an NSMatrix filled with NSBrowserCells.) An NSBrowserCell can be a leaf or branch cell. A branch cell displays an image indicating that, when the cell is clicked, the NSBrowser will display a new column of NSBrowserCells; branch cells are thus important to the display of hierarchical information typical of NSBrowsers. An NSBrowserCell can also be loaded or unloaded; loaded NSBrowserCells have their state set and are ready for display.
Many of NSBrowserCell's methods are designed to interact with NSBrowser and NSBrowser's delegate. The delegate implements methods for loading the NSCells in NSBrowser by setting their values and status. If your code needs access to a specific NSBrowserCell, you can use the NSBrowser method loadedCellAtRow:column:.
Because NSBrowserCells do not inherit from NSActionCell, they don't hold target and action values and thus don't participate in the target/action paradigm of the Application Kit. However, NSBrowser does allow you to specify a target and an action, and you can obtain the last selected NSBrowserCell by sending selectedCell to an NSBrowser.
You may find it useful to create a subclass of NSBrowserCell to alter its behavior and to enable it to work with and display the type of data you wish to represent. Use NSBrowser's setCellClass: or setCellPrototype: methods to have it use your subclass.
See the NSBrowser class specification for more details. In particular, the class description and the "Methods Implemented by the Delegate" section describe how the NSBrowser's delegate interacts with both NSBrowser and NSBrowserCells.
- Accessing graphic images
- + branchImage
- + highlightedBranchImage
- - alternateImage
- - setAlternateImage:
- Setting state
- - reset
- - set
- Determining cell attributes
- - isLeaf
- - setLeaf:
- - isLoaded
- - setLoaded:
+ (NSImage *)branchImage
nil
.See Also: + highlightedBranchImage, - alternateImage, - setAlternateImage:
+ (NSImage *)highlightedBranchImage
See Also: + branchImage, - alternateImage, - setAlternateImage:
- (NSImage *)alternateImage
nil
if
no image is set.See Also: - setAlternateImage:
- (BOOL)isLeaf
See Also: - setLeaf:
- (BOOL)isLoaded
YES
if
all the NSBrowserCell's state has been set and the cell is ready to
display.See Also: - setLoaded:
- (void)reset
NO
).See Also: - set
- (void)set
YES
).See Also: - reset
- (void)setAlternateImage:(NSImage
*)newAltImage
nil
,
it removes the alternate image for the NSBrowserCell.See Also: - alternateImage
- (void)setLeaf:(BOOL)flag
See Also: - isLeaf
- (void)setLoaded:(BOOL)flag
YES
)
and the cell is ready to display.See Also: - isLoaded