Revision: 4614
http://skim-app.svn.sourceforge.net/skim-app/?rev=4614&view=rev
Author: hofman
Date: 2008-09-12 12:48:17 +0000 (Fri, 12 Sep 2008)
Log Message:
-----------
Several accessibility UI elements for represented objects and indexed. Use the
latter for color swatch.
Modified Paths:
--------------
trunk/PDFDisplayView_SKExtensions.m
trunk/SKAccessibilityProxyElement.h
trunk/SKAccessibilityProxyElement.m
trunk/SKColorSwatch.m
trunk/SKPDFView.m
Modified: trunk/PDFDisplayView_SKExtensions.m
===================================================================
--- trunk/PDFDisplayView_SKExtensions.m 2008-09-11 20:37:47 UTC (rev 4613)
+++ trunk/PDFDisplayView_SKExtensions.m 2008-09-12 12:48:17 UTC (rev 4614)
@@ -248,36 +248,45 @@
@implementation NSView (SKPDFDisplayViewExtensions)
-- (NSRect)element:(SKAccessibilityProxyElement *)element
screenRectForRepresentedObject:(id)annotation {
+- (NSRect)screenRectForFauxUIElement:(SKAccessibilityFauxUIElement *)element {
NSRect rect = NSZeroRect;
SKPDFView *pdfView = SKGetPDFView(self);
if (pdfView) {
- rect = [pdfView convertRect:[pdfView convertRect:[annotation bounds]
fromPage:[annotation page]] toView:nil];
- rect.origin = [[pdfView window] convertBaseToScreen:rect.origin];
+ PDFAnnotation *annotation = [element representedObject];
+ if ([annotation respondsToSelector:@selector(bounds)] && [annotation
respondsToSelector:@selector(page)]) {
+ rect = [pdfView convertRect:[pdfView convertRect:[annotation
bounds] fromPage:[annotation page]] toView:nil];
+ rect.origin = [[pdfView window] convertBaseToScreen:rect.origin];
+ }
}
return rect;
}
-- (BOOL)element:(SKAccessibilityProxyElement *)element
isRepresentedObjectFocused:(id)annotation {
- return [SKGetPDFView(self) activeAnnotation] == annotation;
+- (BOOL)isFauxUIElementFocused:(SKAccessibilityFauxUIElement *)element {
+ return [SKGetPDFView(self) activeAnnotation] == [element
representedObject];
}
-- (void)element:(SKAccessibilityProxyElement *)element
setFocused:(BOOL)focused forRepresentedObject:(id)annotation {
+- (void)fauxUIlement:(SKAccessibilityFauxUIElement *)element
setFocused:(BOOL)focused {
SKPDFView *pdfView = SKGetPDFView(self);
if (pdfView) {
- if (focused)
- [pdfView setActiveAnnotation:annotation];
- else if ([pdfView activeAnnotation] == annotation)
- [pdfView setActiveAnnotation:nil];
+ PDFAnnotation *annotation = [element representedObject];
+ if ([annotation isKindOfClass:[PDFAnnotation class]]) {
+ if (focused)
+ [pdfView setActiveAnnotation:annotation];
+ else if ([pdfView activeAnnotation] == annotation)
+ [pdfView setActiveAnnotation:nil];
+ }
}
}
-- (void)element:(SKAccessibilityProxyElement *)element
pressRepresentedObject:(id)annotation {
+- (void)pressFauxUIElement:(SKAccessibilityFauxUIElement *)element {
SKPDFView *pdfView = SKGetPDFView(self);
if (pdfView) {
- if ([pdfView activeAnnotation] != annotation)
- [pdfView setActiveAnnotation:annotation];
- [pdfView editActiveAnnotation:self];
+ PDFAnnotation *annotation = [element representedObject];
+ if ([annotation isKindOfClass:[PDFAnnotation class]]) {
+ if ([pdfView activeAnnotation] != annotation)
+ [pdfView setActiveAnnotation:annotation];
+ [pdfView editActiveAnnotation:self];
+ }
}
}
Modified: trunk/SKAccessibilityProxyElement.h
===================================================================
--- trunk/SKAccessibilityProxyElement.h 2008-09-11 20:37:47 UTC (rev 4613)
+++ trunk/SKAccessibilityProxyElement.h 2008-09-12 12:48:17 UTC (rev 4614)
@@ -39,19 +39,39 @@
#import <Cocoa/Cocoa.h>
[EMAIL PROTECTED] SKAccessibilityProxyElement : NSObject {
- id object;
[EMAIL PROTECTED] SKAccessibilityFauxUIElement : NSObject {
id parent;
}
+- (id)initWithParent:(id)aParent;
+- (id)parent;
+- (id)representedObject;
+- (int)index;
[EMAIL PROTECTED]
+
+#pragma mark -
+
[EMAIL PROTECTED] SKAccessibilityProxyFauxUIElement :
SKAccessibilityFauxUIElement {
+ id object;
+}
+ (id)elementWithObject:(id)anObject parent:(id)aParent;
- (id)initWithObject:(id)anObject parent:(id)aParent;
@end
+#pragma mark -
[EMAIL PROTECTED] SKAccessibilityIndexedFauxUIElement :
SKAccessibilityFauxUIElement {
+ int index;
+}
++ (id)elementWithIndex:(int)anIndex parent:(id)aParent;
+- (id)initWithIndex:(int)anIndex parent:(id)aParent;
[EMAIL PROTECTED]
+
+#pragma mark -
+
// parent should implement these methods
[EMAIL PROTECTED] NSObject (SKAccessibilityProxyElementParent)
-- (NSRect)element:(SKAccessibilityProxyElement *)element
screenRectForRepresentedObject:(id)object;
-- (BOOL)element:(SKAccessibilityProxyElement *)element
isRepresentedObjectFocused:(id)object;
-- (void)element:(SKAccessibilityProxyElement *)element
setFocused:(BOOL)focused forRepresentedObject:(id)object;
-- (void)element:(SKAccessibilityProxyElement *)element
pressRepresentedObject:(id)object;
[EMAIL PROTECTED] NSObject (SKAccessibilityFauxUIElementParent)
+- (NSRect)screenRectForFauxUIElement:(SKAccessibilityFauxUIElement *)element;
+- (BOOL)isFauxUIElementFocused:(SKAccessibilityFauxUIElement *)element;
+- (void)fauxUIElement:(SKAccessibilityFauxUIElement *)element
setFocused:(BOOL)focused;
+- (void)pressFauxUIElement:(SKAccessibilityFauxUIElement *)element;
@end
Modified: trunk/SKAccessibilityProxyElement.m
===================================================================
--- trunk/SKAccessibilityProxyElement.m 2008-09-11 20:37:47 UTC (rev 4613)
+++ trunk/SKAccessibilityProxyElement.m 2008-09-12 12:48:17 UTC (rev 4614)
@@ -46,40 +46,42 @@
return NSSelectorFromString([NSString stringWithFormat:@"[EMAIL
PROTECTED]", SKAttributeWithoutAXPrefix(attribute)]);
}
[EMAIL PROTECTED] SKAccessibilityProxyElement
[EMAIL PROTECTED] SKAccessibilityFauxUIElement
-+ (id)elementWithObject:(id)anObject parent:(id)aParent {
- return [[[self alloc] initWithObject:anObject parent:aParent] autorelease];
-}
-
-- (id)initWithObject:(id)anObject parent:(id)aParent {
+- (id)initWithParent:(id)aParent {
if (self = [super init]) {
- object = [anObject retain];
parent = aParent;
}
return self;
}
-- (void)dealloc {
- [object release];
- [super dealloc];
-}
-
- (BOOL)isEqual:(id)other {
- if ([other isKindOfClass:[SKAccessibilityProxyElement class]]) {
- SKAccessibilityProxyElement *otherElement =
(SKAccessibilityProxyElement *)other;
- return object == otherElement->object && parent ==
otherElement->parent;
+ if ([other isKindOfClass:[SKAccessibilityFauxUIElement class]]) {
+ SKAccessibilityFauxUIElement *otherElement =
(SKAccessibilityFauxUIElement *)other;
+ return parent == [otherElement parent];
} else {
return NO;
}
}
- (unsigned int)hash {
- return [object hash] + [parent hash];
+ return [parent hash];
}
+- (id)parent {
+ return parent;
+}
+
+- (id)representedObject {
+ return nil;
+}
+
+- (int)index {
+ return -1;
+}
+
- (NSArray *)accessibilityAttributeNames {
- return [object respondsToSelector:_cmd] ? [object performSelector:_cmd] :
[NSArray array];
+ return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] performSelector:_cmd] : [NSArray array];
}
- (id)accessibilityAttributeValue:(NSString *)attribute {
@@ -92,14 +94,19 @@
// 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 element:self
isRepresentedObjectFocused:object]];
+ return [NSNumber numberWithBool:[parent isFauxUIElementFocused:self]];
} else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
- return [NSValue valueWithPoint:[parent element:self
screenRectForRepresentedObject:object].origin];
+ return [NSValue valueWithPoint:[parent
screenRectForFauxUIElement:self].origin];
} else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
- return [NSValue valueWithSize:[parent element:self
screenRectForRepresentedObject:object].size];
+ return [NSValue valueWithSize:[parent
screenRectForFauxUIElement:self].size];
} else if ([[self accessibilityAttributeNames] containsObject:attribute]) {
SEL getter = SKAttributeGetter(attribute);
- return [object respondsToSelector:getter] ? [object
performSelector:getter] : nil;
+ if ([self respondsToSelector:getter])
+ return [self performSelector:getter];
+ else if ([[self representedObject] respondsToSelector:getter])
+ return [[self representedObject] performSelector:getter];
+ else
+ return nil;
} else {
return nil;
}
@@ -111,11 +118,11 @@
- (void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
if ([attribute isEqualToString:NSAccessibilityFocusedAttribute])
- [parent element:self setFocused:[value boolValue]
forRepresentedObject:object];
+ [parent fauxUIElement:self setFocused:[value boolValue]];
}
- (BOOL)accessibilityIsIgnored {
- return [object respondsToSelector:_cmd] ? [object accessibilityIsIgnored]
: NO;
+ return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] accessibilityIsIgnored] : NO;
}
- (id)accessibilityHitTest:(NSPoint)point {
@@ -127,7 +134,7 @@
}
- (NSArray *)accessibilityActionNames {
- return [object respondsToSelector:_cmd] ? [object performSelector:_cmd] :
[NSArray array];
+ return [[self representedObject] respondsToSelector:_cmd] ? [[self
representedObject] performSelector:_cmd] : [NSArray array];
}
- (NSString *)accessibilityActionDescription:(NSString *)anAction {
@@ -136,7 +143,88 @@
- (void)accessibilityPerformAction:(NSString *)anAction {
if ([anAction isEqualToString:NSAccessibilityPressAction])
- [parent element:self pressRepresentedObject:object];
+ [parent pressFauxUIElement:self];
}
@end
+
+#pragma mark -
+
[EMAIL PROTECTED] SKAccessibilityProxyFauxUIElement
+
++ (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 initWithParent:aParent]) {
+ object = [anObject retain];
+ }
+ return self;
+}
+
+- (id)initWithParent:(id)aParent {
+ return [self initWithObject:nil parent:aParent];
+}
+
+- (void)dealloc {
+ [object release];
+ [super dealloc];
+}
+
+- (BOOL)isEqual:(id)other {
+ if ([other isKindOfClass:[SKAccessibilityProxyFauxUIElement class]]) {
+ SKAccessibilityProxyFauxUIElement *otherElement =
(SKAccessibilityProxyFauxUIElement *)other;
+ return [super isEqual:other] && object == [otherElement
representedObject];
+ } else {
+ return NO;
+ }
+}
+
+- (unsigned int)hash {
+ return [super hash] + [object hash];
+}
+
+- (id)representedObject {
+ return object;
+}
+
[EMAIL PROTECTED]
+
+#pragma mark -
+
[EMAIL PROTECTED] SKAccessibilityIndexedFauxUIElement
+
++ (id)elementWithIndex:(int)anIndex parent:(id)aParent {
+ return [[[self alloc] initWithIndex:anIndex parent:aParent] autorelease];
+}
+
+- (id)initWithIndex:(int)anIndex parent:(id)aParent {
+ if (self = [super initWithParent:aParent]) {
+ index = anIndex;
+ }
+ return self;
+}
+
+- (id)initWithParent:(id)aParent {
+ return [self initWithIndex:-1 parent:aParent];
+}
+
+- (BOOL)isEqual:(id)other {
+ if ([other isKindOfClass:[SKAccessibilityIndexedFauxUIElement class]]) {
+ SKAccessibilityIndexedFauxUIElement *otherElement =
(SKAccessibilityIndexedFauxUIElement *)other;
+ return [super isEqual:other] && index == [otherElement index];
+ } else {
+ return NO;
+ }
+}
+
+- (unsigned int)hash {
+ return [super hash] + index;
+}
+
+- (int)index {
+ return index;
+}
+
[EMAIL PROTECTED]
Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m 2008-09-11 20:37:47 UTC (rev 4613)
+++ trunk/SKColorSwatch.m 2008-09-12 12:48:17 UTC (rev 4614)
@@ -40,6 +40,7 @@
#import "SKRuntime.h"
#import "NSColor_SKExtensions.h"
#import <Carbon/Carbon.h>
+#import "SKAccessibilityProxyElement.h"
NSString *SKColorSwatchColorsChangedNotification =
@"SKColorSwatchColorsChangedNotification";
@@ -50,13 +51,7 @@
static NSString *SKColorSwatchAutoresizesKey = @"autoResizes";
[EMAIL PROTECTED] SKAccessibilityColorSwatchElement : NSObject {
- int index;
- SKColorSwatch *colorSwatch;
-}
-- (id)initWithIndex:(int)anIndex colorSwatch:(SKColorSwatch *)aColorSwatch;
-- (int)index;
-- (SKColorSwatch *)colorSwatch;
[EMAIL PROTECTED] SKAccessibilityColorSwatchElement :
SKAccessibilityIndexedFauxUIElement
@end
@@ -502,7 +497,7 @@
NSMutableArray *children = [NSMutableArray array];
int i, count = [colors count];
for (i = 0; i < count; i++)
- [children addObject:[[[SKAccessibilityColorSwatchElement alloc]
initWithIndex:i colorSwatch:self] autorelease]];
+ [children addObject:[[[SKAccessibilityColorSwatchElement alloc]
initWithIndex:i parent:self] autorelease]];
return NSAccessibilityUnignoredChildren(children);
} else {
return [super accessibilityAttributeValue:attribute];
@@ -524,7 +519,7 @@
NSPoint localPoint = [self convertPoint:[[self window]
convertScreenToBase:point] fromView:nil];
int i = [self colorIndexAtPoint:localPoint];
if (i != -1) {
- SKAccessibilityColorSwatchElement *color =
[[[SKAccessibilityColorSwatchElement alloc] initWithIndex:i colorSwatch:self]
autorelease];
+ SKAccessibilityColorSwatchElement *color =
[[[SKAccessibilityColorSwatchElement alloc] initWithIndex:i parent:self]
autorelease];
return [color accessibilityHitTest:point];
} else {
return [super accessibilityHitTest:point];
@@ -533,16 +528,37 @@
- (id)accessibilityFocusedUIElement {
if (focusedIndex != -1 && focusedIndex < (int)[colors count])
- return
NSAccessibilityUnignoredAncestor([[[SKAccessibilityColorSwatchElement alloc]
initWithIndex:focusedIndex colorSwatch:self] autorelease]);
+ return
NSAccessibilityUnignoredAncestor([[[SKAccessibilityColorSwatchElement alloc]
initWithIndex:focusedIndex parent:self] autorelease]);
else
return NSAccessibilityUnignoredAncestor(self);
}
-- (BOOL)isElementFocused:(SKAccessibilityColorSwatchElement *)element {
+- (id)valueForFauxUIElement:(SKAccessibilityFauxUIElement *)element {
+ return [[[self colors] objectAtIndex:[element index]] accessibilityValue];
+}
+
+- (NSRect)screenRectForFauxUIElement:(SKAccessibilityFauxUIElement *)element {
+ NSRect rect = NSInsetRect([self bounds], 1.0, 1.0);
+ rect.size.width = NSHeight(rect);
+ rect.origin.x += [element index] * (NSWidth(rect) - 1.0);
+ rect = [self convertRect:rect toView:nil];
+ rect.origin = [[self window] convertBaseToScreen:rect.origin];
+ return rect;
+}
+
+- (BOOL)isFauxUIElementFocused:(SKAccessibilityFauxUIElement *)element {
return focusedIndex == [element index];
}
-- (void)clickElement:(SKAccessibilityColorSwatchElement *)element {
+- (void)fauxUIElement:(SKAccessibilityFauxUIElement *)element
setFocused:(BOOL)focused {
+ if (focused) {
+ [[self window] makeFirstResponder:self];
+ focusedIndex = [element index];
+ [self setKeyboardFocusRingNeedsDisplayInRect:[self bounds]];
+ }
+}
+
+- (void)pressFauxUIElement:(SKAccessibilityFauxUIElement *)element {
int i = [element index];
if ([self isEnabled] && i != -1) {
clickedIndex = i;
@@ -561,116 +577,34 @@
@implementation SKAccessibilityColorSwatchElement
-- (id)initWithIndex:(int)anIndex colorSwatch:(SKColorSwatch *)aColorSwatch {
- if (self = [super init]) {
- index = anIndex;
- colorSwatch = aColorSwatch;
- }
- return self;
-}
-
-- (BOOL)isEqual:(id)object {
- if ([object isKindOfClass:[SKAccessibilityColorSwatchElement class]]) {
- SKAccessibilityColorSwatchElement *other = object;
- return index == [other index] && [colorSwatch isEqual:[other
colorSwatch]];
- } else {
- return NO;
- }
-}
-
-- (unsigned)hash {
- // Equal objects must hash the same.
- return index + [colorSwatch hash];
-}
-
-- (int)index {
- return index;
-}
-
-- (SKColorSwatch *)colorSwatch {
- return colorSwatch;
-}
-
- (NSArray *)accessibilityAttributeNames {
static NSArray *attributes = nil;
if (attributes == nil) {
- attributes = [[NSArray alloc] initWithObjects:
- NSAccessibilityRoleAttribute,
- NSAccessibilityRoleDescriptionAttribute,
- NSAccessibilityValueAttribute,
- NSAccessibilityParentAttribute,
- NSAccessibilityWindowAttribute,
- NSAccessibilityTopLevelUIElementAttribute,
- NSAccessibilityFocusedAttribute,
- NSAccessibilityPositionAttribute,
- NSAccessibilitySizeAttribute,
- nil];
+ attributes = [[NSArray alloc] initWithObjects:
+ NSAccessibilityRoleAttribute,
+ NSAccessibilityRoleDescriptionAttribute,
+ NSAccessibilityValueAttribute,
+ NSAccessibilityParentAttribute,
+ NSAccessibilityWindowAttribute,
+ NSAccessibilityTopLevelUIElementAttribute,
+ NSAccessibilityFocusedAttribute,
+ NSAccessibilityPositionAttribute,
+ NSAccessibilitySizeAttribute,
+ nil];
}
return attributes;
}
-- (id)accessibilityAttributeValue:(NSString *)attribute {
- if ([attribute isEqualToString:NSAccessibilityRoleAttribute]) {
- return NSAccessibilityColorWellRole;
- } else if ([attribute
isEqualToString:NSAccessibilityRoleDescriptionAttribute]) {
- return NSAccessibilityRoleDescriptionForUIElement(self);
- } else if ([attribute isEqualToString:NSAccessibilityValueAttribute]) {
- return [[[colorSwatch colors] objectAtIndex:index] accessibilityValue];
- } else if ([attribute isEqualToString:NSAccessibilityParentAttribute]) {
- return NSAccessibilityUnignoredAncestor(colorSwatch);
- } else if ([attribute isEqualToString:NSAccessibilityWindowAttribute]) {
- // We're in the same window as our parent.
- return [NSAccessibilityUnignoredAncestor(colorSwatch)
accessibilityAttributeValue:NSAccessibilityWindowAttribute];
- } else if ([attribute
isEqualToString:NSAccessibilityTopLevelUIElementAttribute]) {
- // We're in the same top level element as our parent.
- return [NSAccessibilityUnignoredAncestor(colorSwatch)
accessibilityAttributeValue:NSAccessibilityTopLevelUIElementAttribute];
- } else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) {
- return [NSNumber numberWithBool:[colorSwatch isElementFocused:self]];
- } else if ([attribute isEqualToString:NSAccessibilityPositionAttribute]) {
- NSRect rect = NSInsetRect([colorSwatch bounds], 1.0, 1.0);
- rect.size.width = NSHeight(rect);
- rect.origin.x += index * (NSWidth(rect) - 1.0);
- return [NSValue valueWithPoint:[[colorSwatch window]
convertBaseToScreen:[colorSwatch convertPoint:rect.origin toView:nil]]];
- } else if ([attribute isEqualToString:NSAccessibilitySizeAttribute]) {
- NSRect rect = NSInsetRect([colorSwatch bounds], 1.0, 1.0);
- rect.size.width = NSHeight(rect);
- rect.origin.x += index * (NSWidth(rect) - 1.0);
- return [NSValue valueWithSize:[colorSwatch convertSize:rect.size
toView:nil]];
- } else {
- return nil;
- }
+- (id)accessibilityRoleAttribute {
+ return NSAccessibilityColorWellRole;
}
-- (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute {
- return NO;
+- (id)accessibilityRoleDescriptionAttribute {
+ return NSAccessibilityRoleDescriptionForUIElement(self);
}
-- (void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute {
+- (id)accessibilityValueAttribute {
+ return [[self parent] valueForFauxUIElement:self];
}
-- (BOOL)accessibilityIsIgnored {
- return NO;
-}
-
-- (id)accessibilityHitTest:(NSPoint)point {
- return NSAccessibilityUnignoredAncestor(self);
-}
-
-- (id)accessibilityFocusedUIElement {
- return NSAccessibilityUnignoredAncestor(self);
-}
-
-- (NSArray *)accessibilityActionNames {
- return [NSArray arrayWithObject:NSAccessibilityPressAction];
-}
-
-- (NSString *)accessibilityActionDescription:(NSString *)anAction {
- return NSAccessibilityActionDescription(anAction);
-}
-
-- (void)accessibilityPerformAction:(NSString *)anAction {
- if ([anAction isEqualToString:NSAccessibilityPressAction])
- [colorSwatch clickElement:self];
-}
-
@end
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2008-09-11 20:37:47 UTC (rev 4613)
+++ trunk/SKPDFView.m 2008-09-12 12:48:17 UTC (rev 4614)
@@ -1967,7 +1967,7 @@
[self setNeedsDisplayForAnnotation:wasAnnotation];
[page removeAnnotation:wasAnnotation];
if (accessibilityChildren)
- [accessibilityChildren removeObject:[SKAccessibilityProxyElement
elementWithObject:wasAnnotation parent:[self documentView]]];
+ [accessibilityChildren removeObject:[SKAccessibilityProxyFauxUIElement
elementWithObject:wasAnnotation parent:[self documentView]]];
if (wasNote)
[self resetPDFToolTipRects];
[[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewDidRemoveAnnotationNotification object:self
@@ -2231,7 +2231,7 @@
PDFAnnotation *annotation;
while (annotation = [annotationEnum nextObject]) {
if ([annotation isLink] || [annotation isSkimNote])
- [children addObject:[SKAccessibilityProxyElement
elementWithObject:annotation parent:[self documentView]]];
+ [children addObject:[SKAccessibilityProxyFauxUIElement
elementWithObject:annotation parent:[self documentView]]];
}
}
accessibilityChildren = [children mutableCopy];
@@ -2252,7 +2252,7 @@
if (page) {
PDFAnnotation *annotation = [page annotationAtPoint:[self
convertPoint:localPoint toPage:page]];
if ([annotation isLink] || [annotation isSkimNote])
- child =
NSAccessibilityUnignoredAncestor([SKAccessibilityProxyElement
elementWithObject:annotation parent:[self documentView]]);
+ child =
NSAccessibilityUnignoredAncestor([SKAccessibilityProxyFauxUIElement
elementWithObject:annotation parent:[self documentView]]);
}
}
//if (child == nil)
@@ -2265,7 +2265,7 @@
if ([self isEditing])
child = NSAccessibilityUnignoredDescendant(editField);
else if (activeAnnotation)
- child = NSAccessibilityUnignoredAncestor([SKAccessibilityProxyElement
elementWithObject:activeAnnotation parent:[self documentView]]);
+ child =
NSAccessibilityUnignoredAncestor([SKAccessibilityProxyFauxUIElement
elementWithObject:activeAnnotation parent:[self documentView]]);
//else
// child =
NSAccessibilityUnignoredAncestor([SKAccessibilityPDFDisplayViewElement
elementWithParent:[self documentView]]);
return [child accessibilityFocusedUIElement];
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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit