nsIAccessibleRelation 编辑
accessible/public/nsIAccessibleRelation.idl
Scriptable This interface gives access to an accessibles set of relations. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports
Last changed in Gecko 1.9 (Firefox 3) Note: Be carefull, do not change constants until ATK has a structure to map gecko constants into ATK constants.Method overview
nsIAccessible getTarget(in unsigned long index); |
nsIArray getTargets(); |
Attributes
Attribute | Type | Description |
relationType | unsigned long | Returns the type of the relation. Read only. |
targetsCount | unsigned long | Returns the number of targets for this relation. Read only. |
Constants
Constant | Value | Description |
RELATION_NUL | 0x00 | |
RELATION_CONTROLLED_BY | 0x01 | Some attribute of this object is affected by a target object. |
RELATION_CONTROLLER_FOR | 0x02 | This object is interactive and controls some attribute of a target object. |
RELATION_LABEL_FOR | 0x03 | This object is label for a target object. |
RELATION_LABELLED_BY | 0x04 | This object is labelled by a target object. If the accessible has an nsIAccessible . |
RELATION_MEMBER_OF | 0x05 | This object is a member of a group of one or more objects. When there is more than one object in the group each member may have one and the same target, for example a grouping object. It is also possible that each member has multiple additional targets, for example one for every other member in the group. |
RELATION_NODE_CHILD_OF | 0x06 | This object is a child of a target object. |
RELATION_FLOWS_TO | 0x07 | Content flows from this object to a target object, that is has content that flows logically to another object in a sequential way, for example text flow. |
RELATION_FLOWS_FROM | 0x08 | Content flows to this object from a target object, that is has content that flows logically from another object in a sequential way, for example text flow. |
RELATION_SUBWINDOW_OF | 0x09 | This object is a sub window of a target object. |
RELATION_EMBEDS | 0x0a | This object embeds a target object. This relation can be used on the OBJID_CLIENT accessible for a top level window to show where the content areas are. It points to the accessible object corresponding to the root of content in that window. This relation is very useful for finding the content quickly, and is the proper method for finding content in Gecko 1.9 and beyond. |
RELATION_EMBEDDED_BY | 0x0b | This object is embedded by a target object. |
RELATION_POPUP_FOR | 0x0c | This object is a transient component related to the target object. When this object is activated the target object doesn't lose focus. |
RELATION_PARENT_WINDOW_OF | 0x0d | This object is a parent window of the target object. |
RELATION_DESCRIBED_BY | 0x0e | This object is described by the target object. If the accessible has an nsIAccessible . |
RELATION_DESCRIPTION_FOR | 0x0f | This object is describes the target object. |
RELATION_DEFAULT_BUTTON | 0x4000 | Part of a form/dialog with a related default button. It is used for MSAA only, no for IA2 nor ATK/AT-SPI. |
Methods
getTarget()
Returns accessible relation target at the given index.
nsIAccessible getTarget( in unsigned long index );
Parameters
index
- Zero-based index of relation target.
Return value
Returns an nsIAccessible
object.
Exceptions thrown
NS_ERROR_INVALID_ARG
- Indicates the given index is out of range.
getTargets()
Returns an array of accessible relation targets.
nsIArray getTargets();
Parameters
None.
Return value
An nsIArray
object, each item in the array implements an nsIAccessible
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论