- Inherits from:
- NSCell : NSObject
- Conforms to:
- NSCoding
- (NSCell)
- 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" (page 178) 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
See Also: + highlightedBranchImage, - alternateImage, - setAlternateImage:
+ (NSImage *)highlightedBranchImage
See Also: + branchImage, - alternateImage, - setAlternateImage:
- (NSImage *)alternateImage
See Also: - setAlternateImage:
- (BOOL)isLeaf
See Also: - setLeaf:
- (BOOL)isLoaded
See Also: - setLoaded:
- (void)reset
See Also: - set
- (void)set
See Also: - reset
- (void)setAlternateImage:(NSImage
*)newAltImage
See Also: - alternateImage
- (void)setLeaf:(BOOL)flag
See Also: - isLeaf
- (void)setLoaded:(BOOL)flag
See Also: - isLoaded