Преглед изворни кода

Merge branch 'develop_ocToSwift' of git.kdan.cc:Mac_PDF/PDF_Office into develop_ocToSwift

tangchao пре 1 година
родитељ
комит
e8840a4f04
20 измењених фајлова са 307 додато и 409 уклоњено
  1. 24 34
      PDF Office/PDF Master.xcodeproj/project.pbxproj
  2. 30 14
      PDF Office/PDF Master.xcodeproj/xcuserdata/kdanwj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 0 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/AppKitCategories/NSCursor+PDFListView.m
  4. 6 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationModel.m
  5. 0 27
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation+Private.h
  6. 0 20
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation.h
  7. 0 86
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation.m
  8. 87 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation.swift
  9. 0 29
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation+Private.h
  10. 0 20
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation.h
  11. 0 109
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation.m
  12. 106 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation.swift
  13. 7 4
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m
  14. 0 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m
  15. 0 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Extension.m
  16. 0 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/ComPDFUIKit.h
  17. 0 1
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMCustomButtonPopMenuViewController.m
  18. 0 12
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.h
  19. 0 45
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.m
  20. 47 0
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.swift

+ 24 - 34
PDF Office/PDF Master.xcodeproj/project.pbxproj

@@ -112,9 +112,6 @@
 		89752DB32936F505003FF08E /* KMCustomButtonPopMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89752DAF2936F505003FF08E /* KMCustomButtonPopMenuViewController.m */; };
 		89752DB42936F505003FF08E /* KMCustomButtonPopMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89752DAF2936F505003FF08E /* KMCustomButtonPopMenuViewController.m */; };
 		89752DB52936F505003FF08E /* KMCustomButtonPopMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89752DAF2936F505003FF08E /* KMCustomButtonPopMenuViewController.m */; };
-		89752DC22937033F003FF08E /* KMPopMenuButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 89752DC12937033F003FF08E /* KMPopMenuButtonCell.m */; };
-		89752DC32937033F003FF08E /* KMPopMenuButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 89752DC12937033F003FF08E /* KMPopMenuButtonCell.m */; };
-		89752DC42937033F003FF08E /* KMPopMenuButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 89752DC12937033F003FF08E /* KMPopMenuButtonCell.m */; };
 		89752DEA293875FC003FF08E /* KMMainToolbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89752DE8293875FC003FF08E /* KMMainToolbarController.swift */; };
 		89752DEB293875FC003FF08E /* KMMainToolbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89752DE8293875FC003FF08E /* KMMainToolbarController.swift */; };
 		89752DEC293875FC003FF08E /* KMMainToolbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89752DE8293875FC003FF08E /* KMMainToolbarController.swift */; };
@@ -991,6 +988,15 @@
 		9FCFEC702AC40F9B00EAD2CB /* CStampSignatureObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC6F2AC40F9B00EAD2CB /* CStampSignatureObject.swift */; };
 		9FCFEC712AC40F9B00EAD2CB /* CStampSignatureObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC6F2AC40F9B00EAD2CB /* CStampSignatureObject.swift */; };
 		9FCFEC722AC40F9B00EAD2CB /* CStampSignatureObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC6F2AC40F9B00EAD2CB /* CStampSignatureObject.swift */; };
+		9FCFEC742AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC732AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift */; };
+		9FCFEC752AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC732AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift */; };
+		9FCFEC762AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC732AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift */; };
+		9FCFEC7C2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC7B2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift */; };
+		9FCFEC7D2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC7B2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift */; };
+		9FCFEC7E2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC7B2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift */; };
+		9FCFEC802AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC7F2AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift */; };
+		9FCFEC812AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC7F2AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift */; };
+		9FCFEC822AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCFEC7F2AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift */; };
 		9FD0FA2929CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
 		9FD0FA2A29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
 		9FD0FA2B29CD3ED400F2AB0D /* KMRightSideEmptyVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */; };
@@ -3204,9 +3210,6 @@
 		F305A2B429D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F305A2B329D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m */; };
 		F305A2B529D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F305A2B329D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m */; };
 		F305A2B629D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F305A2B329D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m */; };
-		F344A3B4293094DB003A4383 /* CPDFListSignatureAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = F344A3B2293094DB003A4383 /* CPDFListSignatureAnnotation.m */; };
-		F344A3B5293094DB003A4383 /* CPDFListSignatureAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = F344A3B2293094DB003A4383 /* CPDFListSignatureAnnotation.m */; };
-		F344A3B6293094DB003A4383 /* CPDFListSignatureAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = F344A3B2293094DB003A4383 /* CPDFListSignatureAnnotation.m */; };
 		F34BF92129530320002C25A2 /* NSString+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F34BF92029530320002C25A2 /* NSString+PDFListView.m */; };
 		F34BF92229530320002C25A2 /* NSString+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F34BF92029530320002C25A2 /* NSString+PDFListView.m */; };
 		F34BF92329530320002C25A2 /* NSString+PDFListView.m in Sources */ = {isa = PBXBuildFile; fileRef = F34BF92029530320002C25A2 /* NSString+PDFListView.m */; };
@@ -3327,9 +3330,6 @@
 		F3732323292DFFFE0013862C /* CPDFListView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = F3732322292DFFFE0013862C /* CPDFListView+Extension.m */; };
 		F3732324292DFFFE0013862C /* CPDFListView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = F3732322292DFFFE0013862C /* CPDFListView+Extension.m */; };
 		F3732325292DFFFE0013862C /* CPDFListView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = F3732322292DFFFE0013862C /* CPDFListView+Extension.m */; };
-		F373232E292F78210013862C /* CPDFListStampAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = F3732328292F78200013862C /* CPDFListStampAnnotation.m */; };
-		F373232F292F78210013862C /* CPDFListStampAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = F3732328292F78200013862C /* CPDFListStampAnnotation.m */; };
-		F3732330292F78210013862C /* CPDFListStampAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = F3732328292F78200013862C /* CPDFListStampAnnotation.m */; };
 		F386CEFC29361E2D00C44524 /* CPDFListViewConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = F386CEFB29361E2D00C44524 /* CPDFListViewConfig.m */; };
 		F386CEFD29361E2D00C44524 /* CPDFListViewConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = F386CEFB29361E2D00C44524 /* CPDFListViewConfig.m */; };
 		F386CEFE29361E2D00C44524 /* CPDFListViewConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = F386CEFB29361E2D00C44524 /* CPDFListViewConfig.m */; };
