CPDFDigtalView.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. // CPDFDigtalView.h
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by Niehaoyu on 2023/10/10.
  6. //
  7. #import <ComPDFKit/ComPDFKit.h>
  8. #import "NSEvent+PDFListView.h"
  9. #import "CPDFSelection+PDFListView.h"
  10. #import "CPDFListView.h"
  11. //#import <PDF_Reader_Pro-Swift.h>
  12. //typedef NS_ENUM(NSInteger, CAnnotationType) {
  13. // CAnnotationTypeUnkown = 0,
  14. // CAnnotationTypeAnchored,
  15. // CAnnotationTypeLink,
  16. // CAnnotationTypeFreeText,
  17. // CAnnotationTypeLine,
  18. // CAnnotationTypeArrow,
  19. // CAnnotationTypeSquare,
  20. // CAnnotationTypeCircle,
  21. // /*CAnnotationTypePolyGon,*/
  22. // /*CAnnotationTypePolyLine,*/
  23. // CAnnotationTypeHighlight,
  24. // CAnnotationTypeUnderline,
  25. //// CAnnotationTypeSquiggly,
  26. // CAnnotationTypeStrikeOut,
  27. // CAnnotationTypeStamp,
  28. // CAnnotationTypeSignSignature,
  29. // /*CAnnotationTypeCaret,*/
  30. // CAnnotationTypeInk,
  31. // /*CAnnotationTypePopUp,*/
  32. // /*CAnnotationTypeFileattachment,*/
  33. // /*CAnnotationTypeSound,*/
  34. // /*CAnnotationTypeMovie,*/
  35. // CAnnotationTypeRedact,
  36. // CAnnotationTypeEraser,
  37. // CAnnotationTypeAddText,
  38. // CAnnotationTypeAddImage,
  39. //
  40. // CAnnotationTypeRadioButton = 100,
  41. // CAnnotationTypeCheckBox,
  42. // CAnnotationTypeTextField,
  43. // CAnnotationTypeComboBox,
  44. // CAnnotationTypeListMenu,
  45. // CAnnotationTypeActionButton,
  46. // CAnnotationTypeSignature,
  47. //
  48. // CAnnotationTypeSignText = 200,
  49. // CAnnotationTypeSignFalse,
  50. // CAnnotationTypeSignTure,
  51. // CAnnotationTypeSignCircle,
  52. // CAnnotationTypeSignLine,
  53. // CAnnotationTypeSignDot,
  54. // CAnnotationTypeSignConfig,
  55. // CAnnotationTypeSignDate,
  56. //};
  57. //typedef NS_OPTIONS(NSUInteger, CRectEdges) {
  58. // CNoEdgeMask = 0,
  59. // CMinXEdgeMask = (1UL << 0),
  60. // CMinYEdgeMask = (1UL << 1),
  61. // CMaxXEdgeMask = (1UL << 2),
  62. // CMaxYEdgeMask = (1UL << 3),
  63. // CEditInEdgeMask = (1UL << 4),
  64. //};
  65. //enum {
  66. // CDragArea = 1 << 16,
  67. // CResizeUpDownArea = 1 << 17,
  68. // CReadingBarArea = 1 << 18,
  69. // CSpecialToolArea = 1 << 19,
  70. // CResizeMinXMinY = 1 << 20,
  71. // CResizeMidXMinY = 1 << 21,
  72. // CResizeMaxXMinY = 1 << 22,
  73. // CResizeMinXMidY = 1 << 23,
  74. // CResizeMaxXMaxY = 1 << 24,
  75. // CResizeMidXMaxY = 1 << 25,
  76. // CResizeMinXMaxY = 1 << 26,
  77. // CResizeMaxXMidY = 1 << 27,
  78. //};
  79. @protocol CPDFDigtalViewDelegate;
  80. @interface CPDFDigtalView : CPDFView
  81. @property (nonatomic, assign) CAnnotationType annotationType;
  82. @property (nonatomic, readonly) CPDFAnnotation * activeAnnotation;
  83. @property (nonatomic, retain) NSMutableArray *activeAnnotations;
  84. @property (nonatomic, retain) NSMutableArray *selectAnnotations;
  85. @property (nonatomic, assign) id<CPDFDigtalViewDelegate>pdfListViewDelegate;
  86. @property (nonatomic, retain) NSArray *signatures;
  87. @end
  88. @protocol CPDFDigtalViewDelegate <NSObject>
  89. @optional
  90. - (void)PDFListViewAddAnnotation:(CPDFDigtalView *)pdfListView forAddAnnotation:(CPDFAnnotation *)annotation inPage:(CPDFPage *)pdfPage;
  91. - (void)PDFListViewEditAnnotation:(CPDFDigtalView *)pdfListView forAnnotation:(CPDFAnnotation *)anotation;
  92. @end