NSWindow 带有一个洞和鼠标事件
我正在开发一个桌面应用程序,在其中创建一个带有孔的窗口。
- 用户应该能够将位于该孔正下方的窗口拖过该孔。
- 当他点击洞以外的区域时,他应该能够移动我的窗口。
我尝试过以下操作:
当用户在孔内执行 mouseDown 时,setIngnoresMouseEvents 设置为 YES。因此,如果我单击窗口中除孔之外的区域,则我的窗口不会捕获该鼠标事件。它会转到可以通过该孔看到其窗口的应用程序。
我怎样才能实现这些行为?
I am developing an Desktop application in which I am creating a window with a hole in it.
- The user should be able to drag the window present just below the hole through this hole.
- When he clicks on the area other than the hole, he should be able to move my window.
I have tried the following:
When user performs mouseDown inside the hole, setIngnoresMouseEvents is set to YES. So, if I click on the area of the window other than the hole, that mouse-event is not taken by my window. It goes to the app whose window could be seen through the hole.
How can I achieve these behaviors?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论