Is there a tool that identifies which NSControl is under the cursor? I'm looking for a tool that could help me understand the layout of a closed source Mac OS applications in term of Cocoa controls. I saw this for in Firefox with the 'inspect' feature (for HTML/CSS); I don't expect it to work for every application because of the variety of programming languages and custom classes.
You can use a usability tool from Apple to see the structure of most user interfaces; try the Apple developer tool Accessibility Inspector. I believe it will do what you need.

The latest Xcode download may not include this tool as standard. You may need to download an additional package to find this tool.