CPDFListView.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //
  2. // CPDFListView.h
  3. // compdfkit-tools
  4. //
  5. // Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  6. //
  7. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. // This notice may not be removed from this file.
  11. //
  12. #import <ComPDFKit/ComPDFKit.h>
  13. NS_ASSUME_NONNULL_BEGIN
  14. typedef NS_ENUM(NSUInteger, CToolModel) {
  15. CToolModelViewer,
  16. CToolModelAnnotation,
  17. CToolModelForm,
  18. CToolModelEdit,
  19. };
  20. typedef NS_ENUM(NSInteger, CPDFViewAnnotationMode) {
  21. CPDFViewAnnotationModeNone = 0,
  22. CPDFViewAnnotationModeNote,
  23. CPDFViewAnnotationModeHighlight,
  24. CPDFViewAnnotationModeUnderline,
  25. CPDFViewAnnotationModeStrikeout,
  26. CPDFViewAnnotationModeSquiggly,
  27. CPDFViewAnnotationModeCircle,
  28. CPDFViewAnnotationModeSquare,
  29. CPDFViewAnnotationModeArrow,
  30. CPDFViewAnnotationModeLine,
  31. CPDFViewAnnotationModeInk,
  32. CPDFViewAnnotationModeFreeText,
  33. CPDFViewAnnotationModeSignature,
  34. CPDFViewAnnotationModeStamp,
  35. CPDFViewAnnotationModeImage,
  36. CPDFViewAnnotationModeLink,
  37. CPDFViewAnnotationModeSound
  38. };
  39. extern NSNotificationName const CPDFListViewToolModeChangeNotification;
  40. extern NSNotificationName const CPDFListViewAnnotationModeChangeNotification;
  41. extern NSNotificationName const CPDFListViewActiveAnnotationsChangeNotification;
  42. #pragma mark - CPDFListViewDelegate
  43. @class CPDFListView;
  44. @class CPDFSlider;
  45. @protocol CPDFListViewDelegate <NSObject>
  46. @optional
  47. - (NSArray<UIMenuItem *> *)PDFListView:(CPDFListView *)pdfListView customizeMenuForPage:(CPDFPage *)page forPagePoint:(CGPoint)pagePoint;
  48. - (void)PDFListViewEditNote:(CPDFListView *)pdfListView forAnnotation:(CPDFAnnotation *)annotation;
  49. - (void)PDFListViewPerformTouchEnded:(CPDFListView *)pdfListView;
  50. - (void)PDFListViewCustomMenuClick:(CPDFListView *)pdfListView identifier:(NSString *)menuIdentifier;
  51. - (void)PDFListViewChangedToolMode:(CPDFListView *)pdfListView forToolMode:(CToolModel)toolMode;
  52. - (void)PDFListViewChangedAnnotationType:(CPDFListView *)pdfListView forAnnotationMode:(CPDFViewAnnotationMode)annotationMode;
  53. - (void)PDFListViewChangeatioActiveAnnotations:(CPDFListView *)pdfListView forActiveAnnotations:(NSArray<CPDFAnnotation *> *)annotations;
  54. @end
  55. #pragma mark - CPDFListView
  56. @interface CPDFListView : CPDFView
  57. @property (nonatomic, weak) id<CPDFListViewDelegate> performDelegate;
  58. @property (nonatomic, strong) CPDFSlider *pageSliderView;
  59. @property (nonatomic, assign) CToolModel toolModel;
  60. @property (nonatomic, assign) CPDFViewAnnotationMode annotationMode;
  61. @property (nonatomic, readonly) NSMutableArray <CPDFAnnotation *>*activeAnnotations;
  62. @end
  63. NS_ASSUME_NONNULL_END