Foxit PDF SDK
|
Public Types | |
enum | OrderType { e_None = 0x0000, e_Row = 0x0001, e_Column = 0x0002, e_Structure = 0x0003 } |
Enumeration for tab order type. More... | |
Public Member Functions | |
TabOrderMgr (const PDFPage &page) | |
Constructor, from a PDF page object. More... | |
TabOrderMgr (const TabOrderMgr &other) | |
Constructor, with another tab order manager object. More... | |
~TabOrderMgr () | |
Destructor. | |
bool | AdjustStructureOrder (const annots::AnnotArray &annot_array) |
Adjust the structure order with specified annotations, and tab order type will be set to TabOrderMgr::e_Structure at the same time. More... | |
annots::Annot | GetFirstAnnot () |
Get the first annotation in current tab order. More... | |
annots::Annot | GetLastAnnot () |
Get the last annotation in current tab order. More... | |
annots::Annot | GetNextAnnot (const annots::Annot &annot) |
Get the next annotation of specified annotation in current tab order. More... | |
OrderType | GetOrderType () const |
Get the tab order type. More... | |
annots::Annot | GetPrevAnnot (const annots::Annot &annot) |
Get the previous annotation of specified annotation in current tab order. More... | |
bool | IsEmpty () const |
Check whether current object is empty or not. More... | |
bool | operator!= (const TabOrderMgr &other) const |
Not equal operator. More... | |
TabOrderMgr & | operator= (const TabOrderMgr &other) |
Assign operator. More... | |
bool | operator== (const TabOrderMgr &other) const |
Equal operator. More... | |
void | Reload () |
Reload the tab order of annotations. More... | |
void | SetOrderType (OrderType order_type) |
Set the tab order type. More... | |
![]() | |
FS_HANDLE | Handle () const |
Get the handle of current object. More... | |
Tab order is the order to navigate through annotations on a PDF page by using Tab key in keyboard. This class offers functions to manager 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 annots::Annot::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:
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.
Enumeration for tab order type.
Values of this enumeration should be used alone.
|
explicit |
Constructor, from a PDF page object.
[in] | page | A valid PDF page. |
foxit::pdf::TabOrderMgr::TabOrderMgr | ( | const TabOrderMgr & | other | ) |
Constructor, with another tab order manager object.
[in] | other | Another tab order manager object. |
bool foxit::pdf::TabOrderMgr::AdjustStructureOrder | ( | const annots::AnnotArray & | annot_array | ) |
Adjust the structure order with specified annotations, and tab order type will be set to TabOrderMgr::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.
[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. |
annots::Annot foxit::pdf::TabOrderMgr::GetFirstAnnot | ( | ) |
Get the first annotation in current tab order.
annots::Annot foxit::pdf::TabOrderMgr::GetLastAnnot | ( | ) |
Get the last annotation in current tab order.
annots::Annot foxit::pdf::TabOrderMgr::GetNextAnnot | ( | const annots::Annot & | annot | ) |
Get the next annotation of specified annotation in current tab order.
[in] | annot | The valid specified annotation. |
OrderType foxit::pdf::TabOrderMgr::GetOrderType | ( | ) | const |
Get the tab order type.
annots::Annot foxit::pdf::TabOrderMgr::GetPrevAnnot | ( | const annots::Annot & | annot | ) |
Get the previous annotation of specified annotation in current tab order.
[in] | annot | The valid specified annotation. |
bool foxit::pdf::TabOrderMgr::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
bool foxit::pdf::TabOrderMgr::operator!= | ( | const TabOrderMgr & | other | ) | const |
Not equal operator.
[in] | other | Another tab order manager object. This function will check if current object is not equal to this one. |
TabOrderMgr& foxit::pdf::TabOrderMgr::operator= | ( | const TabOrderMgr & | other | ) |
Assign operator.
[in] | other | Another tab order manager object, whose value would be assigned to current object. |
bool foxit::pdf::TabOrderMgr::operator== | ( | const TabOrderMgr & | other | ) | const |
Equal operator.
[in] | other | Another tab order manager object. This function will check if current object is equal to this one. |
void foxit::pdf::TabOrderMgr::Reload | ( | ) |
Reload the tab order of annotations.
This function should be called when:
void foxit::pdf::TabOrderMgr::SetOrderType | ( | OrderType | order_type | ) |
Set the tab order type.
[in] | order_type | The new tab order type. It should be one of following values:
|