您的位置:首页 > 其它

Handling Events in Windows

2011-08-06 19:54 363 查看


Handling Events in Windows

As described in NSResponder
Class Reference, most events coming into an application make their way to a window in a
sendEvent:
message.
A key event is directed at the key window, while a mouse event is directed at whatever window lies under the pointer. If an event affects the window directly—resizing or moving it, for example—it performs the appropriate operation itself and sends messages
to its delegate informing it of its intentions, thus allowing your application to intercede. The window sends other events up its responder chain from the appropriate starting point: the first responder for a key event, the view under the pointer for a mouse
event. These events are then typically handled by some view object in the window. See Cocoa
Event-Handling Guide for more information on how to intercept and handle events.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: