KMPDFEditAppendWindow.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // KMPDFEditAppendWindow.h
  3. // PDF Reader
  4. //
  5. // Created by 丁林圭 on 2017/5/11.
  6. // Copyright © 2017年 zhangjie. All rights reserved.
  7. //
  8. #import <Cocoa/Cocoa.h>
  9. #import <Quartz/Quartz.h>
  10. #import <ComPDFKit/ComPDFKit.h>
  11. @interface KMPDFEditAppendTabelViewCell :NSTableCellView
  12. @end
  13. #define moniker(x) ((x) >= 1024 ? ((x) < 1048576 ? 'M':'G'):'K')
  14. #define truesize(x) ( (x) >= 1024 ?( (x) < 1048576 ? (x)/1024.0 : (x)/1048576.0) : (x))
  15. typedef NS_OPTIONS(NSUInteger, KMPDFPageEditType) {
  16. KMPDFPageEditAppend = 1 ,
  17. KMPDFPageEditMerge ,
  18. };
  19. @interface KMPDFEditAppendWindow : NSWindowController
  20. @property (nonatomic, strong) NSURL *oriDucumentUrl;
  21. @property (nonatomic,copy) void (^saveAsPDFFilePath) (NSString *filePath);
  22. - (id)initWithFilePaths:(NSArray *)files;
  23. - (id)initWithPDFDocument:(PDFDocument *)document password:(NSString *)password;
  24. - (void)beginSheetModalForWindow:(NSWindow *)window completionHandler:(void (^)(BOOL isSuccessfully ,NSIndexSet * selectedIndexSet))handler;
  25. @end
  26. @interface KMPDFEditAppendWindow(KMExtension)
  27. - (BOOL)mergeCountIsReach;
  28. - (void)recordMergeCount;
  29. - (void)clearMergeCount;
  30. - (NSInteger)getMergeCount;
  31. @end