Foxit PDF SDK  9.1
<IAnnotHandler> Protocol Reference

The annotation handler, it should handle the operations on the specified annotation. More...

Inheritance diagram for <IAnnotHandler>:

Instance Methods

(BOOL) - addAnnot:
 Add a new annotation to a specified page. It's equal to the following one with the param addUndo YES. More...
 
(BOOL) - addAnnot:addUndo:
 Add a new annotation to a specified page, undo/redo will be supported if the param addUndo is YES. More...
 
(BOOL) - flattenAnnot:
 Flatten an annotation. More...
 
(NSString *) - getName
 
(FSAnnotType- getType
 
(BOOL) - isHitAnnot:point:
 Can hit the annotation at specified point. More...
 
(BOOL) - modifyAnnot:
 Modify an annotation. It's equal to the following one with the param addUndo YES. More...
 
(BOOL) - modifyAnnot:addUndo:
 Modify an annotation, undo/redo will be supported if the param addUndo is YES. More...
 
(void) - onAnnotChanged:property:from:to:
 Changed property event on the specified annot. More...
 
(void) - onAnnotDeselected:
 When the annotation is deselected. More...
 
(void) - onAnnotSelected:
 When the annotation is selected. More...
 
(void) - onDraw:inContext:annot:
 Drawing event on the specified page. More...
 
(void) - onDraw:inContext:widget:
 Drawing event on the specified page. More...
 
(BOOL) - onPageViewLongPress:recognizer:annot:
 Long press gesture on the specified page. More...
 
(BOOL) - onPageViewPan:recognizer:annot:
 Pan gesture on the specified page. More...
 
(BOOL) - onPageViewShouldBegin:recognizer:annot:
 Should being gesture on the specified page. More...
 
(BOOL) - onPageViewShouldBegin:recognizer:widget:
 Should being gesture on the specified page. More...
 
(BOOL) - onPageViewTap:recognizer:annot:
 Tap gesture on the specified page. More...
 
(BOOL) - onPageViewTap:recognizer:widget:
 Tap gesture on the specified page. More...
 
(BOOL) - onPageViewTouchesBegan:touches:withEvent:annot:
 Touches began on the specified page. More...
 
(BOOL) - onPageViewTouchesBegan:touches:withEvent:widget:
 Touches began on the specified page. More...
 
(BOOL) - onPageViewTouchesCancelled:touches:withEvent:annot:
 Touches cancelled on the specified page. More...
 
(BOOL) - onPageViewTouchesEnded:touches:withEvent:annot:
 Touches ended on the specified page. More...
 
(BOOL) - onPageViewTouchesEnded:touches:withEvent:widget:
 Touches ended on the specified page. More...
 
(BOOL) - onPageViewTouchesMoved:touches:withEvent:annot:
 Touches moved on the specified page. More...
 
(BOOL) - onPageViewTouchesMoved:touches:withEvent:widget:
 Touches moved on the specified page. More...
 
(void) - onXFAWidgetDeselected:
 When the dynamic xfa widget is deselected. More...
 
(void) - onXFAWidgetSelected:
 When the dynamic xfa widget is selected. More...
 
(BOOL) - removeAnnot:
 Remove an annotation. It's equal to the following one with the param addUndo YES. More...
 
(BOOL) - removeAnnot:addUndo:
 Remove an annotation, undo/redo will be supported if the param addUndo is YES. More...
 
(BOOL) - shouldDrawAnnot:inPDFViewCtrl:
 Should pdfViewCtrl draw annot, if NO annot handler will draw annot by itself in onDraw:inContext:annot:. More...
 

Detailed Description

The annotation handler, it should handle the operations on the specified annotation.

Method Documentation

◆ addAnnot:

- (BOOL) addAnnot: (FSAnnot *)  annot
optional

Add a new annotation to a specified page. It's equal to the following one with the param addUndo YES.

Parameters
[in]annotThe annotation to be added.
Returns
Whether add successfully.

◆ addAnnot:addUndo:

- (BOOL) addAnnot: (FSAnnot *)  annot
addUndo: (BOOL)  addUndo 
optional

Add a new annotation to a specified page, undo/redo will be supported if the param addUndo is YES.

Parameters
[in]annotThe annotation to be added.
[in]addUndoWhether the adding operation is added to undo stack..
Returns
Whether add successfully.

◆ flattenAnnot:

- (BOOL) flattenAnnot: (FSAnnot *)  annot
optional

Flatten an annotation.

Parameters
[in]annotThe annotation to be flattened.
Returns
Whether flatten successfully.

◆ getName

- (NSString *) getName
optional

brief Get the annotHandler name

Returns
AnnotHandler name.

◆ getType

- (FSAnnotType) getType
optional

brief Get the annotation type

Returns
Annotation type.

◆ isHitAnnot:point:

- (BOOL) isHitAnnot: (FSAnnot *)  annot
point: (FSPointF *)  point 

Can hit the annotation at specified point.

Parameters
[in]annotThe pdf annotation.
[in]pointThe point on PDF page, in PDF coordination.
Returns
Whether the verified point is on the annotation.

◆ modifyAnnot:

- (BOOL) modifyAnnot: (FSAnnot *)  annot
optional

Modify an annotation. It's equal to the following one with the param addUndo YES.

Parameters
[in]annotThe annotation to be modified.
Returns
Whether modify successfully.

◆ modifyAnnot:addUndo:

- (BOOL) modifyAnnot: (FSAnnot *)  annot
addUndo: (BOOL)  addUndo 
optional

Modify an annotation, undo/redo will be supported if the param addUndo is YES.

Parameters
[in]annotThe annotation to be modified.
[in]addUndoWhether the modification operation is added to undo stack.
Returns
Whether modify successfully.

◆ onAnnotChanged:property:from:to:

- (void) onAnnotChanged: (FSAnnot *)  annot
property: (long)  property
from: (NSValue *)  oldValue
to: (NSValue *)  newValue 
optional

Changed property event on the specified annot.

Parameters
[in]annotAnnot that need to be modified.
[in]propertyModified property.
[in]oldValueOld value.
[in]newValueNew value.

◆ onAnnotDeselected:

- (void) onAnnotDeselected: (FSAnnot *)  annot

When the annotation is deselected.

Parameters
[in]annotThe deselected annotation.

◆ onAnnotSelected:

- (void) onAnnotSelected: (FSAnnot *)  annot

When the annotation is selected.

Parameters
[in]annotThe selected annotation.

◆ onDraw:inContext:annot:

- (void) onDraw: (int)  pageIndex
inContext: (CGContextRef)  context
annot: (FSAnnot *_Nullable)  annot 
optional

Drawing event on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]contextDrawing context.
[in]annotThe annotation to be drew.

