| Async Drag Window version 1.1 Minimum requirements: REALbasic 2006r3 and Mac OS X 10.3 By Frank Condello. Web: <http://developer.chaoticbox.com/> -------------------------------------------------------- About: AsyncDragWindow is a window subclass that allows users to drag windows without blocking the rest of your application. Timers and threads will execute, and content in all windows will continue to update throughout the drag. This behaviour is achieved by using the kWindowAsyncDragAttribute flag introduced in Mac OS X 10.3, therefore this class requires 10.3 or higher for full functionality. It should function in 10.2 as well, but drags will block as usual in that case. NOTE: Properly supporting asynchronous dragging required that the Window class' Moved event, and Left/Top properties be re-implemented. The end result is the same as an unmodified RB Window however, and existing code should continue to work as-is. If you notice any discrepancies please email a bug report. The AsyncDragWindow class also includes some new events: MoveStarted Fired when the user clicks in the title bar to start a drag. Note this does not mean the window is or will be dragged, and will fire even when a user double-clicks to minimize a window for example. MoveCompleted Fired after MoveStarted when the user releases the mouse button. Note this does not mean the window has actually changed position - use the Moved event as usual for that purpose. ResizeStarted Fired when the user clicks in the resize widget to begin resizing. ResizeCompleted Fired after ResizeStarted when the user releases the mouse button to end a resize. This does not mean the window has actually changed dimensions - use the Resized event as usual for that purpose. -------------------------------------------------------- Installation & Usage: Drag the "AsyncDragWindow.rbo" class into your Rb project, and set the Super of any window you want to drag asynchronously to AsyncDragWindow. IMPORTANT: Windows with a Metal Frame must have Composite set to true in the Properties editor. The AsyncDragWindow class will raise an exception if its frame is Metal and Composite is false to avoid odd dragging behaviour at runtime. Also note that Metal AsyncDragWindows are draggable from any metal surface, not just the title bar. -------------------------------------------------------- Version History: -------------------------- v1.1 - August 10, 2007 - Fixed a declare that would fail for Mac PEF Carbon targets. - Wrapped Mac OS X specific code in "TargetCarbon" conditionals and added stubs to allow transparent compiles for Windows and Linux targets. - Note that despite these changes the class still only functions on Mac OS X. There is no Mac OS 9 support, and the new "Started" and "Completed" events do not fire on Windows or Linux. -------------------------- v1.0 - August 20, 2006 - Initial release |