Re: Restricting NSWindow Movement
Re: Restricting NSWindow Movement
- Subject: Re: Restricting NSWindow Movement
- From: Lee Ann Rucker <email@hidden>
- Date: Mon, 06 May 2013 14:38:08 -0700
The doc for [NSWindow isMovable] says you can disable it and implement your own mouseDown: in an NSWindow subclass. I think there used to be an example mouseDown: implementation in the code but I can't find it.
On May 6, 2013, at 2:17 PM, Thomas Wetmore wrote:
> Is there a way to restrict the movement of an NSWindow to a frame of another window (that may underly it) or to some other fixed rectangular sub-area on the screen?
>
> Searching the web there was a CocoaBuilder thread 12 years ago that indicates that it was unknown how to do this then, implying that optimization in the Window Manager was an issue, but holding out the possibility that a layer below Cocoa might allow it.
>
> The windowWillMove: delegate method does not allow vetoing the move. In contrast to the windowWillResize:toSize: delegate method that does allow resizing to be vetoed.
>
> If your answer to this question would be to ask me why I should want to do such a thing, please consider that that is not an answer.
>
> Thanks,
>
> Tom Wetmore
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden