Bug 280137 - Need a window-resize-initiate and window-move-initiate API
Summary: Need a window-resize-initiate and window-move-initiate API
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2009-06-12 15:48 EDT by Scott Kovatch CLA
Modified: 2017-07-04 07:41 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Kovatch CLA 2009-06-12 15:48:20 EDT
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.
Comment 1 Felipe Heidrich CLA 2009-06-15 10:38:40 EDT
Can't you implemented all of this with the current support ?

See Snippet134 for the drag part.
Comment 2 Scott Kovatch CLA 2009-06-15 19:22:27 EDT
(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.
Comment 3 Lakshmi P Shanmugam CLA 2017-07-04 07:41:51 EDT
Bug triaged, visit https://wiki.eclipse.org/SWT/Devel/Triage for more
information.