nsIAccessibleSelectable 编辑

accessible/public/nsIAccessibleSelectable.idlScriptable 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.7

Method 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

AttributeTypeDescription
selectionCountlongThe number of accessible children currently selected. Read only.

Constants

ConstantValueDescription
eSelection_Add0 
eSelection_Remove1 
eSelection_GetState2 

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:126 次

字数:6554

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文