◆ onDraw:inContext:widget:

- (void) onDraw: (int)  pageIndex
inContext: (CGContextRef)  context
widget: (FSXFAWidget *_Nullable)  widget 
optional

Drawing event on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]contextDrawing context.
[in]widgetThe drawing XFA widget.

◆ onPageViewLongPress:recognizer:annot:

- (BOOL) onPageViewLongPress: (int)  pageIndex
recognizer: (UILongPressGestureRecognizer *)  recognizer
annot: (FSAnnot *_Nullable)  annot 
optional

Long press gesture on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]recognizerLong press gesture.
[in]annotGesture corresponding to the annotation.
Returns
Whether the long press gesture on the specified page responds or not.

◆ onPageViewPan:recognizer:annot:

- (BOOL) onPageViewPan: (int)  pageIndex
recognizer: (UIPanGestureRecognizer *)  recognizer
annot: (FSAnnot *)  annot 
optional

Pan gesture on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]recognizerPan gesture.
[in]annotGesture corresponding to the annotation.
Returns
Whether the pan press gesture on the specified page responds or not.

◆ onPageViewShouldBegin:recognizer:annot:

- (BOOL) onPageViewShouldBegin: (int)  pageIndex
recognizer: (UIGestureRecognizer *)  gestureRecognizer
annot: (FSAnnot *_Nullable)  annot 
optional

Should being gesture on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]gestureRecognizerResponsive gesture.
[in]annotGesture corresponding to the annotation.
Returns
Whether should begin gesture on the specified page gesture on the specified page.

◆ onPageViewShouldBegin:recognizer:widget:

- (BOOL) onPageViewShouldBegin: (int)  pageIndex
recognizer: (UIGestureRecognizer *)  gestureRecognizer
widget: (FSXFAWidget *_Nullable)  widget 
optional

Should being gesture on the specified page.

Parameters
[in]pageIndexThe PDF page index.
[in]gestureRecognizerResponsive gesture.
[in]widgetThe xfa widget.
Returns
Whether should begin gesture on the specified page gesture on the specified page.

◆ onPageViewTap:recognizer:annot:

- (BOOL) onPageViewTap: (int)  pageIndex
recognizer: (UITapGestureRecognizer *)  recognizer
annot: (FSAnnot *_Nullable)  annot 
optional

Tap gesture on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]recognizerTap gesture.
[in]annotGesture corresponding to the annotation.
Returns
Whether the tap gesture on the specified page responds or not.

◆ onPageViewTap:recognizer:widget:

- (BOOL) onPageViewTap: (int)  pageIndex
recognizer: (UITapGestureRecognizer *)  recognizer
widget: (FSXFAWidget *_Nullable)  widget 
optional

Tap gesture on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]recognizerTap gesture.
[in]widgetThe xfa widget.
Returns
Whether the tap press gesture on the specified page responds or not.

