|
@@ -27,6 +27,20 @@
|
|
|
return self;
|
|
|
}
|
|
|
|
|
|
+- (NSSet *)keysForValuesToObserveForUndo {
|
|
|
+ static NSSet *keys = nil;
|
|
|
+ if (keys == nil)
|
|
|
+ keys = [[NSSet alloc] initWithObjects:CPDFAnnotationBoundsKey,
|
|
|
+ CPDFAnnotationContentKey,
|
|
|
+ CPDFAnnotationborderWidthKey,
|
|
|
+ CPDFAnnotationBorderKey,
|
|
|
+ CPDFAnnotationOpacityKey,
|
|
|
+ CPDFAnnotationColorKey,
|
|
|
+ CPDFAnnotationModificationDateKey,
|
|
|
+ CPDFAnnotationUserNameKey, nil];
|
|
|
+ return keys;
|
|
|
+}
|
|
|
+
|
|
|
- (void)drawSelectionHighlightForView:(CPDFListView *)pdfView inContext:(CGContextRef)context isHover:(BOOL)isHover {
|
|
|
if (NSIsEmptyRect([self bounds]))
|
|
|
return;
|
|
@@ -79,35 +93,10 @@
|
|
|
return [self isResizable] ? CPDFListViewResizeHandleForPointFromRect(point, rect, 4.0 / scaleFactor) : 0;
|
|
|
}
|
|
|
|
|
|
-- (CGSize)fetchFormMinSizeValueVia {
|
|
|
- if ([self isKindOfClass:[CPDFButtonWidgetAnnotation class]]) {
|
|
|
- if ([(CPDFButtonWidgetAnnotation *)self controlType] == CPDFWidgetPushButtonControl) {
|
|
|
- return CGSizeMake(8.0, 8.0);
|
|
|
- }
|
|
|
- return CGSizeMake(2, 2);
|
|
|
- } else {
|
|
|
- return CGSizeMake(8.0, 8.0);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
- (BOOL)hitTest:(NSPoint)point {
|
|
|
return [self shouldDisplay] ? NSPointInRect(point, [self bounds]) : NO;
|
|
|
}
|
|
|
|
|
|
-- (NSSet *)keysForValuesToObserveForUndo {
|
|
|
- static NSSet *keys = nil;
|
|
|
- if (keys == nil)
|
|
|
- keys = [[NSSet alloc] initWithObjects:CPDFAnnotationBoundsKey,
|
|
|
- CPDFAnnotationContentKey,
|
|
|
- CPDFAnnotationborderWidthKey,
|
|
|
- CPDFAnnotationBorderKey,
|
|
|
- CPDFAnnotationOpacityKey,
|
|
|
- CPDFAnnotationColorKey,
|
|
|
- CPDFAnnotationModificationDateKey,
|
|
|
- CPDFAnnotationUserNameKey, nil];
|
|
|
- return keys;
|
|
|
-}
|
|
|
-
|
|
|
- (CPDFBorderStyle)borderStyle {
|
|
|
return [[self border] style];
|
|
|
}
|
|
@@ -139,4 +128,8 @@
|
|
|
[self setBorder:border];
|
|
|
}
|
|
|
|
|
|
+- (NSString *)toolTipsString {
|
|
|
+ return self.contents?:@"";
|
|
|
+}
|
|
|
+
|
|
|
@end
|