NSBrowser

NSBrowser Mac OS X 10.0

This NSControl subclass represents an interface widget that displays hierarchical data in a series of columns, much like a Column View in the Finder. If the data is not hierarchical, then NSBrowser displays the data as a list. Data is provided to a browser by its delegate object.

figs/cocn_1509.gif

@interface NSBrowser : NSControl
 // Accessor Methods
   - (void)setTitle:(NSString *)aString ofColumn:(int)column;
   - (void)setDoubleAction:(SEL)aSelector;
   - (SEL)doubleAction;
   - (void)setMatrixClass:(Class)factoryId;
   - (Class)matrixClass;
   - (void)setPathSeparator:(NSString *)newString;
   - (NSString *)pathSeparator;
   - (void)setCellClass:(Class)factoryId;
   - (void)setCellPrototype:(NSCell *)aCell;
   - (id)cellPrototype;
   - (void)setDelegate:(id)anObject;
   - (id)delegate;
   - (void)setReusesColumns:(BOOL)flag;
   - (BOOL)reusesColumns;
   - (void)setHasHorizontalScroller:(BOOL)flag;
   - (BOOL)hasHorizontalScroller;
   - (void)setSeparatesColumns:(BOOL)flag;
   - (BOOL)separatesColumns;
   - (void)setTitled:(BOOL)flag;
   - (void)setMinColumnWidth:(float)columnWidth;
   - (float)minColumnWidth;
   - (void)setMaxVisibleColumns:(int)columnCount;
   - (int)maxVisibleColumns;
   - (void)setSendsActionOnArrowKeys:(BOOL)flag;
   - (BOOL)sendsActionOnArrowKeys;
   - (void)setAllowsMultipleSelection:(BOOL)flag;
   - (BOOL)allowsMultipleSelection;
   - (void)setAllowsBranchSelection:(BOOL)flag;
   - (BOOL)allowsBranchSelection;
   - (void)setAllowsEmptySelection:(BOOL)flag;
   - (BOOL)allowsEmptySelection;
   - (void)setTakesTitleFromPreviousColumn:(BOOL)flag;
   - (BOOL)takesTitleFromPreviousColumn;
   - (void)setAcceptsArrowKeys:(BOOL)flag;
   - (BOOL)acceptsArrowKeys;
   - (BOOL)setPath:(NSString *)path;
   - (NSString *)path;
   - (void)setLastColumn:(int)column;
   - (int)lastColumn;
 // Class Methods
   + (Class)cellClass;
 // Instance Methods
   - (NSRect)frameOfColumn:(int)column;
   - (void)doDoubleClick:(id)sender;
   - (void)doClick:(id)sender;
   - (void)displayColumn:(int)column;
   - (void)addColumn;
   - (void)displayAllColumns;
   - (int)columnOfMatrix:(NSMatrix *)matrix;
   - (void)drawTitleOfColumn:(int)column inRect:(NSRect)aRect;
   - (int)firstVisibleColumn;
   - (NSRect)frameOfInsideOfColumn:(int)column;
   - (BOOL)isLoaded;
   - (BOOL)isTitled;
   - (int)lastVisibleColumn;
   - (void)loadColumnZero;
   - (id)loadedCellAtRow:(int)row column:(int)col;
   - (NSMatrix *)matrixInColumn:(int)column;
   - (int)numberOfVisibleColumns;
   - (NSString *)pathToColumn:(int)column;
   - (void)reloadColumn:(int)column;
   - (void)scrollColumnToVisible:(int)column;
   - (void)scrollColumnsLeftBy:(int)shiftAmount;
   - (void)scrollColumnsRightBy:(int)shiftAmount;
   - (void)scrollViaScroller:(NSScroller *)sender;
   - (void)selectAll:(id)sender;
   - (void)selectRow:(int)row inColumn:(int)column;
   - (id)selectedCell;
   - (id)selectedCellInColumn:(int)column;
   - (NSArray *)selectedCells;
   - (int)selectedColumn;
   - (int)selectedRowInColumn:(int)column;
   - (BOOL)sendAction;
   - (void)tile;
   - (NSRect)titleFrameOfColumn:(int)column;
   - (float)titleHeight;
   - (NSString *)titleOfColumn:(int)column;
   - (void)updateScroller;
   - (void)validateVisibleColumns;
// Methods Implemented by the Delegate
   - (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column inMatrix:(NSMatrix *)matrix;
   - (BOOL)browser:(NSBrowser *)sender  isColumnValid:(int)column;
   - (int)browser:(NSBrowser *)sender numberOfRowsInColumn:(int)column;
   - (BOOL)browser:(NSBrowser *)sender selectCellWithString:(NSString *)title inColumn:(int)column;
   - (BOOL)browser:(NSBrowser *)sender selectRow:(int)row inColumn:(int)column;
   - (NSString *)browser:(NSBrowser *)sender titleOfColumn:(int)column;
   - (void)browser:(NSBrowser *)sender willDisplayCell:(id)cell atRow:(int)row column:(int)column;
   - (void)browserDidScroll:(NSBrowser *)sender;
   - (void)browserWillScroll:(NSBrowser *)sender;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes