AXPosition origin?
AXPosition origin?
- Subject: AXPosition origin?
- From: Nick Kocharhook <email@hidden>
- Date: Tue, 27 May 2014 14:18:29 +0000
- Thread-topic: AXPosition origin?
Hi A-D!
The documentation about AXPosition couldn’t be clearer:
"kAXPositionAttribute
The global screen position of the top-left corner of an element.
Value: An AXValueRef with type kAXValueCGPointType. 0,0 is the top-left corner of the screen that displays the menu bar. The value of the horizontal axis increases to the right. The value of the vertical axis increases downward. Units are pixels."
And yet! I find that when I override AXPosition and return a value with a higher Y, the view or cell in question actually moves upward, toward the menu bar. Example:
- (id)accessibilityAttributeValue:(NSString *)attribute
{
if ([attribute isEqualToString:NSAccessibilityPositionAttribute])
{
NSPoint originalPoint = [[super accessibilityAttributeValue:NSAccessibilityPositionAttribute] pointValue];
originalPoint.y += 10;
return [NSValue valueWithPoint:originalPoint];
}
return [super accessibilityAttributeValue:attribute];
}
This will move the the widget 10 points (20px on Retina) closer to the menu bar.
So the documentation is wrong, correct? Or am I overlooking something?
Thanks,
-Nick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden