Revision: 3815
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3815&view=rev
Author:   hofman
Date:     2008-04-24 12:33:45 -0700 (Thu, 24 Apr 2008)

Log Message:
-----------
Implement accessibility proxy for annotations a bit more generic. 

Modified Paths:
--------------
    trunk/PDFAnnotation_SKExtensions.m
    trunk/PDFDisplayView_SKExtensions.h
    trunk/PDFDisplayView_SKExtensions.m
    trunk/SKPDFAnnotationFreeText.m
    trunk/SKPDFAnnotationNote.m
    trunk/SKPDFView.m
    trunk/Skim.xcodeproj/project.pbxproj

Added Paths:
-----------
    trunk/SKAccessibilityProxyElement.h
    trunk/SKAccessibilityProxyElement.m

Removed Paths:
-------------
    trunk/SKAccessibilityPDFAnnotationElement.h
    trunk/SKAccessibilityPDFAnnotationElement.m

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2008-04-24 19:04:11 UTC (rev 3814)
+++ trunk/PDFAnnotation_SKExtensions.m  2008-04-24 19:33:45 UTC (rev 3815)
@@ -578,6 +578,10 @@
     return [NSNumber numberWithBool:NO];
 }
 
+- (BOOL)accessibilityIsIgnored {
+    return [self shouldDisplay] == NO;
+}
+
 @end
 
 #pragma mark -
@@ -635,4 +639,8 @@
     return [NSNumber numberWithBool:YES];
 }
 
+- (NSArray *)accessibilityActionNames {
+    return [NSArray arrayWithObject:NSAccessibilityPressAction];
+}
+
 @end

Modified: trunk/PDFDisplayView_SKExtensions.h
===================================================================
--- trunk/PDFDisplayView_SKExtensions.h 2008-04-24 19:04:11 UTC (rev 3814)
+++ trunk/PDFDisplayView_SKExtensions.h 2008-04-24 19:33:45 UTC (rev 3815)
@@ -46,10 +46,6 @@
 @end
 
 @interface PDFDisplayView (SKExtensions)
-- (NSRect)screenRectForAnnotation:(PDFAnnotation *)annotation;
-- (BOOL)isAnnotationFocused:(PDFAnnotation *)annotation;
-- (void)setFocused:(BOOL)focused forAnnotation:(PDFAnnotation *)annotation;
-- (void)pressAnnotation:(PDFAnnotation *)annotation;
 @end
 
 @interface SKAccessibilityPDFDisplayViewElement : NSObject {

Modified: trunk/PDFDisplayView_SKExtensions.m
===================================================================
--- trunk/PDFDisplayView_SKExtensions.m 2008-04-24 19:04:11 UTC (rev 3814)
+++ trunk/PDFDisplayView_SKExtensions.m 2008-04-24 19:33:45 UTC (rev 3815)
@@ -108,7 +108,7 @@
         return originalAccessibilityFocusedUIElement(self, _cmd);
 }
 
