PDFListView.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //
  2. // PDFListView.h
  3. // PDFReader
  4. //
  5. // Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // The PDF Reader Sample applications are licensed with a modified BSD license.
  8. // Please see License for details. This notice may not be removed from this file.
  9. //
  10. #import <ComPDFKit/ComPDFKit.h>
  11. typedef NS_ENUM(NSInteger, PDFViewAnnotationMode) {
  12. PDFViewAnnotationModeNone = 0,
  13. PDFViewAnnotationModeNote,
  14. PDFViewAnnotationModeHighlight,
  15. PDFViewAnnotationModeUnderline,
  16. PDFViewAnnotationModeStrikeout,
  17. PDFViewAnnotationModeSquiggly,
  18. PDFViewAnnotationModeCircle,
  19. PDFViewAnnotationModeSquare,
  20. PDFViewAnnotationModeArrow,
  21. PDFViewAnnotationModeLine,
  22. PDFViewAnnotationModeInk,
  23. PDFViewAnnotationModeFreeText,
  24. PDFViewAnnotationModeStamp,
  25. PDFViewAnnotationModeImage,
  26. PDFViewAnnotationModeLink,
  27. };
  28. @class PDFListView;
  29. @protocol PDFListViewDelegate <NSObject>
  30. @optional
  31. - (void)PDFViewPerformOpenNote:(PDFListView *)pdfView forAnnotation:(CPDFAnnotation *)annotation;
  32. - (void)PDFViewPerformChangeColor:(PDFListView *)pdfView forAnnotation:(CPDFAnnotation *)annotation;
  33. - (void)PDFViewPerformShare:(PDFListView *)pdfView forAnnotation:(CPDFMarkupAnnotation *)annotation;
  34. - (void)PDFViewPerformSave:(PDFListView *)pdfView forAnnotation:(CPDFStampAnnotation *)annotation;
  35. - (void)PDFViewPerformPopup:(PDFListView *)pdfView forAnnotation:(CPDFMarkupAnnotation *)annotation;
  36. - (void)PDFViewPerformEditLink:(PDFListView *)pdfView forAnnotation:(CPDFLinkAnnotation *)annotation;
  37. - (void)PDFViewPerformSignatureWidget:(PDFListView *)pdfView forAnnotation:(CPDFSignatureWidgetAnnotation *)annotation;
  38. - (void)PDFViewPerformShare:(PDFListView *)pdfView forSelection:(CPDFSelection *)selection;
  39. - (void)PDFViewPerformDefine:(PDFListView *)pdfView forSelection:(CPDFSelection *)selection;
  40. - (void)PDFViewPerformGoogleSearch:(PDFListView *)pdfView forSelection:(CPDFSelection *)selection;
  41. - (void)PDFViewPerformWikiSearch:(PDFListView *)pdfView forSelection:(CPDFSelection *)selection;
  42. - (void)PDFViewPerformAddSignture:(PDFListView *)pdfView atPoint:(CGPoint)point forPage:(CPDFPage *)page;
  43. - (void)PDFViewPerformAddStamp:(PDFListView *)pdfView atPoint:(CGPoint)point forPage:(CPDFPage *)page;
  44. - (void)PDFViewPerformAddImage:(PDFListView *)pdfView atPoint:(CGPoint)point forPage:(CPDFPage *)page;
  45. - (void)PDFViewPerformTouchEnded:(PDFListView *)pdfView;
  46. - (void)PDFViewPerformWillGoTo:(PDFListView *)pdfView pageIndex:(NSInteger)pageIndex;
  47. @end
  48. @interface PDFListView : CPDFView
  49. @property (nonatomic,assign) id<PDFListViewDelegate> performDelegate;
  50. @property (nonatomic,assign) PDFViewAnnotationMode annotationMode;
  51. @property (nonatomic,retain) CPDFAnnotation *activeAnnotation;
  52. @property (nonatomic,retain) CPDFAnnotation *addAnnotation;
  53. @property (nonatomic,readonly) CGPoint menuPoint;
  54. @property (nonatomic,readonly) CPDFPage *menuPage;
  55. - (void)addAnnotation:(CPDFAnnotation *)annotation forPage:(CPDFPage *)page;
  56. - (void)addAnnotation:(CPDFAnnotation *)annotation;
  57. @end