Browse Source

【2025】【ComPDFKit库】支持设置内容编辑时选中效果

dinglingui 3 months ago
parent
commit
0e7006bd73

+ 14 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFListViewExtension/CPDFListView+CPDFEditArea.swift

@@ -179,8 +179,21 @@ extension CPDFListView {
         
         self.editingConfig().isShowMouseAreaHover = true
         
+        // 设置选中时为空心矩形
+        self.editingConfig().zoomPointType = .hollowRectangle
+        
+        // 设置选中时为空心矩形的宽度
+        self.editingConfig().editingCenterBorderWidth = 2
+        
+        // 设置选中时为空心矩形的大小
+        self.editingConfig().editingCenterRadius = 4
+
         // 边框颜色
-        self.editingConfig().mouseHoverBorderColor = NSColor(hex: "#999999")
+        self.editingConfig().mouseHoverBorderColor = CPDFListViewConfig.defaultManager.annotationBorderColor
+        
+        // 设置选中的边框颜色
+        self.editingConfig().editingSelectionBorderColor = CPDFListViewConfig.defaultManager.annotationBorderColor;
+
         // 边框虚线设置
         self.editingConfig().mouseHoverBorderDashPattern = [3,3,3]
         // 块填充颜色(拖拽中)

BIN
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/ComPDFKit


+ 15 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFView+Editing.h

@@ -45,6 +45,11 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
     CEditingSelectStateEditSelectText,
 };
 
+typedef NS_OPTIONS(NSInteger, CEditingAreaSelectBorderZoomPointType) {
+    CEditingAreaSelectBorderZoomPointSolidCircleType = 0,
+    CEditingAreaSelectBorderZoomPointHollowRectangle,
+};
+
 #pragma mark - CEditAttributes
 
 @interface CEditAttributes : NSObject
@@ -104,6 +109,16 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
  */
 @property (nonatomic,assign) BOOL isShowEditingAreaItemHover;
 
+/**
+ * Editing Area Select Border Zoom Point Type Setting
+ */
+@property (nonatomic,assign) CEditingAreaSelectBorderZoomPointType zoomPointType;
+
+/**
+ * Border width of the dotted box Zoom Point
+ */
+@property (nonatomic,strong) NSNumber *editingCenterBorderWidth;
+
 /* *
  * Whether to support hover changes when moving the mouse
  */

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/_CodeSignature/CodeResources

@@ -1032,11 +1032,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			eayhjbUmHDGFaPd0Sr0xpyGwgBI=
+			AZ5JiF1dsxteFtBaJpAGmT39St8=
 			</data>
 			<key>hash2</key>
 			<data>
-			99dPFjYQSGUERBJZCpeOJDxEtH7FNP7OixTjIE/zxcg=
+			BryT3o/tAhRVoNWfirmomjUA3hk2UZh1GzAkbjATS5w=
 			</data>
 		</dict>
 		<key>Headers/CPDFView+Utilities.h</key>