Up
Authors
- Scott Christley (
scottc@net-community.com
)
-
- Felipe A. Rodriguez (
far@ix.netcom.com
)
-
- Franck Wolff (
wolff@cybercable.fr
)
-
- Mirko Viviani (
mirko.viviani@rccr.cremona.it
)
-
- Fred Kiefer (
FredKiefer@gmx.de
)
-
Control to display and select from hierarchal lists
Copyright: (C) 1996, 1997, 2002 Free Software Foundation, Inc.
- Declared in:
- AppKit/NSBrowser.h
- Conforms to:
- NSCoding
Availability: OpenStep
Description forthcoming.
Instance Variables
Method summary
+ (Class)
cellClass;
Availability: OpenStep
Returns the NSBrowserCell class (regardless of
whether a
-setCellClass:
message has been sent to a particular instance).
This method is not meant to be used by applications.
See Also:
-setCellClass:
+ (void)
removeSavedColumnsWithAutosaveName: (
NSString*)name;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (BOOL)
acceptsArrowKeys;
Availability: OpenStep
- (void)
addColumn;
Availability: OpenStep
Adds a column to the right of the last column,
adjusts subviews and scrolls to make the new
column visible if needed.
- (BOOL)
allowsBranchSelection;
Availability: OpenStep
Returns whether the user can select branch items
when multiple selection is enabled. By default
YES
.
See Also:
-setAllowsBranchSelection:
- (BOOL)
allowsEmptySelection;
Availability: OpenStep
- (BOOL)
allowsMultipleSelection;
Availability: OpenStep
- (id)
cellPrototype;
Availability: OpenStep
- (float)
columnContentWidthForColumnWidth: (float)columnWidth;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (int)
columnOfMatrix: (
NSMatrix*)matrix;
Availability: OpenStep
Returns the column number in which
matrix is located. Returns -1 if
matrix is not found.
- (float)
columnWidthForColumnContentWidth: (float)columnContentWidth;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (
NSString*)
columnsAutosaveName;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (id)
delegate;
Availability: OpenStep
- (void)
displayAllColumns;
Availability: OpenStep
- (void)
displayColumn: (int)column;
Availability: OpenStep
Updates the NSBrowser to display the
column with the given index.
- (void)
doClick: (id)sender;
Availability: OpenStep
Responds to (single) mouse clicks in a column of
the NSBrowser.
See Also:
-doDoubleClick:
- (void)
doDoubleClick: (id)sender;
Availability: OpenStep
- (SEL)
doubleAction;
Availability: OpenStep
- (void)
drawTitle: (
NSString*)title
inRect: (
NSRect)aRect
ofColumn: (int)column;
Availability: OpenStep
Draws the title for the column
at index column within the rectangle defined
by aRect.
- (void)
drawTitleOfColumn: (int)column
inRect: (
NSRect)aRect;
Availability: MacOS-X 10.0.0
Description forthcoming.
- (int)
firstVisibleColumn;
Availability: OpenStep
Returns the index of the first visible column.
- (
NSRect)
frameOfColumn: (int)column;
Availability: OpenStep
Returns the rectangle containing the
column at index column.
- (
NSRect)
frameOfInsideOfColumn: (int)column;
Availability: OpenStep
Returns the rectangle containing the
column at index column,
- (BOOL)
hasHorizontalScroller;
Availability: OpenStep
Returns whether an NSScroller is used to scroll
horizontally. By default a NSBrowser has a
horizontal scroller.
See Also:
-setHasHorizontalScroller:
- (BOOL)
isLoaded;
Availability: OpenStep
Returns whether column zero is loaded.
- (BOOL)
isTitled;
Availability: OpenStep
Returns whether columns display titles. By
default a NSBrowser displays titles.
See Also:
-setTitled:
- (int)
lastColumn;
Availability: OpenStep
- (int)
lastVisibleColumn;
Availability: OpenStep
Returns the index of the last visible column.
- (void)
loadColumnZero;
Availability: OpenStep
Loads column zero; unloads previously loaded columns.
- (id)
loadedCellAtRow: (int)row
column: (int)column;
Availability: OpenStep
Loads if necessary and returns the NSCell at
row in column. if you change
this code, you may want to look at the _loadColumn
method in which the following code is integrated
(for speed)
- (Class)
matrixClass;
Availability: OpenStep
Returns the class of NSMatrix used in the
NSBrowser's columns.
See Also:
-setMatrixClass:
- (
NSMatrix*)
matrixInColumn: (int)column;
Availability: OpenStep
Returns the matrix located in the
column identified by index
column. Returns nil
if the
matrix does not exists
- (int)
maxVisibleColumns;
Availability: OpenStep
Returns the maximum number of visible columns. By
default a NSBrowser has 3 visible columns.
See Also:
-setMaxVisibleColumns:
- (int)
minColumnWidth;
Availability: OpenStep
- (int)
numberOfVisibleColumns;
Availability: OpenStep
- (
NSString*)
path;
Availability: OpenStep
- (
NSString*)
pathSeparator;
Availability: OpenStep
- (
NSString*)
pathToColumn: (int)column;
Availability: OpenStep
Returns a string representing the path from the
first column up to, but not including,
the column at index column.
See Also: -path
- (BOOL)
prefersAllColumnUserResizing;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (void)
reloadColumn: (int)column;
Availability: OpenStep
Reloads column if it is loaded; sets it
as the last column. Reselects previously
selected cells, if they remain.
- (BOOL)
reusesColumns;
Availability: OpenStep
- (void)
scrollColumnToVisible: (int)column;
Availability: OpenStep
- (void)
scrollColumnsLeftBy: (int)shiftAmount;
Availability: OpenStep
- (void)
scrollColumnsRightBy: (int)shiftAmount;
Availability: OpenStep
- (void)
scrollViaScroller: (
NSScroller*)sender;
Availability: OpenStep
Scrolls columns left or right based on an
NSScroller.
- (void)
selectAll: (id)sender;
Availability: OpenStep
- (void)
selectRow: (int)row
inColumn: (int)column;
Availability: OpenStep
- (id)
selectedCell;
Availability: OpenStep
- (id)
selectedCellInColumn: (int)column;
Availability: OpenStep
- (
NSArray*)
selectedCells;
Availability: OpenStep
- (int)
selectedColumn;
Availability: OpenStep
Returns the index of the last column with a
selected item.
- (int)
selectedRowInColumn: (int)column;
Availability: OpenStep
- (BOOL)
sendAction;
Availability: OpenStep
Sends the action message to the target. Returns
YES
upon success, NO
if no
target for the message could be found.
- (BOOL)
sendsActionOnArrowKeys;
Availability: OpenStep
- (BOOL)
separatesColumns;
Availability: OpenStep
Returns whether columns are separated by bezeled
borders. By default a NSBrowser has separate
columns.
See Also:
-setSeparatesColumns:
- (void)
setAcceptsArrowKeys: (BOOL)flag;
Availability: OpenStep
Enables or disables the arrow keys as used for
navigating within and between browsers. By
default YES
.
See Also:
-acceptsArrowKeys
- (void)
setAllowsBranchSelection: (BOOL)flag;
Availability: OpenStep
Sets whether the user can select branch items when
multiple selection is enabled. By default
YES
.
See Also:
-allowsBranchSelection
- (void)
setAllowsEmptySelection: (BOOL)flag;
Availability: OpenStep
- (void)
setAllowsMultipleSelection: (BOOL)flag;
Availability: OpenStep
- (void)
setCellClass: (Class)classId;
Availability: OpenStep
- (void)
setCellPrototype: (
NSCell*)aCell;
Availability: OpenStep
Sets the NSCell instance copied to display items in
the columns of NSBrowser.
See Also:
-cellPrototype
- (void)
setColumnsAutosaveName: (
NSString*)name;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (void)
setDelegate: (id)anObject;
Availability: OpenStep
- (void)
setDoubleAction: (SEL)aSelector;
Availability: OpenStep
Sets the NSBrowser's double-click action to
aSelector.
See Also:
-doubleAction
- (void)
setHasHorizontalScroller: (BOOL)flag;
Availability: OpenStep
Sets whether an NSScroller is used to scroll
horizontally. This method add the
horizontal scroller, adjust the various
subviews of the NSBrowser scroller and marks
self for display.By default a NSBrowser has a
horizontal scroller.
See Also:
-hasHorizontalScroller
-tile
- (void)
setLastColumn: (int)column;
Availability: OpenStep
- (void)
setMatrixClass: (Class)classId;
Availability: OpenStep
Sets the matrix class (NSMatrix or an NSMatrix
subclass) used in the NSBrowser's columns.
See Also:
-matrixClass
- (void)
setMaxVisibleColumns: (int)columnCount;
Availability: OpenStep
Sets the maximum number of columns displayed and
adjusts the various subviews. By default a
NSBrowser has 3 visible columns.
See Also:
-maxVisibleColumns
- (void)
setMinColumnWidth: (int)columnWidth;
Availability: OpenStep
Sets the minimum column width in pixels and adjusts
subviews.
See Also:
-minColumnWidth
- (BOOL)
setPath: (
NSString*)path;
Availability: OpenStep
Parses path and selects corresponding
items in the NSBrowser columns.
This is the primary mechanism for programmatically
updating the selection of a browser. It should
result in the browser cells corresponding to the
components being selected, and the browser
columns up to the end of path (and
just beyond if the last selected cell's
[NSBrowserCell -isLeaf]
returns YES
).
It does
not result in the browsers action being
sent to its target, just in a change to the browser
selection and display.
If path begins with the
-pathSeparator
then it is taken to be absolute and the first
component in it is expected to denote a cell in
column zero. Otherwise it is taken to be relative
to the currently selected column.
Empty components (ie where a
-pathSeparator
occurs immediately after another or at the end of
path) are simply ignored.
The receivers delegate is asked to select each cell
in turn using the
-browser:selectCellWithString:inColumn:
method (if it implements it). If this call to the delegate returns NO
then the attempt to set the path fails.
If the delegate does not implement the method, the browser attempts to locate and select the cell itsself, and the method fails if it is unable to locate the cell by matching its [NSCell -stringValue]
with the component of the path.
The method returns YES
if
path contains no components or if a cell
corresponding to the path was
found. Otherwise it returns NO
.
- (void)
setPathSeparator: (
NSString*)aString;
Availability: OpenStep
Sets the path separator to newString. The
default is "/".
See Also:
-pathSeparator
- (void)
setPrefersAllColumnUserResizing: (BOOL)flag;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (void)
setReusesColumns: (BOOL)flag;
Availability: OpenStep
If flag is YES
, prevents
NSMatrix objects from being freed when their
columns are unloaded, so they can be reused. By
default a NSBrowser does not reuses their
columns.
See Also:
-reusesColumns
[NSMatrix -renewRows:columns:]
- (void)
setSendsActionOnArrowKeys: (BOOL)flag;
Availability: OpenStep
- (void)
setSeparatesColumns: (BOOL)flag;
Availability: OpenStep
Sets whether to separate columns with bezeled
borders and marks self for display. Does nothing
if the NSBrowser is titled. By default a NSBrowser has
separate columns.
See Also:
-separatesColumns
-isTitled
- (void)
setTakesTitleFromPreviousColumn: (BOOL)flag;
Availability: OpenStep
- (void)
setTitle: (
NSString*)aString
ofColumn: (int)column;
Availability: OpenStep
Sets the title of the column at index
column to aString and marks
the title for dispaly if the NSBrowser can diplay
titles or if the column
column is visible.
See Also:
-isTitled
-titleFrameOfColumn:
-titleHeight
- (void)
setTitled: (BOOL)flag;
Availability: OpenStep
Sets whether columns display titles and marks self
for display. Does nothing if the NSBrowser hasn't
separates columns. By default a NSBrowser
displays titles.
See Also:
-isTitled
-separatesColumns
- (void)
setWidth: (float)columnWidth
ofColumn: (int)column;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (BOOL)
takesTitleFromPreviousColumn;
Availability: OpenStep
- (void)
tile;
Availability: OpenStep
Adjusts the various subviews of
NSBrowser-scrollers, columns, titles,
and so on-without redrawing. Your code shouldn't send
this message. It's invoked any time the appearance of
the NSBrowser changes.
- (
NSRect)
titleFrameOfColumn: (int)column;
Availability: OpenStep
Returns the bounds of the title frame for the
column at index column.
Returns NSZeroRect if the NSBrowser does not
display its titles
See Also:
-isTitled
- (float)
titleHeight;
Availability: OpenStep
Returns the height of column titles. The Nextish
look returns 21.
- (
NSString*)
titleOfColumn: (int)column;
Availability: OpenStep
Returns the title displayed for the
column at index column.
- (void)
updateScroller;
Availability: OpenStep
Updates the horizontal scroller to reflect column
positions.
- (void)
validateVisibleColumns;
Availability: OpenStep
- (float)
widthOfColumn: (int)column;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
Instance Variables for NSBrowser Class
@protected BOOL _acceptsAlphaNumericalKeys;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _acceptsArrowKeys;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected SEL _action;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _allowsBranchSelection;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _allowsEmptySelection;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _allowsMultipleSelection;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected int _alphaNumericalLastColumn;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _browserCellPrototype;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableArray* _browserColumns;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _browserDelegate;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _browserMatrixClass;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString* _charBuffer;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSBrowserColumnResizingType _columnResizing;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSize _columnSize;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString* _columnsAutosaveName;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected SEL _doubleAction;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected int _firstVisibleColumn;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _hasHorizontalScroller;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSScroller* _horizontalScroller;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _isLoaded;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _isTitled;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected int _lastColumnLoaded;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSTimeInterval _lastKeyPressed;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected int _lastVisibleColumn;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected int _maxVisibleColumns;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected float _minColumnWidth;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _passiveDelegate;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString* _pathSeparator;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _prefersAllColumnUserResizing;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _reusesColumns;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSRect _scrollerRect;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _sendsActionOnAlphaNumericalKeys;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _sendsActionOnArrowKeys;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _separatesColumns;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _skipUpdateScroller;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _takesTitleFromPreviousColumn;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _target;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
- Declared in:
- AppKit/NSBrowser.h
Availability: OpenStep
Description forthcoming.
Method summary
- (BOOL)
acceptsAlphaNumericalKeys;
Availability: OpenStep
Returns YES
if the alphanumerical keys
are enabled.
- (BOOL)
sendsActionOnAlphaNumericalKeys;
Availability: OpenStep
Returns NO
if pressing an arrow key
only scrolls the browser, YES
if it also
sends the action message specified by setAction:.
- (void)
setAcceptsAlphaNumericalKeys: (BOOL)flag;
Availability: OpenStep
Enables or disables the arrow keys as used for
navigating within and between browsers.
- (void)
setSendsActionOnAlphaNumericalKeys: (BOOL)flag;
Availability: OpenStep
Sets whether pressing an arrow key will cause the
action message to be sent (in addition to causing
scrolling).
- Declared in:
- AppKit/NSBrowser.h
Availability: OpenStep
Description forthcoming.
Method summary
- (void)
browser: (
NSBrowser*)sender
createRowsForColumn: (int)column
inMatrix: (
NSMatrix*)matrix;
Availability: OpenStep
Description forthcoming.
- (BOOL)
browser: (
NSBrowser*)sender
isColumnValid: (int)column;
Availability: OpenStep
Returns YES
iff
- (int)
browser: (
NSBrowser*)sender
numberOfRowsInColumn: (int)column;
Availability: OpenStep
Description forthcoming.
- (BOOL)
browser: (
NSBrowser*)sender
selectCellWithString: (
NSString*)title
inColumn: (int)column;
Availability: OpenStep
Description forthcoming.
- (BOOL)
browser: (
NSBrowser*)sender
selectRow: (int)row
inColumn: (int)column;
Availability: OpenStep
Description forthcoming.
- (float)
browser: (
NSBrowser*)browser
shouldSizeColumn: (int)column
forUserResize: (BOOL)flag
toWidth: (float)width;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (float)
browser: (
NSBrowser*)browser
sizeToFitWidthOfColumn: (int)column;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (
NSString*)
browser: (
NSBrowser*)sender
titleOfColumn: (int)column;
Availability: OpenStep
Description forthcoming.
- (void)
browser: (
NSBrowser*)sender
willDisplayCell: (id)cell
atRow: (int)row
column: (int)column;
Availability: OpenStep
Description forthcoming.
- (void)
browserColumnConfigurationDidChange: (
NSNotification*)notification;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (void)
browserDidScroll: (
NSBrowser*)sender;
Availability: OpenStep
Description forthcoming.
- (void)
browserWillScroll: (
NSBrowser*)sender;
Availability: OpenStep
Description forthcoming.
Up