@@ -3558,8 +3558,6 @@
 		89752DAD2936F505003FF08E /* KMCustomButtonPopMenuViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMCustomButtonPopMenuViewController.xib; sourceTree = "<group>"; };
 		89752DAE2936F505003FF08E /* KMCustomButtonPopMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMCustomButtonPopMenuViewController.h; sourceTree = "<group>"; };
 		89752DAF2936F505003FF08E /* KMCustomButtonPopMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMCustomButtonPopMenuViewController.m; sourceTree = "<group>"; };
-		89752DC02937033F003FF08E /* KMPopMenuButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMPopMenuButtonCell.h; sourceTree = "<group>"; };
-		89752DC12937033F003FF08E /* KMPopMenuButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMPopMenuButtonCell.m; sourceTree = "<group>"; };
 		89752DE8293875FC003FF08E /* KMMainToolbarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMMainToolbarController.swift; sourceTree = "<group>"; };
 		89752DE9293875FC003FF08E /* KMMainToolbarController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMMainToolbarController.xib; sourceTree = "<group>"; };
 		89752DF029389F81003FF08E /* KMToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMToolbarItem.m; sourceTree = "<group>"; };
@@ -3930,6 +3928,9 @@
 		9FCFEC672AC2EAD500EAD2CB /* CPDFListViewColorMenuItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CPDFListViewColorMenuItemView.swift; sourceTree = "<group>"; };
 		9FCFEC6B2AC3D96800EAD2CB /* CPDFListViewAnimatedBorderlessWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CPDFListViewAnimatedBorderlessWindow.swift; sourceTree = "<group>"; };
 		9FCFEC6F2AC40F9B00EAD2CB /* CStampSignatureObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CStampSignatureObject.swift; sourceTree = "<group>"; };
+		9FCFEC732AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CPDFListStampAnnotation.swift; sourceTree = "<group>"; };
+		9FCFEC7B2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CPDFListSignatureAnnotation.swift; sourceTree = "<group>"; };
+		9FCFEC7F2AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPopMenuButtonCell.swift; sourceTree = "<group>"; };
 		9FD0FA2729CD3ED400F2AB0D /* KMRightSideEmptyVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMRightSideEmptyVC.swift; sourceTree = "<group>"; };
 		9FD0FA2829CD3ED400F2AB0D /* KMRightSideEmptyVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = KMRightSideEmptyVC.xib; sourceTree = "<group>"; };
 		9FD0FA2F29CD947000F2AB0D /* KMOpacityPanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMOpacityPanel.swift; sourceTree = "<group>"; };
@@ -4811,9 +4812,6 @@
 		BBFE6E86293210AB00142C01 /* KMCompressCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompressCellView.swift; sourceTree = "<group>"; };
 		F305A2B229D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CPDFSignatureAnnotation+PDFListView.h"; sourceTree = "<group>"; };
 		F305A2B329D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CPDFSignatureAnnotation+PDFListView.m"; sourceTree = "<group>"; };
-		F344A3B2293094DB003A4383 /* CPDFListSignatureAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPDFListSignatureAnnotation.m; sourceTree = "<group>"; };
-		F344A3B3293094DB003A4383 /* CPDFListSignatureAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPDFListSignatureAnnotation.h; sourceTree = "<group>"; };
-		F344A3B72930950D003A4383 /* CPDFListSignatureAnnotation+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPDFListSignatureAnnotation+Private.h"; sourceTree = "<group>"; };
 		F34BF91F29530320002C25A2 /* NSString+PDFListView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+PDFListView.h"; sourceTree = "<group>"; };
 		F34BF92029530320002C25A2 /* NSString+PDFListView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+PDFListView.m"; sourceTree = "<group>"; };
 		F34BF924295303E8002C25A2 /* NSCursor+PDFListView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSCursor+PDFListView.h"; sourceTree = "<group>"; };
@@ -4893,9 +4891,6 @@
 		F37322DA292DF9410013862C /* CPDFTextAnnotation+PDFListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CPDFTextAnnotation+PDFListView.m"; sourceTree = "<group>"; };
 		F3732321292DFFFE0013862C /* CPDFListView+Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CPDFListView+Extension.h"; sourceTree = "<group>"; };
 		F3732322292DFFFE0013862C /* CPDFListView+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "CPDFListView+Extension.m"; sourceTree = "<group>"; };
-		F3732328292F78200013862C /* CPDFListStampAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CPDFListStampAnnotation.m; sourceTree = "<group>"; };
-		F373232A292F78210013862C /* CPDFListStampAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CPDFListStampAnnotation.h; sourceTree = "<group>"; };
-		F3732336292F85B90013862C /* CPDFListStampAnnotation+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CPDFListStampAnnotation+Private.h"; sourceTree = "<group>"; };
 		F386CEFA29361E2D00C44524 /* CPDFListViewConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFListViewConfig.h; sourceTree = "<group>"; };
 		F386CEFB29361E2D00C44524 /* CPDFListViewConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDFListViewConfig.m; sourceTree = "<group>"; };
 		F3A9DC7B294309D80074E5D2 /* CPDFListEditAnnotationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDFListEditAnnotationViewController.h; sourceTree = "<group>"; };
@@ -5167,11 +5162,10 @@
 				89752DAE2936F505003FF08E /* KMCustomButtonPopMenuViewController.h */,
 				89752DAF2936F505003FF08E /* KMCustomButtonPopMenuViewController.m */,
 				89752DAD2936F505003FF08E /* KMCustomButtonPopMenuViewController.xib */,
-				89752DC02937033F003FF08E /* KMPopMenuButtonCell.h */,
-				89752DC12937033F003FF08E /* KMPopMenuButtonCell.m */,
 				89752D992936E675003FF08E /* KMToolBarBox.swift */,
 				9FDD0FB5295D5230000C4DAD /* KMToolbarController.swift */,
 				9FDD0FB6295D5230000C4DAD /* KMToolbarController.xib */,
+				9FCFEC7F2AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift */,
 			);
 			path = Toolbar;
 			sourceTree = "<group>";
