[This is preliminary documentation and subject to change.]
Retrieves the next or previous sibling or child object in a specified direction.
HRESULT accNavigate(
long navDir,
VARIANT varStartFromChildOrSelf,
VARIANT *pvarEndUpAt
);
Returns S_OK if successful or one of the following values or a standard COM error code otherwise.
DISP_E_MEMBERNOTFOUND |
E_INVALIDARG |
S_FALSE |
This method retrieves only objects that have a defined screen location. However, the object might be currently clipped or obscured by another object. This method does not change selection or focus. To change focus to or select an object, use the IAccessible::accSelect method. For more information see, Object Navigation.
The NAVDIR_NEXT and NAVDIR_PREVIOUS values will not cause looping. The method will return S_FALSE, after the last or first object is found.
Note Implementers: If the current object does not have any knowledge of peer objects, it should ask its parent object to perform the navigation. If the current object does not have any knowledge of its parent, it should return S_FALSE. Client applications using accNavigate should be aware that the return value they get back may not have been provided by the object itself. For example, if a client asks Object A to navigate to the next object (Object B), Object A may ask its parent to do the navigation. In that case, the client must direct any future queries about Object B (i.e. accLocation) to the parent of Object A (by calling ObjectA.get_accParent) or to Object B itself (by calling ObjectA.get_accParent() and then ParentObject.get_accChild(ChildB). The client will be able to tell that this is necessary if: * The accNavigate call started with the varStart VARIANT set to type = VT_I4 and lVal = CHILDID_SELF (0). * The VARIANT filled in by the accNavigate call (pvarEndUpAt) also has type = VT_I4.
Active Accessibility does not always support navigation to invisible children. Remember that it is OK for an object to support the IAccessible::accNavigate and IAccessible::get_accChild methods for children that are invisible, but that clients cannot expect this. In the section where the proxies are implemented, that menus, menu items, and menu popups allow navigation to invisible children, but that other objects that Active Accessibility proxies may not. You might not be able to navigate to all of an object's children, if they have the flag STATE_SYSTEM_INVISIBLE.
VARIANT Structure, IDispatch Interface