nsITreeSelection

IID:F8A13364-184E-4da3-BADF-5C04837537F8
Inherits From:nsISupports

Properties

readonly PRInt32 count

The number of rows currently selected in this tree.

PRInt32 currentIndex

The current item (the one that gets a focus rect in addition to being selected).

PRBool selectEventsSuppressed

This attribute is a boolean indicating whether or not the "select" event should fire when the selection is changed using one of our methods. A view can use this to temporarily suppress the selection while manipulating all of the indices, e.g., on a sort.

readonly PRInt32 shiftSelectPivot

The selection "pivot". This is the first item the user selected as part of a ranged select.

readonly PRBool single

This attribute is a boolean indicating single selection.

nsITreeBoxObject tree

The tree widget for this selection.


Methods

void adjustSelection ( PRInt32 index , PRInt32 count ) void clearRange ( PRInt32 startIndex , PRInt32 endIndex ) void clearSelection ( ) void getRangeAt ( PRInt32 i , out PRInt32 min , out PRInt32 max ) PRInt32 getRangeCount ( ) void invalidateSelection ( ) void invertSelection ( ) PRBool isSelected ( PRInt32 index ) void rangedSelect ( PRInt32 startIndex , PRInt32 endIndex , PRBool augment ) void select ( PRInt32 index ) void selectAll ( ) void timedSelect ( PRInt32 index , PRInt32 delay ) void toggleSelect ( PRInt32 index )

void adjustSelection ( PRInt32 index , PRInt32 count )

Called when the row count changes to adjust selection indices.

Arguments:
index
count

void clearRange ( PRInt32 startIndex , PRInt32 endIndex )

Clears the range.

Arguments:
startIndex
endIndex

void clearSelection ( )

Clears the selection.


void getRangeAt ( PRInt32 i , out PRInt32 min , out PRInt32 max )

Arguments:
i
min
max

PRInt32 getRangeCount ( )

Iterate the selection using these methods.


void invalidateSelection ( )

Can be used to invalidate the selection.


void invertSelection ( )

Inverts the selection.


PRBool isSelected ( PRInt32 index )

Indicates whether or not the row at the specified index is part of the selection.

Arguments:
index

void rangedSelect ( PRInt32 startIndex , PRInt32 endIndex , PRBool augment )

Select the range specified by the indices. If augment is true, then we add the range to the selection without clearing out anything else. If augment is false, everything is cleared except for the specified range.

Arguments:
startIndex
endIndex
augment

void select ( PRInt32 index )

Deselect all rows and select the row at the specified index.

Arguments:
index

void selectAll ( )

Selects all rows.


void timedSelect ( PRInt32 index , PRInt32 delay )

Perform a timed select.

Arguments:
index
delay

void toggleSelect ( PRInt32 index )

Toggle the selection state of the row at the specified index.

Arguments:
index

References

This interface is the type of the following properties:

nsITreeView.selection

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com