◆ onPageViewTouchesBegan:touches:withEvent:annot:

- (BOOL) onPageViewTouchesBegan: (int)  pageIndex
touches: (NSSet *)  touches
withEvent: (UIEvent *)  event
annot: (FSAnnot *)  annot 
optional

Touches began on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]touchesTouch set.
[in]eventTouch event.
[in]annotTouch corresponding to the annotation.
Returns
Whether touch began on the specified page responds or not.

◆ onPageViewTouchesBegan:touches:withEvent:widget:

- (BOOL) onPageViewTouchesBegan: (int)  pageIndex
touches: (NSSet *)  touches
withEvent: (UIEvent *)  event
widget: (FSXFAWidget *_Nullable)  widget 
optional

Touches began on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]touchesTouch set.
[in]eventTouch event.
[in]widgetThe xfa widget.
Returns
Whether touch began on the specified page responds or not.

◆ onPageViewTouchesCancelled:touches:withEvent:annot:

- (BOOL) onPageViewTouchesCancelled: (int)  pageIndex
touches: (NSSet *)  touches
withEvent: (UIEvent *)  event
annot: (FSAnnot *)  annot 
optional

Touches cancelled on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]touchesTouch set.
[in]eventTouch event.
[in]annotTouch corresponding to the annot.
Returns
Whether touch cancelled on the specified page responds or not.

◆ onPageViewTouchesEnded:touches:withEvent:annot:

- (BOOL) onPageViewTouchesEnded: (int)  pageIndex
touches: (NSSet *)  touches
withEvent: (UIEvent *)  event
annot: (FSAnnot *)  annot 
optional

Touches ended on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]touchesTouch set.
[in]eventTouch event.
[in]annotTouch corresponding to the annot.
Returns
Whether touch ended on the specified page responds or not.

◆ onPageViewTouchesEnded:touches:withEvent:widget:

- (BOOL) onPageViewTouchesEnded: (int)  pageIndex
touches: (NSSet *)  touches
withEvent: (UIEvent *)  event
widget: (FSXFAWidget *_Nullable)  widget 
optional

Touches ended on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]touchesTouch set.
[in]eventTouch event.
[in]widgetThe xfa widget.
Returns
Whether touch ended on the specified page responds or not.

◆ onPageViewTouchesMoved:touches:withEvent:annot:

- (BOOL) onPageViewTouchesMoved: (int)  pageIndex
touches: (NSSet *)  touches
withEvent: (UIEvent *)  event
annot: (FSAnnot *)  annot 
optional

Touches moved on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]touchesTouch set.
[in]eventTouch event.
[in]annotTouch corresponding to the annot.
Returns
Whether touch moved on the specified page responds or not.

◆ onPageViewTouchesMoved:touches:withEvent:widget:

- (BOOL) onPageViewTouchesMoved: (int)  pageIndex
touches: (NSSet *)  touches
withEvent: (UIEvent *)  event
widget: (FSXFAWidget *_Nullable)  widget 
optional

Touches moved on the specified page.

Parameters
[in]pageIndexThe pdf page index,0 for the first page.
[in]touchesTouch set.
[in]eventTouch event.
[in]widgetThe xfa widget.
Returns
Whether touch moved gesture on the specified page responds or not.

◆ onXFAWidgetDeselected:

- (void) onXFAWidgetDeselected: (FSXFAWidget *)  widget
optional

When the dynamic xfa widget is deselected.

Parameters
[in]widgetDeselected widget.

◆ onXFAWidgetSelected:

- (void) onXFAWidgetSelected: (FSXFAWidget *)  widget
optional

When the dynamic xfa widget is selected.

Parameters
[in]widgetSelected widget.

◆ removeAnnot:

- (BOOL) removeAnnot: (FSAnnot *)  annot
optional

Remove an annotation. It's equal to the following one with the param addUndo YES.

Parameters
[in]annotThe annotation to be removed.
Returns
Whether remove successfully.

◆ removeAnnot:addUndo:

- (BOOL) removeAnnot: (FSAnnot *)  annot
addUndo: (BOOL)  addUndo 
optional

Remove an annotation, undo/redo will be supported if the param addUndo is YES.

Parameters
[in]annotThe annotation to be removed.
[in]addUndoWhether the removing operation is added to undo stack.
Returns
Whether remove successfully.

◆ shouldDrawAnnot:inPDFViewCtrl:

- (BOOL) shouldDrawAnnot: (FSAnnot *)  annot
inPDFViewCtrl: (FSPDFViewCtrl *)  pdfViewCtrl 
optional

Should pdfViewCtrl draw annot, if NO annot handler will draw annot by itself in onDraw:inContext:annot:.

Parameters
[in]annotAnnot to draw.
[in]pdfViewCtrlThe pdf view control.
Returns
Whether should draw annot by pdf view control.