-- (NSRect)screenRectForAnnotation:(PDFAnnotation *)annotation {
+- (NSRect)screenRectForRepresentedObject:(id)annotation {
     NSRect rect = NSZeroRect;
     SKPDFView *pdfView = [self skpdfView];
     if (pdfView) {
@@ -118,11 +118,11 @@
     return rect;
 }
 
-- (BOOL)isAnnotationFocused:(PDFAnnotation *)annotation {
+- (BOOL)isRepresentedObjectFocused:(id)annotation {
     return [[self skpdfView] activeAnnotation] == annotation;
 }
 
-- (void)setFocused:(BOOL)focused forAnnotation:(PDFAnnotation *)annotation {
+- (void)setFocused:(BOOL)focused forRepresentedObject:(id)annotation {
     SKPDFView *pdfView = [self skpdfView];
     if (pdfView) {
         if (focused)
@@ -132,7 +132,7 @@
     }
 }
 
-- (void)pressAnnotation:(PDFAnnotation *)annotation {
+- (void)pressRepresentedObject:(id)annotation {
     SKPDFView *pdfView = [self skpdfView];
     if (pdfView) {
         if ([pdfView activeAnnotation] != annotation)

Deleted: trunk/SKAccessibilityPDFAnnotationElement.h
===================================================================
--- trunk/SKAccessibilityPDFAnnotationElement.h 2008-04-24 19:04:11 UTC (rev 
3814)
+++ trunk/SKAccessibilityPDFAnnotationElement.h 2008-04-24 19:33:45 UTC (rev 
3815)
@@ -1,49 +0,0 @@
-//
-//  SKAccessibilityPDFAnnotationElement.h
-//  Skim
-//
-//  Created by Christiaan Hofman on 4/22/08.
-/*
- This software is Copyright (c) 2008
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
[EMAIL PROTECTED] PDFAnnotation;
-
[EMAIL PROTECTED] SKAccessibilityPDFAnnotationElement : NSObject {
-    PDFAnnotation *annotation;
-    id parent;
-}
-+ (id)elementWithAnnotation:(PDFAnnotation *)anAnnotation parent:(id)aParent;
-- (id)initWithAnnotation:(PDFAnnotation *)anAnnotation parent:(id)aParent;
[EMAIL PROTECTED]

Deleted: trunk/SKAccessibilityPDFAnnotationElement.m
===================================================================
--- trunk/SKAccessibilityPDFAnnotationElement.m 2008-04-24 19:04:11 UTC (rev 
3814)
+++ trunk/SKAccessibilityPDFAnnotationElement.m 2008-04-24 19:33:45 UTC (rev 
3815)
@@ -1,150 +0,0 @@
-//
-//  SKAccessibilityPDFAnnotationElement.m
-//  Skim
-//
-//  Created by Christiaan Hofman on 4/22/08.
-/*
- This software is Copyright (c) 2008
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "SKAccessibilityPDFAnnotationElement.h"
-#import <Quartz/Quartz.h>
-#import "PDFAnnotation_SKExtensions.h"
-#import "PDFDisplayView_SKExtensions.h"
-#import "SKStringConstants.h"
-
-static NSString *SKAttributeWithoutAXPrefix(NSString *attribute) {
-       return [attribute hasPrefix:@"AX"] ? [attribute substringFromIndex:2] : 
attribute;
-}
-
-static SEL SKAttributeGetter(NSString *attribute) {
-       return NSSelectorFromString([NSString stringWithFormat:@"[EMAIL 
PROTECTED]", SKAttributeWithoutAXPrefix(attribute)]);
-}
-
[EMAIL PROTECTED] SKAccessibilityPDFAnnotationElement
-
-+ (id)elementWithAnnotation:(PDFAnnotation *)anAnnotation parent:(id)aParent {
-    return [[[self alloc] initWithAnnotation:anAnnotation parent:aParent] 
autorelease];
-}
-
-- (id)initWithAnnotation:(PDFAnnotation *)anAnnotation parent:(id)aParent {
-    if (self = [super init]) {
-        annotation = [anAnnotation retain];
-        parent = [aParent retain];
-    }
-    return self;
-}
-
-- (void)dealloc {
-    [annotation release];
-    [parent release];
-    [super dealloc];
-}
-
-- (BOOL)isEqual:(id)object {
-    if ([object isKindOfClass:[SKAccessibilityPDFAnnotationElement class]]) {
-        SKAccessibilityPDFAnnotationElement *other = 
(SKAccessibilityPDFAnnotationElement *)object;
-        return annotation == other->annotation && parent == other->parent;
-    } else {
-        return NO;
-    }
-}
-
-- (unsigned int)hash {
-    return [annotation hash] + [parent hash];
-}
-
-- (NSArray *)accessibilityAttributeNames {
-    return [annotation accessibilityAttributeNames];
-}
-
-- (id)accessibilityAttributeValue:(NSString *)attribute {
-    if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
-        return NSAccessibilityUnignoredAncestor(parent);
-    } else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
-        // We're in the same window as our parent.
-        return [NSAccessibilityUnignoredAncestor(parent) 
accessibilityAttributeValue:NSAccessibilityWindowAttribute];
-    } else if ([attribute 
isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
-        // We're in the same top level element as our parent.
-        return [NSAccessibilityUnignoredAncestor(parent) 
accessibilityAttributeValue:NSAccessibilityTopLevelUIElementAttribute];
-    } else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
-        return [NSNumber numberWithBool:[parent 
isAnnotationFocused:annotation]];
-    } else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
-        return [NSValue valueWithPoint:[parent 
screenRectForAnnotation:annotation].origin];
-    } else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
-        return [NSValue valueWithSize:[parent 
screenRectForAnnotation:annotation].size];
-    } else if ([[annotation accessibilityAttributeNames] 
containsObject:attribute]) {
-               SEL getter = SKAttributeGetter(attribute);
-        return [annotation respondsToSelector:getter] ? [annotation 
performSelector:getter] : nil;
-    } else {
-        return nil;
-    }
-}
-
-- (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
-    return [attribute isEqualToString:NSAccessibilityFocusedAttribute]; 
-}
-
-- (void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
-    if ([attribute isEqualToString:NSAccessibilityFocusedAttribute])
-        [parent setFocused:[value boolValue] forAnnotation:annotation];
-}
-
-- (BOOL)accessibilityIsIgnored {
-    return [annotation shouldDisplay] == NO;
-}
-
-- (id)accessibilityHitTest:(NSPoint)point {
-    return NSAccessibilityUnignoredAncestor(self);
-}
-
-- (id)accessibilityFocusedUIElement {
-    return NSAccessibilityUnignoredAncestor(self);
-}
-
-- (NSArray *)accessibilityActionNames {
-    if ([annotation isLink] || [annotation isEditable])
-        return [NSArray arrayWithObject:NSAccessibilityPressAction];
-    else
-        return [NSArray array];
-}
-
-- (NSString *)accessibilityActionDescription:(NSString *)anAction {
-    return NSAccessibilityActionDescription(anAction);
-}
-
-- (void)accessibilityPerformAction:(NSString *)anAction {
-    if ([anAction isEqualToString:NSAccessibilityPressAction])
-        [parent pressAnnotation:annotation];
-}
-
[EMAIL PROTECTED]

Copied: trunk/SKAccessibilityProxyElement.h (from rev 3814, 
trunk/SKAccessibilityPDFAnnotationElement.h)
===================================================================
--- trunk/SKAccessibilityProxyElement.h                         (rev 0)
+++ trunk/SKAccessibilityProxyElement.h 2008-04-24 19:33:45 UTC (rev 3815)
@@ -0,0 +1,58 @@
+//
+//  SKAccessibilityProxyElement.h
+//  Skim
+//
+//  Created by Christiaan Hofman on 4/22/08.
+/*
+ This software is Copyright (c) 2008
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import <Cocoa/Cocoa.h>
+
[EMAIL PROTECTED] PDFAnnotation;
+
[EMAIL PROTECTED] SKAccessibilityProxyElement : NSObject {
+    id object;
+    id parent;
+}
++ (id)elementWithObject:(id)anObject parent:(id)aParent;
+- (id)initWithObject:(id)anObject parent:(id)aParent;
[EMAIL PROTECTED]
+
+
+// parent should implement these methods
[EMAIL PROTECTED] NSObject (SKAccessibilityProxyElementParent)
+- (NSRect)screenRectForRepresentedObject:(id)object;
+- (BOOL)isRepresentedObjectFocused:(id)object;
+- (void)setFocused:(BOOL)focused forRepresentedObject:(id)object;
+- (void)pressRepresentedObject:(id)object;
[EMAIL PROTECTED]

Copied: trunk/SKAccessibilityProxyElement.m (from rev 3814, 
trunk/SKAccessibilityPDFAnnotationElement.m)
===================================================================
--- trunk/SKAccessibilityProxyElement.m                         (rev 0)
+++ trunk/SKAccessibilityProxyElement.m 2008-04-24 19:33:45 UTC (rev 3815)
@@ -0,0 +1,144 @@
+//
+//  SKAccessibilityProxyElement.m
+//  Skim
+//
+//  Created by Christiaan Hofman on 4/22/08.
+/*
+ This software is Copyright (c) 2008
+ Christiaan Hofman. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+ - Neither the name of Christiaan Hofman nor the names of any
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "SKAccessibilityProxyElement.h"
+#import "PDFDisplayView_SKExtensions.h"
+
+static NSString *SKAttributeWithoutAXPrefix(NSString *attribute) {
+       return [attribute hasPrefix:@"AX"] ? [attribute substringFromIndex:2] : 
attribute;
+}
+
+static SEL SKAttributeGetter(NSString *attribute) {
+       return NSSelectorFromString([NSString stringWithFormat:@"[EMAIL 
PROTECTED]", SKAttributeWithoutAXPrefix(attribute)]);
+}
+
[EMAIL PROTECTED] SKAccessibilityProxyElement
+
++ (id)elementWithObject:(id)anObject parent:(id)aParent {
+    return [[[self alloc] initWithObject:anObject parent:aParent] autorelease];
+}
+
+- (id)initWithObject:(id)anObject parent:(id)aParent {
+    if (self = [super init]) {
+        object = [anObject retain];
+        parent = [aParent retain];
+    }
+    return self;
+}
+
+- (void)dealloc {
+    [object release];
+    [parent release];
+    [super dealloc];
+}
+
+- (BOOL)isEqual:(id)other {
+    if ([object isKindOfClass:[SKAccessibilityProxyElement class]]) {
+        SKAccessibilityProxyElement *element = (SKAccessibilityProxyElement 
*)other;
+        return object == element->object && parent == element->parent;
+    } else {
+        return NO;
+    }
+}
+
+- (unsigned int)hash {
+    return [object hash] + [parent hash];
+}
+
+- (NSArray *)accessibilityAttributeNames {
+    return [object respondsToSelector:_cmd] ? [object performSelector:_cmd] : 
[NSArray array];
+}
+
+- (id)accessibilityAttributeValue:(NSString *)attribute {
+    if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
+        return NSAccessibilityUnignoredAncestor(parent);
+    } else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
+        // We're in the same window as our parent.
+        return [NSAccessibilityUnignoredAncestor(parent) 
accessibilityAttributeValue:NSAccessibilityWindowAttribute];
+    } else if ([attribute 
isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
+        // We're in the same top level element as our parent.
+        return [NSAccessibilityUnignoredAncestor(parent) 
accessibilityAttributeValue:NSAccessibilityTopLevelUIElementAttribute];
+    } else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
+        return [NSNumber numberWithBool:[parent 
isRepresentedObjectFocused:object]];
+    } else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
+        return [NSValue valueWithPoint:[parent 
screenRectForRepresentedObject:object].origin];
+    } else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
+        return [NSValue valueWithSize:[parent 
screenRectForRepresentedObject:object].size];
+    } else if ([[self accessibilityAttributeNames] containsObject:attribute]) {
+               SEL getter = SKAttributeGetter(attribute);
+        return [object respondsToSelector:getter] ? [object 
performSelector:getter] : nil;
+    } else {
+        return nil;
+    }
+}
+
+- (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
+    return [attribute isEqualToString:NSAccessibilityFocusedAttribute]; 
+}
+
+- (void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
+    if ([attribute isEqualToString:NSAccessibilityFocusedAttribute])
+        [parent setFocused:[value boolValue] forRepresentedObject:object];
+}
+
+- (BOOL)accessibilityIsIgnored {
+    return [object respondsToSelector:_cmd] ? [object accessibilityIsIgnored] 
: NO;
+}
+
+- (id)accessibilityHitTest:(NSPoint)point {
+    return NSAccessibilityUnignoredAncestor(self);
+}
+
+- (id)accessibilityFocusedUIElement {
+    return NSAccessibilityUnignoredAncestor(self);
+}
+
+- (NSArray *)accessibilityActionNames {
+    return [object respondsToSelector:_cmd] ? [object performSelector:_cmd] : 
[NSArray array];
+}
+
+- (NSString *)accessibilityActionDescription:(NSString *)anAction {
+    return NSAccessibilityActionDescription(anAction);
+}
+
+- (void)accessibilityPerformAction:(NSString *)anAction {
+    if ([anAction isEqualToString:NSAccessibilityPressAction])
+        [parent pressRepresentedObject:object];
+}
+
[EMAIL PROTECTED]

Modified: trunk/SKPDFAnnotationFreeText.m
===================================================================
--- trunk/SKPDFAnnotationFreeText.m     2008-04-24 19:04:11 UTC (rev 3814)
+++ trunk/SKPDFAnnotationFreeText.m     2008-04-24 19:33:45 UTC (rev 3815)
@@ -204,6 +204,10 @@
     return [NSNumber numberWithBool:YES];
 }
 
+- (NSArray *)accessibilityActionNames {
+    return [NSArray arrayWithObject:NSAccessibilityPressAction];
+}
+
 @end
 
 #pragma mark -

Modified: trunk/SKPDFAnnotationNote.m
===================================================================
--- trunk/SKPDFAnnotationNote.m 2008-04-24 19:04:11 UTC (rev 3814)
+++ trunk/SKPDFAnnotationNote.m 2008-04-24 19:33:45 UTC (rev 3815)
@@ -326,6 +326,10 @@
     return [NSNumber numberWithBool:YES];
 }
 
+- (NSArray *)accessibilityActionNames {
+    return [NSArray arrayWithObject:NSAccessibilityPressAction];
+}
+
 @end
 
 #pragma mark -

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-04-24 19:04:11 UTC (rev 3814)
+++ trunk/SKPDFView.m   2008-04-24 19:33:45 UTC (rev 3815)
@@ -68,7 +68,7 @@
 #import "BDSKEdgeView.h"
 #import "PDFDocument_SKExtensions.h"
 #import "PDFDisplayView_SKExtensions.h"
-#import "SKAccessibilityPDFAnnotationElement.h"
+#import "SKAccessibilityProxyElement.h"
 
 #define ANNOTATION_MODE_COUNT 8
 #define TOOL_MODE_COUNT 5
@@ -1900,7 +1900,7 @@
     [self setNeedsDisplayForAnnotation:wasAnnotation];
     [page removeAnnotation:wasAnnotation];
     if (accessibilityChildren)
-        [accessibilityChildren 
removeObject:[SKAccessibilityPDFAnnotationElement 
elementWithAnnotation:wasAnnotation parent:[self documentView]]];
+        [accessibilityChildren removeObject:[SKAccessibilityProxyElement 
elementWithObject:wasAnnotation parent:[self documentView]]];
     if (wasNote)
         [self resetHoverRects];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFViewDidRemoveAnnotationNotification object:self 
@@ -2161,7 +2161,7 @@
             PDFAnnotation *annotation;
             while (annotation = [annotationEnum nextObject]) {
                 if ([annotation isLink] || [annotation isNoteAnnotation])
-                    [children addObject:[SKAccessibilityPDFAnnotationElement 
elementWithAnnotation:annotation parent:[self documentView]]];
+                    [children addObject:[SKAccessibilityProxyElement 
elementWithObject:annotation parent:[self documentView]]];
             }
         }
         accessibilityChildren = [children mutableCopy];
@@ -2182,7 +2182,7 @@
         if (page) {
             PDFAnnotation *annotation = [page annotationAtPoint:[self 
convertPoint:localPoint toPage:page]];
             if ([annotation isLink] || [annotation isNoteAnnotation])
-                child = 
NSAccessibilityUnignoredAncestor([SKAccessibilityPDFAnnotationElement 
elementWithAnnotation:annotation parent:[self documentView]]);
+                child = 
NSAccessibilityUnignoredAncestor([SKAccessibilityProxyElement 
elementWithObject:annotation parent:[self documentView]]);
         }
     }
     if (child == nil)
@@ -2195,7 +2195,7 @@
     if ([self isEditing])
         child = NSAccessibilityUnignoredDescendant(editField);
     else if (activeAnnotation)
-        child = 
NSAccessibilityUnignoredAncestor([SKAccessibilityPDFAnnotationElement 
elementWithAnnotation:activeAnnotation parent:[self documentView]]);
+        child = NSAccessibilityUnignoredAncestor([SKAccessibilityProxyElement 
elementWithObject:activeAnnotation parent:[self documentView]]);
     else
         child = 
NSAccessibilityUnignoredAncestor([SKAccessibilityPDFDisplayViewElement 
elementWithParent:[self documentView]]);
     return [child accessibilityFocusedUIElement];

Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj        2008-04-24 19:04:11 UTC (rev 
3814)
+++ trunk/Skim.xcodeproj/project.pbxproj        2008-04-24 19:33:45 UTC (rev 
3815)
@@ -195,7 +195,7 @@
                CEE106150BCBB72C00BF2D3E /* SKNotesDocument.m in Sources */ = 
{isa = PBXBuildFile; fileRef = CEE106140BCBB72C00BF2D3E /* SKNotesDocument.m 
*/; };
                CEE1065E0BCBBE1300BF2D3E /* NotesDocument.nib in Resources */ = 
{isa = PBXBuildFile; fileRef = CEE106580BCBBE1200BF2D3E /* NotesDocument.nib 
*/; };
                CEE176E40DBD5B0C00E6C317 /* PDFDisplayView_SKExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CEE176E30DBD5B0C00E6C317 /* 
PDFDisplayView_SKExtensions.m */; };
-               CEE177960DBE140900E6C317 /* 
SKAccessibilityPDFAnnotationElement.m in Sources */ = {isa = PBXBuildFile; 
fileRef = CEE177950DBE140900E6C317 /* SKAccessibilityPDFAnnotationElement.m */; 
};
+               CEE177960DBE140900E6C317 /* SKAccessibilityProxyElement.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CEE177950DBE140900E6C317 /* 
SKAccessibilityProxyElement.m */; };
                CEE229390BFB7CE9002B746B /* ReleaseNotes.rtf in Resources */ = 
{isa = PBXBuildFile; fileRef = CE54AA8E0BBC037400008750 /* ReleaseNotes.rtf */; 
};
                CEE22EA30BFB8672002B746B /* displayline in CopyFiles */ = {isa 
= PBXBuildFile; fileRef = CE1E2F120BDB86A10011D9DD /* displayline */; };
                CEE22EA40BFB8684002B746B /* skimnotes in CopyFiles */ = {isa = 
PBXBuildFile; fileRef = CEF3BF750B99CA2900E12E3D /* skimnotes */; };
@@ -815,8 +815,8 @@
                CEE11EF50BCC262800BF2D3E /* Italian */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = 
Italian.lproj/NotesDocument.nib; sourceTree = "<group>"; };
                CEE176E20DBD5B0C00E6C317 /* PDFDisplayView_SKExtensions.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = PDFDisplayView_SKExtensions.h; sourceTree = "<group>"; };
                CEE176E30DBD5B0C00E6C317 /* PDFDisplayView_SKExtensions.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = PDFDisplayView_SKExtensions.m; sourceTree = 
"<group>"; };
-               CEE177940DBE140900E6C317 /* 
SKAccessibilityPDFAnnotationElement.h */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SKAccessibilityPDFAnnotationElement.h; sourceTree = "<group>"; };
-               CEE177950DBE140900E6C317 /* 
SKAccessibilityPDFAnnotationElement.m */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 
SKAccessibilityPDFAnnotationElement.m; sourceTree = "<group>"; };
+               CEE177940DBE140900E6C317 /* SKAccessibilityProxyElement.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = SKAccessibilityProxyElement.h; sourceTree = "<group>"; };
+               CEE177950DBE140900E6C317 /* SKAccessibilityProxyElement.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = SKAccessibilityProxyElement.m; sourceTree = 
"<group>"; };
                CEE54D170DA2AA050037169F /* cs */ = {isa = PBXFileReference; 
lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/InfoWindow.nib; 
sourceTree = "<group>"; };
                CEE54D190DA2AA100037169F /* cs */ = {isa = PBXFileReference; 
lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/MainMenu.nib; 
sourceTree = "<group>"; };
                CEE54D1A0DA2AA1F0037169F /* cs */ = {isa = PBXFileReference; 
lastKnownFileType = wrapper.nib; name = cs; path = cs.lproj/MainWindow.nib; 
sourceTree = "<group>"; };
@@ -1275,8 +1275,8 @@
                CE2DE4D20B85D94800D0DA12 /* Data */ = {
                        isa = PBXGroup;
                        children = (
-                               CEE177940DBE140900E6C317 /* 
SKAccessibilityPDFAnnotationElement.h */,
-                               CEE177950DBE140900E6C317 /* 
SKAccessibilityPDFAnnotationElement.m */,
+                               CEE177940DBE140900E6C317 /* 
SKAccessibilityProxyElement.h */,
+                               CEE177950DBE140900E6C317 /* 
SKAccessibilityProxyElement.m */,
                                CEBD52EA0C9C0AE500FBF6A4 /* SKBookmark.h */,
                                CEBD52EB0C9C0AE500FBF6A4 /* SKBookmark.m */,
                                CEAF2E570C45414100C3ECBB /* SKLine.h */,
@@ -2040,7 +2040,7 @@
                                CECF61FF0DB258D600587D96 /* SKFontWell.m in 
Sources */,
                                CE80666F0DB910610078D118 /* 
SKSnapshotContentView.m in Sources */,
                                CEE176E40DBD5B0C00E6C317 /* 
PDFDisplayView_SKExtensions.m in Sources */,
-                               CEE177960DBE140900E6C317 /* 
SKAccessibilityPDFAnnotationElement.m in Sources */,
+                               CEE177960DBE140900E6C317 /* 
SKAccessibilityProxyElement.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to