@@ -9116,9 +9110,7 @@
 		F344A3B1293094DB003A4383 /* Signature */ = {
 			isa = PBXGroup;
 			children = (
-				F344A3B72930950D003A4383 /* CPDFListSignatureAnnotation+Private.h */,
-				F344A3B3293094DB003A4383 /* CPDFListSignatureAnnotation.h */,
-				F344A3B2293094DB003A4383 /* CPDFListSignatureAnnotation.m */,
+				9FCFEC7B2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift */,
 			);
 			path = Signature;
 			sourceTree = "<group>";
@@ -9264,10 +9256,8 @@
 		F3732326292F78200013862C /* Stamp */ = {
 			isa = PBXGroup;
 			children = (
-				F3732336292F85B90013862C /* CPDFListStampAnnotation+Private.h */,
-				F373232A292F78210013862C /* CPDFListStampAnnotation.h */,
-				F3732328292F78200013862C /* CPDFListStampAnnotation.m */,
 				9FCFEC6F2AC40F9B00EAD2CB /* CStampSignatureObject.swift */,
+				9FCFEC732AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift */,
 			);
 			path = Stamp;
 			sourceTree = "<group>";
@@ -10603,7 +10593,6 @@
 				BB8F4547295A9CDC0037EA22 /* KMHeaderFooterListController.swift in Sources */,
 				F3D547B429568CC300AA3953 /* ComPDFUIConfig.m in Sources */,
 				9F0CB5012986560D00007028 /* KMDesignToken+BorderTop.swift in Sources */,
-				F344A3B4293094DB003A4383 /* CPDFListSignatureAnnotation.m in Sources */,
 				89DB5DA9291B8DE70029624F /* KMOutlineEditViewController.swift in Sources */,
 				BB6DD80C29347F77001F0544 /* KMSecureEncryptWindowController.swift in Sources */,
 				F3732311292DF9410013862C /* CPDFSignatureWidgetAnnotation+PDFListView.m in Sources */,
@@ -10682,7 +10671,6 @@
 				89752DF62938A236003FF08E /* PublicKey.swift in Sources */,
 				89E4E73E2964160F002DBA6F /* KMAnnotationLinkViewController.m in Sources */,
 				BBC3480C29558DC1008D2CD1 /* KMBackgroundController.swift in Sources */,
-				F373232E292F78210013862C /* CPDFListStampAnnotation.m in Sources */,
 				89E4E7792967B370002DBA6F /* KMDynamicStampViewController.m in Sources */,
 				9FBC48B8299B44C600CA39D7 /* KMSecondaryViewController.m in Sources */,
 				BBC348142955920B008D2CD1 /* KMBackgroundPropertyController.swift in Sources */,
@@ -10702,6 +10690,7 @@
 				ADAC0DE52AC2B04900FD4F52 /* KMNoteTypeImageView.swift in Sources */,
 				9F8539BE2943085A00DF644E /* KMBrowser.swift in Sources */,
 				89D9896C28FD50EF003A3E87 /* KMAnnotationCollectionViewItem.swift in Sources */,
+				9FCFEC742AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift in Sources */,
 				BB86C1ED28F544F4005AD968 /* CPDFListView+Event.m in Sources */,
 				BB88E454294045B4002B3655 /* KMPDFConvertManager.swift in Sources */,
 				ADC075EA2987A38C006C752F /* KMBatchConverPDFCSVView.swift in Sources */,
@@ -10860,9 +10849,10 @@
 				ADC075D929876612006C752F /* KMBatchConverPDFPPTView.swift in Sources */,
 				89E4E755296427E5002DBA6F /* NSImage_SKExtensions.m in Sources */,
 				BB6DD821293497B6001F0544 /* KMSecureEncryptModel.swift in Sources */,
-				89752DC22937033F003FF08E /* KMPopMenuButtonCell.m in Sources */,
 				ADBC373229CA95AA00D93208 /* KMComparativeModel.swift in Sources */,
+				9FCFEC802AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */,
 				F36EB6C92987C9FE004C25FB /* KMDocumentAIViewController.m in Sources */,
+				9FCFEC7C2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */,
 				ADD1B6E42946C00800C3FFF7 /* KMPrintChoosePageSizePosterView.swift in Sources */,
 				9F1FE4BA29406E4700E952CA /* NSImage+CTAdditions.m in Sources */,
 				BB6B4C08292F53CE0071CA06 /* KMMergeFileModel.swift in Sources */,
@@ -11372,6 +11362,7 @@
 				BBA19F4429ADE6A3001A285A /* KMBookMarkRowView.swift in Sources */,
 				BB32BF242A5EA05900D11348 /* KMAnalytics.swift in Sources */,
 				ADC075E2298766D9006C752F /* KMBatchConverPDFImageView.swift in Sources */,
+				9FCFEC812AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */,
 				BB89723B294B3C840045787C /* KMWatermarkPropertyController.swift in Sources */,
 				9FA607DF28FD4C9F00B46586 /* KMHomePopViewController.swift in Sources */,
 				BBC3484F29582920008D2CD1 /* KMBackgroundColorView.swift in Sources */,
@@ -11387,7 +11378,6 @@
 				BBFE6E88293210AB00142C01 /* KMCompressCellView.swift in Sources */,
 				899700F728F4051B009AF911 /* KMAnnotationViewController.swift in Sources */,
 				9F1FE4C429406E4700E952CA /* CTPageTransition.c in Sources */,
-				F373232F292F78210013862C /* CPDFListStampAnnotation.m in Sources */,
 				BBB9B311299A5D6D004F3235 /* KMCloudDownloadOperationQueue.m in Sources */,
 				ADBC375529CAE94700D93208 /* KMComparativeOutlineSectionCell.swift in Sources */,
 				BB1EC80D2967DFE800EC0BC3 /* NSNumber_SKExtensions.m in Sources */,
@@ -11470,7 +11460,6 @@
 				ADB1FE8729752F4C00ED072D /* KMBatchWatermarkView.swift in Sources */,
 				ADCB98C62924730000B51A03 /* KMBatchProcessingTableViewModel.swift in Sources */,
 				89D2D2DF294C451400BFF5FE /* KMThumbnailViewController.swift in Sources */,
-				F344A3B5293094DB003A4383 /* CPDFListSignatureAnnotation.m in Sources */,
 				89752DF72938A236003FF08E /* PublicKey.swift in Sources */,
 				9F1FE4D329406E4700E952CA /* CTTabView.m in Sources */,
 				BB31981B2AC567B600107371 /* CPDFSelection+PDFListView.swift in Sources */,
@@ -11564,6 +11553,7 @@
 				89752E1E2942CB04003FF08E /* KMSearchMode.swift in Sources */,
 				AD3A3588294C11ED00D72802 /* KMPrintPreviewPresenter.swift in Sources */,
 				BB49ED1A293F4D4E00C82CA2 /* KMConvertCSVSettingView.swift in Sources */,
+				9FCFEC7D2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */,
 				ADE3C1C229A4C13700793B13 /* KMPrintAccessoryController_OC.m in Sources */,
 				F305A2B529D03D0D00463590 /* CPDFSignatureAnnotation+PDFListView.m in Sources */,
 				89752E1A2941FD48003FF08E /* KMSearchCellView.swift in Sources */,
@@ -11675,7 +11665,6 @@
 				F3732303292DF9410013862C /* CPDFLinkAnnotation+PDFListView.m in Sources */,
 				9FAAA326290A69920046FFCE /* KMToolSetScroller.swift in Sources */,
 				ADB1FE7F29752F2900ED072D /* KMBatchSecurityView.swift in Sources */,
-				89752DC32937033F003FF08E /* KMPopMenuButtonCell.m in Sources */,
 				BB89724E294C1DCE0045787C /* KMWatermarkAdjectiveListTableCellView.swift in Sources */,
 				BB14700F299DC0D100784A6A /* OIDScopes.m in Sources */,
 				9F0CB52E298656D900007028 /* KMDesignToken+BorderWidthRight.swift in Sources */,
@@ -11810,6 +11799,7 @@
 				BB332D542995D8B500CABB58 /* KMCloudDocumentTools.swift in Sources */,
 				89316838296E436B0073EA59 /* NSImage+CustomImage.m in Sources */,
 				BBA93D3429BF0ECE0044E0DD /* SKKeychain.m in Sources */,
+				9FCFEC752AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift in Sources */,
 				9F0CB5162986566D00007028 /* KMDesignToken+BorderRadiusTopLeft.swift in Sources */,
 				AD867F8729D94F5100F00440 /* KMBOTAOutlineView.swift in Sources */,
 				9F0CB536298656F900007028 /* KMDesignToken+BorderWidthLeft.swift in Sources */,
@@ -12302,6 +12292,7 @@
 				AD4B454F294072B90076FA14 /* KMOCRWindowController.swift in Sources */,
 				9F1FE50729406E4700E952CA /* CTTabStripDragController.m in Sources */,
 				BB146FEC299DC0D100784A6A /* GTLRDuration.m in Sources */,
+				9FCFEC762AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift in Sources */,
 				9F1FE4D129406E4700E952CA /* CTTabController.m in Sources */,
 				9F8539E029470A0700DF644E /* KMTabStripView.swift in Sources */,
 				BBA8B7AC2935DC120097D183 /* KMRemovePasswordResultTipView.swift in Sources */,
@@ -12461,7 +12452,6 @@
 				F3732313292DF9410013862C /* CPDFSignatureWidgetAnnotation+PDFListView.m in Sources */,
 				BB897258294C559F0045787C /* KMWatermarkPropertyCreateController.swift in Sources */,
 				89E93EFC299CB4C200F10F66 /* KMOCRBox.m in Sources */,
-				F3732330292F78210013862C /* CPDFListStampAnnotation.m in Sources */,
 				9F0CB5132986565700007028 /* KMDesignToken+BorderRadius.swift in Sources */,
 				BB86C1F428F54535005AD968 /* CPDFListView+KeyEvent.m in Sources */,
 				BBB9B321299A5D6D004F3235 /* KMGoogleDriveManager.m in Sources */,
@@ -12486,7 +12476,6 @@
 				BB3198182AC55E6D00107371 /* CPDFDocument+KMExtension.swift in Sources */,
 				BB147037299DC0D200784A6A /* OIDRegistrationResponse.m in Sources */,
 				9F221ED929A9EC0900978A59 /* KMFillSignTextPanel.swift in Sources */,
-				89752DC42937033F003FF08E /* KMPopMenuButtonCell.m in Sources */,
 				9F0201742A1B488C00C9B673 /* KMAITranslationVC.swift in Sources */,
 				89E4E6F72963D1E9002DBA6F /* KMAnnotationPropertiesColorManager.m in Sources */,
 				ADCB98CB2924741B00B51A03 /* KMBatchProcessingView.swift in Sources */,
@@ -12620,6 +12609,7 @@
 				BBC348452956A638008D2CD1 /* KMEditBackgroundController.swift in Sources */,
 				9FDD0F79294FEF64000C4DAD /* KMConvertPDFManager.swift in Sources */,
 				9FDD0F7E2952F2D8000C4DAD /* KMBaseParser.swift in Sources */,
+				9FCFEC7E2AC579F600EAD2CB /* CPDFListSignatureAnnotation.swift in Sources */,
 				89E4E77B2967B370002DBA6F /* KMDynamicStampViewController.m in Sources */,
 				BB8115FD29924A5F0008F536 /* KMSecureEncryptCheckCellView.swift in Sources */,
 				9F78EFBD28F7C1CC001E66F4 /* KMHomeViewController.swift in Sources */,
@@ -12777,6 +12767,7 @@
 				BB31981C2AC567B600107371 /* CPDFSelection+PDFListView.swift in Sources */,
 				AD1CA4132A061CCD0070541F /* KMAnnotationScreenColorViewItem.swift in Sources */,
 				BB3198202AC57ACA00107371 /* CPDFPage+PDFListView.swift in Sources */,
+				9FCFEC822AD0E74C00EAD2CB /* KMPopMenuButtonCell.swift in Sources */,
 				BB2EDF4E296E63E5003BCF58 /* KMPageEditInsertCustomPageWindowController.swift in Sources */,
 				BBB7B48B2A033F6200B58A5A /* KMThumbnailView.swift in Sources */,
 				9FBA0EF728FFC8A0001117AF /* KMCollectionView.swift in Sources */,
@@ -12849,7 +12840,6 @@
 				BB89721A294AED6C0045787C /* KMWatermarkAdjectivePreViewBaseController.swift in Sources */,
 				AD4B454A293ED7DA0076FA14 /* KMImageToPDFManager.swift in Sources */,
 				BBB9B31B299A5D6D004F3235 /* KMCloudServer.m in Sources */,
-				F344A3B6293094DB003A4383 /* CPDFListSignatureAnnotation.m in Sources */,
 				BB4EEF4229764FCC003A3537 /* KMWatermarkColorView.swift in Sources */,
 				BB24D4A92977BE6700041659 /* KMRedactConfirmWindowController.swift in Sources */,
 				AD4B455829408CB00076FA14 /* KMOCRChooseView.swift in Sources */,

+ 30 - 14
PDF Office/PDF Master.xcodeproj/xcuserdata/kdanwj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -343,48 +343,64 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "386B4B8A-98CA-4321-94D8-768994D066C9"
+            uuid = "5B73AC7C-AEE7-47F5-9374-554E3443CD57"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Extension.m"
+            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CStampSignatureObject.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "82"
-            endingLineNumber = "82"
-            landmarkName = "-addPDFStampAnotationWithPagePoint:withPage:"
+            startingLineNumber = "163"
+            endingLineNumber = "163"
+            landmarkName = "init(dynamicText:dynamicDetailText:dynamicStyle:needExchangeFontSize:dynamicShape:)"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "5B73AC7C-AEE7-47F5-9374-554E3443CD57"
+            uuid = "EFCE422C-D0FB-4A07-A065-834B32FE15C4"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CStampSignatureObject.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "163"
-            endingLineNumber = "163"
-            landmarkName = "init(dynamicText:dynamicDetailText:dynamicStyle:needExchangeFontSize:dynamicShape:)"
+            startingLineNumber = "333"
+            endingLineNumber = "333"
+            landmarkName = "stampPreImage()"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "EFCE422C-D0FB-4A07-A065-834B32FE15C4"
+            uuid = "2663335F-67EF-4F61-8983-CEB488032570"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CStampSignatureObject.swift"
+            filePath = "PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "333"
-            endingLineNumber = "333"
-            landmarkName = "stampPreImage()"
+            startingLineNumber = "19"
+            endingLineNumber = "19"
+            landmarkName = "-drawTitle:withFrame:inView:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "FC6B2FFE-583F-4F48-B86F-C9A52C9A6360"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/Toolbar/KMCustomButtonPopMenuViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "30"
+            endingLineNumber = "30"
+            landmarkName = "+cellClass"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/AppKitCategories/NSCursor+PDFListView.m

@@ -16,7 +16,6 @@
 #import "CStringConstants.h"
 #import "NSUserDefaults+PDFListView.h"
 #import "CPDFListView.h"
-#import "CPDFListStampAnnotation+Private.h"
 #import "CPDFStampAnnotation+PDFListView.h"
 #import "CPDFAnnotationModel.h"
 

+ 6 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationModel.m

@@ -24,11 +24,16 @@
 
 #import "CSelfSignAnnotationFreeText.h"
 #import "CSelfSignAnnotation.h"
-#import "CPDFListSignatureAnnotation.h"
 
 #import "CStringConstants.h"
 #import "NSUserDefaults+PDFListView.h"
 
+#if VERSION_DMG
+#import <PDF_Master-Swift.h>
+#else
+#import <PDF_Master-Swift.h>
+#endif
+
 @interface CPDFAnnotationModel()
 
 @property (nonatomic,assign) CAnnotationType annotationType;

+ 0 - 27
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation+Private.h

@@ -1,27 +0,0 @@
-//
-//  CPDFView+Private.h
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import "CPDFListSignatureAnnotation.h"
-
-@interface CPDFListSignatureAnnotation ()
-
-@property (nonatomic,retain) CStampSignatureObject *stamp;
-
-@property (nonatomic,assign) NSInteger rotation;
-
-@property (nonatomic,assign) NSRect borderBounds;
-
-@property (nonatomic,retain) NSImage  *pImage;
-
-- (void)setBorderBoundsWithStamp:(CStampSignatureObject *)stamp;
-
-@end

+ 0 - 20
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation.h

@@ -1,20 +0,0 @@
-//
-//  CPDFListSignatureAnnotation.h
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import "CPDFListStampAnnotation.h"
-
-@class CPDFAnnotationModel;
-@class CStampSignatureObject;
-
-@interface CPDFListSignatureAnnotation : CPDFSignatureAnnotation
-
-@end

+ 0 - 86
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation.m

@@ -1,86 +0,0 @@
-//
-//  CPDFListSignatureAnnotation.m
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import "CPDFListSignatureAnnotation.h"
-#import "CPDFAnnotation+PDFListView.h"
-#import "CPDFListSignatureAnnotation+Private.h"
-
-#import "CPDFAnnotationModel.h"
-
-#if VERSION_DMG
-#import <PDF_Master-Swift.h>
-#else
-#import <PDF_Master-Swift.h>
-#endif
-
-@implementation CPDFListSignatureAnnotation
-
-- (NSSet *)keysForValuesToObserveForUndo {
-    NSMutableSet *mutableKeys = [NSMutableSet set];
-    mutableKeys = [[super keysForValuesToObserveForUndo] mutableCopy];
-    [mutableKeys addObject:@"rotate"];
-    return mutableKeys;
-}
-
-- (BOOL)isMovable { return YES; }
-
-- (BOOL)isResizable { return YES; }
-
-- (void)setRotation:(NSInteger)rotation {
-    if (rotation != 0 &&
-        rotation != 90 &&
-        rotation != 180 &&
-        rotation != 270) {
-        return;
-    }
-    _rotation = rotation;
-    NSRect bounds = self.borderBounds;
-    bounds.origin.x = self.bounds.origin.x+(self.bounds.size.width-bounds.size.width)/2.0;
-    bounds.origin.y = self.bounds.origin.y+(self.bounds.size.height-bounds.size.height)/2.0;
-    if (rotation == 90 ||
-        rotation == 270) {
-        self.bounds = NSMakeRect(bounds.origin.x+(bounds.size.width-bounds.size.height)/2.0,
-                                 bounds.origin.y-(bounds.size.width-bounds.size.height)/2.0,
-                                 bounds.size.height, bounds.size.width);
-    } else {
-        self.bounds = bounds;
-    }
-    
-    if (self.stamp.isSignatureAnnotation) {
-        [self updateAppearanceStreamWithImage:self.pImage rotation:rotation];
-    }
-}
-
-- (void)setBorderBoundsWithStamp:(CStampSignatureObject *)stamp {
-    self.stamp = stamp;
-    self.borderBounds = self.bounds;
-    if(self.stamp.isSignatureAnnotation) {
-        self.pImage = self.stamp.signatureImage;
-        
-        CGFloat borderDefaultWidth = self.pImage.size.width;
-        CGFloat borderScale = borderDefaultWidth/self.pImage.size.height;
-        CGPoint center = CGPointMake(self.bounds.origin.x+self.bounds.size.width/2, self.bounds.origin.y+self.bounds.size.height/2);
-        NSRect bounds = NSMakeRect(self.bounds.origin.x, self.bounds.origin.y, 0, 0);
-        if (self.bounds.size.width/self.bounds.size.height > borderScale) {
-            bounds.size.height = self.bounds.size.height;
-            bounds.size.width  = self.bounds.size.height*borderScale;
-        } else {
-            bounds.size.width  = self.bounds.size.width;
-            bounds.size.height = self.bounds.size.width/borderScale;
-        }
-        
-        self.bounds = CPDFListViewRectFromCenterAndSize(center, bounds.size);
-        self.borderBounds = self.bounds;
-    }
-}
-
-@end

+ 87 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Signature/CPDFListSignatureAnnotation.swift

@@ -0,0 +1,87 @@
+//
+//  CPDFListSignatureAnnotation.swift
+//  PDF Master
+//
+//  Created by wanjun on 2023/9/28.
+//
+
+import Cocoa
+
+class CPDFListSignatureAnnotation: CPDFSignatureAnnotation {
+    var stamp: CStampSignatureObject?
+    var _rotation: Int = 0
+    var borderBounds: NSRect = NSRect.zero
+    var pImage: NSImage?
+
+    override func keysForValuesToObserveForUndo() -> Set<AnyHashable>! {
+        var mutableKeys: Set<AnyHashable>
+        mutableKeys = super.keysForValuesToObserveForUndo()
+        mutableKeys = Set(mutableKeys)
+        mutableKeys.insert("rotate")
+        return mutableKeys
+    }
+    
+    override func isMovable() -> Bool {
+        return true
+    }
+    
+    override func isResizable() -> Bool {
+        return true
+    }
+    
+    @objc var rotation: Int {
+        get {
+            return _rotation
+        }
+        set {
+            guard [0, 90, 180, 270].contains(newValue) else {
+                return
+            }
+            
+            _rotation = newValue
+            
+            var bounds = self.borderBounds
+            bounds.origin.x = self.bounds.origin.x + (self.bounds.size.width - bounds.size.width) / 2.0
+            bounds.origin.y = self.bounds.origin.y + (self.bounds.size.height - bounds.size.height) / 2.0
+            
+            if newValue == 90 || newValue == 270 {
+                self.bounds = NSMakeRect(bounds.origin.x + (bounds.size.width - bounds.size.height) / 2.0,
+                                         bounds.origin.y - (bounds.size.width - bounds.size.height) / 2.0,
+                                         bounds.size.height, bounds.size.width)
+            } else {
+                self.bounds = bounds
+            }
+            
+            let isSignatureAnnotation: Bool = (self.stamp!.isSignatureAnnotation) as Bool
+            if isSignatureAnnotation {
+                self.updateAppearanceStream(with: self.pImage, rotation: newValue)
+            }
+        }
+    }
+    
+    @objc func setBorderBounds(stamp: CStampSignatureObject) {
+        self.stamp = stamp
+        self.borderBounds = self.bounds
+        
+        if self.stamp!.isSignatureAnnotation {
+            self.pImage = self.stamp?.signatureImage
+            
+            let borderDefaultWidth = self.pImage!.size.width
+            let borderScale = borderDefaultWidth / self.pImage!.size.height
+            let center = CGPoint(x: self.bounds.origin.x + self.bounds.size.width / 2, y: self.bounds.origin.y + self.bounds.size.height / 2)
+            var bounds = CGRect(x: self.bounds.origin.x, y: self.bounds.origin.y, width: 0, height: 0)
+            
+            if self.bounds.size.width / self.bounds.size.height > borderScale {
+                bounds.size.height = self.bounds.size.height
+                bounds.size.width = self.bounds.size.height * borderScale
+            } else {
+                bounds.size.width = self.bounds.size.width
+                bounds.size.height = self.bounds.size.width / borderScale
+            }
+            
+            self.bounds = CPDFListViewRectFromCenterAndSize(center, bounds.size)
+
+            self.borderBounds = self.bounds
+        }
+    }
+}

+ 0 - 29
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation+Private.h

@@ -1,29 +0,0 @@
-//
-//  CPDFView+Private.h
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import "CPDFListStampAnnotation.h"
-
-@interface CPDFListStampAnnotation ()
-
-@property (nonatomic,retain) CStampSignatureObject *stamp;
-
-@property (nonatomic,assign) NSInteger rotation;
-
-@property (nonatomic,assign) NSRect borderBounds;
-
-@property (nonatomic,retain) NSImage  *pImage;
-
-- (void)setBorderBoundsWithStamp:(CStampSignatureObject *)stamp;
-
-- (void)setBorderBoundsWithPImage:(NSImage *)image;
-
-@end

+ 0 - 20
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation.h

@@ -1,20 +0,0 @@
-//
-//  CPDFListStampAnnotation.h
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import "CPDFListView.h"
-
-@class CPDFAnnotationModel;
-@class CStampSignatureObject;
-
-@interface CPDFListStampAnnotation : CPDFStampAnnotation
-
-@end

+ 0 - 109
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation.m

@@ -1,109 +0,0 @@
-//
-//  CPDFListStampAnnotation.m
-//  ComPDFKit
-//
-//  Copyright © 2014-2022 PDF Technologies, Inc. All Rights Reserved.
-//
-//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
-//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
-//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
-//  This notice may not be removed from this file.
-//
-
-#import "CPDFListStampAnnotation.h"
-
-#import "CPDFListStampAnnotation+Private.h"
-#import "CPDFAnnotation+PDFListView.h"
-
-#import "CPDFAnnotationModel.h"
-#import "NSGeometry+PDFListView.h"
-
-#if VERSION_DMG
-#import <PDF_Master-Swift.h>
-#else
-#import <PDF_Master-Swift.h>
-#endif
-
-@implementation CPDFListStampAnnotation
-
-- (NSSet *)keysForValuesToObserveForUndo {
-    NSMutableSet *mutableKeys = [NSMutableSet set];
-    mutableKeys = [[super keysForValuesToObserveForUndo] mutableCopy];
-    [mutableKeys addObject:@"rotate"];
-    return mutableKeys;
-}
-
-- (void)setRotation:(NSInteger)rotation {
-    if (rotation != 0 &&
-        rotation != 90 &&
-        rotation != 180 &&
-        rotation != 270) {
-        return;
-    }
-    _rotation = rotation;
-    NSRect bounds = self.borderBounds;
-    bounds.origin.x = self.bounds.origin.x+(self.bounds.size.width-bounds.size.width)/2.0;
-    bounds.origin.y = self.bounds.origin.y+(self.bounds.size.height-bounds.size.height)/2.0;
-    if (rotation == 90 ||
-        rotation == 270) {
-        self.bounds = NSMakeRect(bounds.origin.x+(bounds.size.width-bounds.size.height)/2.0,
-                                 bounds.origin.y-(bounds.size.width-bounds.size.height)/2.0,
-                                 bounds.size.height, bounds.size.width);
-    } else {
-        self.bounds = bounds;
-    }
-    
-    if (CPDFStampTypeImage == self.stamp.stampCategoryType) {
-        [self updateAppearanceStreamWithImage:self.pImage rotation:rotation];
-    } else {
-        [self updateAppearanceStream:rotation];
-    }
-}
-
-- (void)setBorderBoundsWithStamp:(CStampSignatureObject *)stamp {
-    self.stamp = stamp;
-    self.borderBounds = self.bounds;
-    if(CPDFStampTypeImage == stamp.stampCategoryType) {
-        NSImage * image = [[NSImage alloc] initWithContentsOfFile:stamp.imagePath];
-        self.pImage = image;
-        
-        CGFloat borderDefaultWidth = image.size.width;
-        CGFloat borderScale = borderDefaultWidth/image.size.height;
-        CGPoint center = CGPointMake(self.bounds.origin.x+self.bounds.size.width/2, self.bounds.origin.y+self.bounds.size.height/2);
-        NSRect bounds = NSMakeRect(self.bounds.origin.x, self.bounds.origin.y, 0, 0);
-        if (self.bounds.size.width/self.bounds.size.height > borderScale) {
-            bounds.size.height = self.bounds.size.height;
-            bounds.size.width  = self.bounds.size.height*borderScale;
-        } else {
-            bounds.size.width  = self.bounds.size.width;
-            bounds.size.height = self.bounds.size.width/borderScale;
-        }
-        
-        self.bounds = CPDFListViewRectFromRightAndSize(center, bounds.size);
-        self.borderBounds = self.bounds;
-    }
-}
-
-- (void)setBorderBoundsWithPImage:(NSImage *)image {
-    if (!image) {
-        return;
-    }
-    
-    self.pImage = image;
-    
-    CGFloat borderDefaultWidth = image.size.width;
-    CGFloat borderScale = borderDefaultWidth/image.size.height;
-    
-    NSRect bounds = NSMakeRect(self.bounds.origin.x, self.bounds.origin.y, 0, 0);
-    if (self.bounds.size.width/self.bounds.size.height > borderScale) {
-        bounds.size.height = self.bounds.size.height;
-        bounds.size.width  = self.bounds.size.height*borderScale;
-    } else {
-        bounds.size.width  = self.bounds.size.width;
-        bounds.size.height = self.bounds.size.width/borderScale;
-    }
-    self.bounds = bounds;
-    self.borderBounds = self.bounds;
-}
-
-@end

+ 106 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Stamp/CPDFListStampAnnotation.swift

@@ -0,0 +1,106 @@
+//
+//  CPDFListStampAnnotation.swift
+//  PDF Master
+//
+//  Created by wanjun on 2023/9/28.
+//
+
+import Cocoa
+
+class CPDFListStampAnnotation: CPDFStampAnnotation {
+    
+    @objc var stamp: CStampSignatureObject?
+    var _rotation: Int = 0
+    var borderBounds: NSRect = NSRect.zero
+    @objc var pImage: NSImage?
+    
+    override func keysForValuesToObserveForUndo() -> Set<AnyHashable>! {
+        var mutableKeys: Set<AnyHashable>
+        mutableKeys = super.keysForValuesToObserveForUndo()
+        mutableKeys = Set(mutableKeys)
+        mutableKeys.insert("rotate")
+        return mutableKeys
+    }
+    
+    @objc var rotation: Int {
+        get {
+            return _rotation
+        }
+        set {
+            guard [0, 90, 180, 270].contains(newValue) else {
+                return
+            }
+            
+            _rotation = newValue
+            
+            var bounds = self.borderBounds
+            bounds.origin.x = self.bounds.origin.x + (self.bounds.size.width - bounds.size.width) / 2.0
+            bounds.origin.y = self.bounds.origin.y + (self.bounds.size.height - bounds.size.height) / 2.0
+            
+            if newValue == 90 || newValue == 270 {
+                self.bounds = NSMakeRect(bounds.origin.x + (bounds.size.width - bounds.size.height) / 2.0,
+                                         bounds.origin.y - (bounds.size.width - bounds.size.height) / 2.0,
+                                         bounds.size.height, bounds.size.width)
+            } else {
+                self.bounds = bounds
+            }
+            
+            if .image == self.stamp!.stampCategoryType {
+                self.updateAppearanceStream(with: self.pImage, rotation: newValue)
+            } else {
+                self.updateAppearanceStream(newValue)
+            }
+        }
+    }
+    
+    @objc func setBorderBounds(stamp: CStampSignatureObject) {
+        self.stamp = stamp
+        self.borderBounds = self.bounds
+        
+        if stamp.stampCategoryType == .image {
+            if let image = NSImage(contentsOfFile: stamp.imagePath) {
+                self.pImage = image
+                
+                let borderDefaultWidth = image.size.width
+                let borderScale = borderDefaultWidth / image.size.height
+                let center = CGPoint(x: self.bounds.origin.x + self.bounds.size.width / 2, y: self.bounds.origin.y + self.bounds.size.height / 2)
+                var bounds = NSRect(x: self.bounds.origin.x, y: self.bounds.origin.y, width: 0, height: 0)
+                
+                if self.bounds.size.width / self.bounds.size.height > borderScale {
+                    bounds.size.height = self.bounds.size.height
+                    bounds.size.width = self.bounds.size.height * borderScale
+                } else {
+                    bounds.size.width = self.bounds.size.width
+                    bounds.size.height = self.bounds.size.width / borderScale
+                }
+                
+                self.bounds = CPDFListViewRectFromRightAndSize(center, bounds.size)
+                self.borderBounds = self.bounds
+            }
+        }
+    }
+    
+    @objc func setBorderBounds(image: NSImage?) {
+        guard let image = image else {
+            return
+        }
+        
+        self.pImage = image
+        
+        let borderDefaultWidth = image.size.width
+        let borderScale = borderDefaultWidth / image.size.height
+        
+        var bounds = NSRect(x: self.bounds.origin.x, y: self.bounds.origin.y, width: 0, height: 0)
+        
+        if self.bounds.size.width / self.bounds.size.height > borderScale {
+            bounds.size.height = self.bounds.size.height
+            bounds.size.width = self.bounds.size.height * borderScale
+        } else {
+            bounds.size.width = self.bounds.size.width
+            bounds.size.height = self.bounds.size.width / borderScale
+        }
+        
+        self.bounds = bounds
+        self.borderBounds = self.bounds
+    }
+}

+ 7 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -29,9 +29,6 @@
 #import "NSImage+PDFListView.h"
 #import "NSCursor+PDFListView.h"
 
-#import "CPDFListStampAnnotation+Private.h"
-#import "CPDFListSignatureAnnotation+Private.h"
-
 #import "CPDFMarkupAnnotation+PDFListView.h"
 #import "CPDFButtonWidgetAnnotation+PDFListView.h"
 #import "CPDFTextWidgetAnnotation+PDFListView.h"
@@ -42,6 +39,12 @@
 #import "CPDFListView+Extension.h"
 #import <PDF_Master-Swift.h>
 
+#if VERSION_DMG
+#import <PDF_Master-Swift.h>
+#else
+#import <PDF_Master-Swift.h>
+#endif
+
 NSNotificationName const CPDFListViewSelectionChangedNotification = @"CPDFListViewSelectionChangedNotification";
 
 NSNotificationName const CPDFListViewToolModeChangeNotification = @"CPDFListViewToolModeChangeNotification";
@@ -624,7 +627,7 @@ NSNotificationName const CPDFListViewAnnotationsAttributeHasChangeNotification =
         
         CPDFListStampAnnotation *newAnnotation = [[CPDFListStampAnnotation alloc] initWithDocument:self.document image:image];
         newAnnotation.bounds = bounds;
-        [newAnnotation setBorderBoundsWithPImage:image];
+        [newAnnotation setBorderBoundsWithImage:image];
 
         [self addAnnotation:newAnnotation toPage:page];
         [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];

+ 0 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -27,7 +27,6 @@
 #import "CPDFAnnotation+PDFListView.h"
 #import "CPDFInkAnnotation+PDFListView.h"
 #import "CPDFLineAnnotation+PDFListView.h"
-#import "CPDFListStampAnnotation+Private.h"
 #import "CPDFMarkupAnnotation+PDFListView.h"
 #import "CSelfSignAnnotationFreeText.h"
 
@@ -35,7 +34,6 @@
 #import "CPDFAnnotationModel.h"
 #import "CStringConstants.h"
 #import "NSPopover+PDFListView.h"
-#import "CPDFListSignatureAnnotation.h"
 
 #import <PDF_Master-Swift.h>
 

+ 0 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Extension.m

@@ -13,8 +13,6 @@
 #import "CPDFListView+Extension.h"
 #import "CPDFListView+Private.h"
 #import "CPDFMarkupAnnotation+PDFListView.h"
-#import "CPDFListStampAnnotation+Private.h"
-#import "CPDFListSignatureAnnotation+Private.h"
 #import "NSGeometry+PDFListView.h"
 #import "CPDFAnnotation+PDFListView.h"
 #import <objc/runtime.h>

+ 0 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/ComPDFUIKit.h

@@ -17,8 +17,6 @@
 #import "CPDFAnnotationModel.h"
 #import "ComPDFUIConfig.h"
 
-#import "CPDFListStampAnnotation.h"
-#import "CPDFListSignatureAnnotation.h"
 #import "CPDFAnnotation+PDFListView.h"
 #import "CPDFInkAnnotation+PDFListView.h"
 #import "CPDFTextAnnotation+PDFListView.h"

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMCustomButtonPopMenuViewController.m

@@ -7,7 +7,6 @@
 
 #import "KMCustomButtonPopMenuViewController.h"
 #import <Masonry/Masonry.h>
-#import "KMPopMenuButtonCell.h"
 #import <PDF_Master-Swift.h>
 
 @interface KMPopMenuButton : NSButton

+ 0 - 12
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.h

@@ -1,12 +0,0 @@
-//
-//  KMPopMenuButtonCell.h
-//  SignFlow
-//
-//  Created by 丁林圭 on 2021/9/3.
-//
-
-#import <Cocoa/Cocoa.h>
-
-@interface KMPopMenuButtonCell : NSButtonCell
-
-@end

+ 0 - 45
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.m

@@ -1,45 +0,0 @@
-//
-//  KMPopMenuButtonCell.m
-//  SignFlow
-//
-//  Created by 丁林圭 on 2021/9/3.
-//
-
-#import "KMPopMenuButtonCell.h"
-
-@implementation KMPopMenuButtonCell
-
-- (NSRect)titleRectForBounds:(NSRect)rect {
-    CGRect rect1 = [super titleRectForBounds:rect];
-    return CGRectMake(21 + 5 + self.image.size.width, rect1.origin.y, self.attributedTitle.size.width, self.attributedTitle.size.height);
-}
-
-- (NSRect)drawTitle:(NSAttributedString *)title withFrame:(NSRect)frame inView:(NSView *)controlView
-{
-    if (![self isEnabled]) {
-        NSColor *txtColor = [NSColor colorWithRed:0 green:0 blue:0 alpha:0.8];
-
-        if (@available(macOS 10.14, *)) {
-            NSAppearanceName appearanceName = [[NSApp effectiveAppearance] bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
-            if ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]) {
-                txtColor = [NSColor colorWithWhite:1.0 alpha:0.5];
-                NSMutableAttributedString *myAttr = [[NSMutableAttributedString alloc] initWithAttributedString:title];
-                [myAttr addAttribute:NSForegroundColorAttributeName value:txtColor range:NSMakeRange(0, myAttr.length)];
-                
-                return [super drawTitle:myAttr withFrame:frame inView:controlView];
-            }
-        }
-   
-    }
-    return [super drawTitle:title withFrame:frame inView:controlView];
-}
-
-- (NSRect)imageRectForBounds:(NSRect)rect {
-    if (self.image) {
-        CGRect imageRect = [super imageRectForBounds:rect];
-        return CGRectMake(21, imageRect.origin.y, imageRect.size.width, imageRect.size.height);
-    }
-    return CGRectZero;
-}
-
-@end

+ 47 - 0
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMPopMenuButtonCell.swift

@@ -0,0 +1,47 @@
+//
+//  KMPopMenuButtonCell.swift
+//  PDF Master
+//
+//  Created by wanjun on 2023/10/7.
+//
+
+import Cocoa
+
+class KMPopMenuButtonCell: NSButtonCell {
+
+    override func titleRect(forBounds rect: NSRect) -> NSRect {
+        var rect1 = super.titleRect(forBounds: rect)
+        if ((self.image?.size.width) != nil) {
+            return CGRectMake(21 + 5 + (self.image?.size.width)!, rect1.origin.y, self.attributedTitle.size().width, self.attributedTitle.size().height)
+        } else {
+            return CGRectMake(21 + 5, rect1.origin.y, self.attributedTitle.size().width, self.attributedTitle.size().height)
+        }
+    }
+    
+    override func drawTitle(_ title: NSAttributedString, withFrame frame: NSRect, in controlView: NSView) -> NSRect {
+        if !isEnabled {
+            var txtColor = NSColor(red: 0, green: 0, blue: 0, alpha: 0.8)
+            
+            if #available(macOS 10.14, *) {
+                if let appearanceName = NSApp.effectiveAppearance.bestMatch(from: [.aqua, .darkAqua]) {
+                    if appearanceName == .darkAqua {
+                        txtColor = NSColor(white: 1.0, alpha: 0.5)
+                        let myAttr = NSMutableAttributedString(attributedString: title)
+                        myAttr.addAttribute(.foregroundColor, value: txtColor, range: NSRange(location: 0, length: myAttr.length))
+                        return super.drawTitle(myAttr, withFrame: frame, in: controlView)
+                    }
+                }
+            }
+        }
+        return super.drawTitle(title, withFrame: frame, in: controlView)
+    }
+    
+    override func imageRect(forBounds rect: NSRect) -> NSRect {
+        if let image = self.image {
+            var imageRect = super.imageRect(forBounds: rect)
+            imageRect.origin.x = 21
+            return imageRect
+        }
+        return NSRect.zero
+    }
+}