Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.pdf.TabOrderMgr Class Reference
Inheritance diagram for foxit.pdf.TabOrderMgr:

## Public Types
enum | OrderType { OrderType.e_None = 0x0000, OrderType.e_Row = 0x0001, OrderType.e_Column = 0x0002, OrderType.e_Structure = 0x0003 }
| Enumeration for tab order type. More...

## Public Member Functions
| TabOrderMgr (PDFPage page)
| Constructor, from a PDF page object. More...
| TabOrderMgr (TabOrderMgr other)
| Constructor, with another tab order manager object. More...
bool | AdjustStructureOrder (AnnotArray annot_array)
| Adjust the structure order with specified annotations, and tab order type will be set to foxit.pdf.TabOrderMgr.OrderType.e_Structure at the same time. More...
Annot | GetFirstAnnot ()
| Get the first annotation in current tab order. More...
Annot | GetLastAnnot ()
| Get the last annotation in current tab order. More...
Annot | GetNextAnnot (Annot annot)
| Get the next annotation of specified annotation in current tab order. More...
TabOrderMgr.OrderType | GetOrderType ()
| Get the tab order type. More...
Annot | GetPrevAnnot (Annot annot)
| Get the previous annotation of specified annotation in current tab order. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
void | Reload ()
| Reload the tab order of annotations. More...
void | SetOrderType (TabOrderMgr.OrderType order_type)
| Set the tab order type. More...

## 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 foxit.pdf.annots.Annot.Flags.e_FlagHidden .
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:

- TabOrderMgr.SetOrderType can be used to change the tab order type. Specially, if the tab order type is changed to foxit.pdf.TabOrderMgr.OrderType.e_Structure , function TabOrderMgr.AdjustStructureOrder could be called to set the order.

- Function TabOrderMgr.AdjustStructureOrder can be called directly to change the order type to structure order and set the structure order at the same time.

After TabOrderMgr.SetOrderType being used or calling function TabOrderMgr.AdjustStructureOrder , function TabOrderMgr.Reload should be called; otherwise the annotations' order may not be changed as expected.

See also
  PDFPage
  foxit.pdf.annots.Annot

## Member Enumeration Documentation

## ◆ OrderType

enum foxit.pdf.TabOrderMgr.OrderType
| strong

Enumeration for tab order type.

Values of this enumeration should be used alone.

Enumerator
e_None | None (index order): Annotations are visited in annotation's index across the page.
e_Row | R (row order): Annotations are visited in rows running horizontally across the page.
e_Column | C (column order): Annotations are visited in columns running vertically up and down the page.
e_Structure | S (structure order): Annotations are visited in the order in which they appear in the structure tree.

## Constructor & Destructor Documentation

## ◆ TabOrderMgr() [1/2]

foxit.pdf.TabOrderMgr.TabOrderMgr | ( | PDFPage | page | ) |
| inline

Constructor, from a PDF page object.

Parameters

  [in] | page | A valid PDF page.

## ◆ TabOrderMgr() [2/2]

foxit.pdf.TabOrderMgr.TabOrderMgr | ( | TabOrderMgr | other | ) |
| inline

Constructor, with another tab order manager object.

Parameters

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

## Member Function Documentation

## ◆ AdjustStructureOrder()

bool foxit.pdf.TabOrderMgr.AdjustStructureOrder | ( | AnnotArray | annot_array | ) |
| inline

Adjust the structure order with specified annotations, and tab order type will be set to foxit.pdf.TabOrderMgr.OrderType.e_Structure 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
  true means success, while false means failure.

## ◆ GetFirstAnnot()

Annot foxit.pdf.TabOrderMgr.GetFirstAnnot | ( |  | ) |
| inline

Get the first annotation in current tab order.

Returns
  The first annotation. If the return value of function annots.Annot.IsEmpty for the returned annotation object is true, that means there is no annotation.

## ◆ GetLastAnnot()

Annot foxit.pdf.TabOrderMgr.GetLastAnnot | ( |  | ) |
| inline

Get the last annotation in current tab order.

Returns
  The last annotation. If the return value of function annots.Annot.IsEmpty for the returned annotation object is true, that means there is no annotation.

## ◆ GetNextAnnot()

Annot foxit.pdf.TabOrderMgr.GetNextAnnot | ( | Annot | annot | ) |
| inline

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 annots.Annot.IsEmpty for the returned annotation object is true, that means the specified annotation is the last annotation in current tab order.

## ◆ GetOrderType()

TabOrderMgr.OrderType foxit.pdf.TabOrderMgr.GetOrderType | ( |  | ) |
| inline

Get the tab order type.

Returns
  The tab order type. Please refer to values starting from foxit.pdf.TabOrderMgr.OrderType.e_None and this would be one of these values.

## ◆ GetPrevAnnot()

Annot foxit.pdf.TabOrderMgr.GetPrevAnnot | ( | Annot | annot | ) |
| inline

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 annots.Annot.IsEmpty for the returned annotation object is true, that means the specified annotation is the first annotation in current tab order.

## ◆ IsEmpty()

bool foxit.pdf.TabOrderMgr.IsEmpty | ( |  | ) |
| inline

Check whether current object is empty or not.

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

Returns
  true means current object is empty, while false means not.

## ◆ Reload()

void foxit.pdf.TabOrderMgr.Reload | ( |  | ) |
| inline

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;

- TabOrderMgr.SetOrderType is used or function TabOrderMgr.AdjustStructureOrder is called to change the tab order type or structure order.

Returns
  None.

## ◆ SetOrderType()

void foxit.pdf.TabOrderMgr.SetOrderType | ( | TabOrderMgr.OrderType | order_type | ) |
| inline

Set the tab order type.

Parameters

  [in] | order_type | The new tab order type. It should be one of following values: foxit.pdf.TabOrderMgr.OrderType.e_None : means not to use tab order. foxit.pdf.TabOrderMgr.OrderType.e_Row : means to use row order. foxit.pdf.TabOrderMgr.OrderType.e_Column : means to use column order. foxit.pdf.TabOrderMgr.OrderType.e_Structure : means to use struct order and then function TabOrderMgr.AdjustStructureOrder could be called to set the order.

Returns
  None.