Re: Accessibility for NSButtonCell
Re: Accessibility for NSButtonCell
- Subject: Re: Accessibility for NSButtonCell
- From: Christiaan Hofman <email@hidden>
- Date: Mon, 9 Feb 2009 21:57:00 +0100
On 9 Feb 2009, at 9:07 PM, James Dempsey wrote:
On Feb 9, 2009, at 6:16 AM, Christiaan Hofman wrote:
I'm writing a custom NSControl subclass containing several
NSButtonCells. I've made it accessible as an AXGroup with the cells
as children and contents, for the rest relying on built-in support
from NSControl and NSButtonCell. However it is not clear to me how
to handle the focused cell and a press action in the cell. My
control keeps an (integer) ivar to track the currently focused
cell, and returns the corresponding cell from -
accessibilityFocusedUIElement. Does NSControl+NSButtonCell have
built-in support for changing the focused cell, and pressing the
button cell? And if so, which NSControl methods are used for that?
Christiaan
Depending on the UI you are trying to achieve, you may want to look
at NSMatrix. The layout is in a matrix of rows and columns, if that
suits your needs, and has a variety of mouse tracking styles
(including working like radio buttons).
Otherwise, I'd take a look at the sections on subclassing NSCell and
NSControl in:
http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/ControlCell.html
-James
No, NSMatrix does not work for me, I tried that. I need custom layout
and mouse event handling not supported by it.
Of course I know the docs on NSControl/NSCell, but it does not say how
accessibility is implemented. And I cannot see any API for the various
properties like cells, cell rects, focused cell, or whatever that
accessibility may use. However, there must be something, as NSMatrix
does it without the need for subclassing the cells. So how does
NSMatrix know?
Christiaan
_______________________________________________
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