Community
Participate
Working Groups
First, let me describe what I want to do and then we can figure out the right API for it. Adobe would like to create top-level Shells that do not have the standard window trim but can be dragged around the screen and resized like standard Shells. We will handle drawing a title bar and resize box. When the user clicks on the designated title bar area, a window drag should start, ending when the user releases the mouse. Similarly, when the user clicks in the resize area, a resize should start, and end when the user releases the mouse. Here's what I'm thinking about for API: - The NO_TRIM bit should work as it does now. The Shell should be able to receive activate and deactivate events. - I should be able to set a height from the top of the shell, above which a click should be considered a click in the title area of the window. Resize is trickier, since I think the Mac is the only platform where the resize control is in the content of the window. I don't want to set the RESIZE bit because that would draw the standard resize control, but I do need to be able to indicate that I want the window to be resizable. - I would like it if the SWT handled the management of the move and resize so my code doesn't have to worry about the details. I think you can fake this with setLocation and setBounds, but there are specific OS calls dedicated to dragging and resizing that are better suited to tracking the mouse. Those aren't in use right now. I will add more as I think about it some more but this is a good starting point.
Can't you implemented all of this with the current support ? See Snippet134 for the drag part.
(In reply to comment #1) > Can't you implemented all of this with the current support ? I'm not sure if the NO_TRIM bit on the Mac gives you a window that can get activate and deactivate events on Cocoa. It certainly seems like everything is there as far as resize and move goes. I guess my concern is that moving and resizing during mouse event tracking is only going to be 2/3 correct and then there will be odd bugs caused by not using the standard window calls. But I suppose I should to try to implement it first to see what's missing.
Bug triaged, visit https://wiki.eclipse.org/SWT/Devel/Triage for more information.