Foxit PDF SDK

Instance Methods | Properties | List of all members
FSTabOrderMgr Class Reference
Inheritance diagram for FSTabOrderMgr:

## Instance Methods
(BOOL) | - adjustStructureOrder:
| Adjust the structure order with specified annotations, and tab order type will be set to FSTabOrderMgrStructure at the same time. More...
(FSAnnot *) | - getFirstAnnot
| Get the first annotation in current tab order. More...
(FSAnnot *) | - getLastAnnot
| Get the last annotation in current tab order. More...
(FSAnnot *) | - getNextAnnot:
| Get the next annotation of specified annotation in current tab order. More...
(FSAnnot *) | - getPrevAnnot:
| Get the previous annotation of specified annotation in current tab order. More...
(id) | - initWithOther:
| Constructor, with another tab order manager object. More...
(id) | - initWithPage:
| Constructor, from a PDF page object. More...
(BOOL) | - isEmpty
| Check whether current object is empty or not. More...
(void) | - reload
| Reload the tab order of annotations. More...

## Properties
FSTabOrderMgrOrderType | orderType
| Get or Set the tab order type.

## Detailed Description

Tab order is the order to navigate through annotations on a PDF page by using Tab key in keyboard. This class offers functions to manage the order of moving the keyboard focus among annotations on a PDF page. Tab order manager will ignore following types of annotations:
note annotations which are as reply annotations, note annotations which are as state annotations, pop-up annotations, annotations whose flags contain FSAnnotFlagHidden.
This class offers functions to get the order type and get annotations one by one in the order type. This class also offers functions to change the order type:

- FSTabOrderMgr::orderType can be used to change the tab order type. Specially, if the tab order type is changed to FSTabOrderMgrStructure, function FSTabOrderMgr::adjustStructureOrder: could be called to set the order.
- Function FSTabOrderMgr::adjustStructureOrder: can be called directly to change the order type to structure order and set the structure order at the same time.

After FSTabOrderMgr::orderType being used or calling function FSTabOrderMgr::adjustStructureOrder:, function FSTabOrderMgr::reload should be called; otherwise the annotations' order may not be changed as expected.

See also
  FSPDFPage
  FSAnnot

## Method Documentation

## ◆ adjustStructureOrder:()

- (BOOL) adjustStructureOrder: |  | (FSAnnotArray*) | annot_array |

Adjust the structure order with specified annotations, and tab order type will be set to FSTabOrderMgrStructure at the same time.

This function is used to adjust the annotation order for structure tab order. First, re-order annotations in the input array according to the order in this array, and then re-order the reset annotations (which are not included in the input array) by the reading direction of PDF document.
After this function succeeds, indexes of all annotations in the related PDF page will be changed.

Parameters

  [in] | annot_array | An array of annotations which will be re-ordered first for structure tab order. All the annotations in this array should belong to the same page as the one related to current tab order manager. These annotations should all be valid and should be different from each other.

Returns
  YES means success, while NO means failure.

## ◆ getFirstAnnot()

- (FSAnnot *) getFirstAnnot |  |  |

Get the first annotation in current tab order.

Returns
  The first annotation. If the return value of function FSAnnot::isEmpty for the returned annotation object is YES, that means there is no annotation.

## ◆ getLastAnnot()

- (FSAnnot *) getLastAnnot |  |  |

Get the last annotation in current tab order.

Returns
  The last annotation. If the return value of function FSAnnot::isEmpty for the returned annotation object is YES, that means there is no annotation.

## ◆ getNextAnnot:()

- (FSAnnot *) getNextAnnot: |  | (FSAnnot*) | annot |

Get the next annotation of specified annotation in current tab order.

Parameters

  [in] | annot | The valid specified annotation.

Returns
  The next annotation. If the return value of function FSAnnot::isEmpty for the returned annotation object is YES, that means the specified annotation is the last annotation in current tab order.

## ◆ getPrevAnnot:()

- (FSAnnot *) getPrevAnnot: |  | (FSAnnot*) | annot |

Get the previous annotation of specified annotation in current tab order.

Parameters

  [in] | annot | The valid specified annotation.

Returns
  The previous annotation. If the return value of function FSAnnot::isEmpty for the returned annotation object is YES, that means the specified annotation is the first annotation in current tab order.

## ◆ initWithOther:()

- (id) initWithOther: |  | (FSTabOrderMgr*) | other |

Constructor, with another tab order manager object.

Parameters

  [in] | other | Another tab order manager object.

## ◆ initWithPage:()

- (id) initWithPage: |  | (FSPDFPage*) | page |

Constructor, from a PDF page object.

Parameters

  [in] | page | A valid PDF page.

## ◆ isEmpty()

- (BOOL) isEmpty |  |  |

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  YES means current object is empty, while NO means not.

## ◆ reload()

- (void) reload |  |  |

Reload the tab order of annotations.

This function should be called when:

- any annotation in related PDF page is moved/deleted/added;
- related page's rotation is changed;
- reading direction of related PDF document is changed;
- FSTabOrderMgr::orderType is used or function FSTabOrderMgr::adjustStructureOrder: is called to change the tab order type or structure order.

Returns
  None.