nsIAccessibleSelectable 编辑
accessible/public/nsIAccessibleSelectable.idl
Scriptable An interface for the accessibility module and in-process accessibility clients for dealing with getting and changing the selection of accessible nodes. Inherits from: nsISupports
Last changed in Gecko 1.7Method overview
void addChildToSelection(in long index); |
void clearSelection(); |
nsIArray GetSelectedChildren(); |
boolean isChildSelected(in long index); |
nsIAccessible refSelection(in long index); |
void removeChildFromSelection(in long index); |
boolean selectAllSelection(); |
Attributes
Attribute | Type | Description |
selectionCount | long | The number of accessible children currently selected. Read only. |
Constants
Constant | Value | Description |
eSelection_Add | 0 | |
eSelection_Remove | 1 | |
eSelection_GetState | 2 |
Methods
addChildToSelection()
Adds the specified accessible child of the object to the object's selection. If the specified object is already selected, then it does nothing.
void addChildToSelection( in long index );
Parameters
index
- The zero-based accessible child index.
Exceptions thrown
NS_ERROR_FAILURE
- If the specified object is not selectable.
clearSelection()
Clears the selection in the object so that no children in the object are selected.
void clearSelection();
Parameters
None.
GetSelectedChildren()
Returns an nsIArray
of the selected nsIAccessible
children.
nsIArray GetSelectedChildren();
Parameters
None.
Return value
An nsIArray
.
isChildSelected()
Determines if the current child of this object is selected.
boolean isChildSelected( in long index );
Parameters
index
- The zero-based accessible child index.
Return value
True if the child is selected, false if not.
refSelection()
Returns a reference to the accessible object representing the specified selected child of the object.
nsIAccessible refSelection( in long index );
Parameters
index
- Zero-based selected accessible child index.
Return value
The selected accessible child.
removeChildFromSelection()
Removes the specified child of the object from the object's selection. If the specified object was not selected, then it does nothing.
void removeChildFromSelection( in long index );
Parameters
index
- Zero-based accessible child index.
Exceptions thrown
NS_ERROR_FAILURE
- If the specified object is not selectable.
selectAllSelection()
Select all children.
boolean selectAllSelection();
Parameters
None.
Return value
If the object does not accept multiple selection, return false
. Otherwise, returns true
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论