On Thu, 2011-01-13 at 17:32 +0100, Hans-Peter Diettrich wrote: > > * XDND protocol requires mouse enter, exit and window properties to > > correctly get a source or target of a drag action. X11 Window > > handles are required for this. > > > > * Windows OLE drag-n-drop protocol requires window handles for each > > window or widget that can do DND. > > As mentioned above, *every* dragmanager must have handles for all > involved components. An OS-wide dragmanager can only use OS-wide > handles, e.g. those of the OS-wide window manager.
Lets take Windows OLE drag-n-drop protocol as an example. It needs the window handle of the component (eg: TEdit) that can accept a drop. Irrespective if it is a drag-from-component-to-component-inside-same-app or a drag and drop from one app to another. In Qt 4.4 and later, such an Edit component doesn't have a windows handle any more, so OLE can't talk to that Edit component. The only OS window handle is the top-level form. Trolltech had to implement some serious black magic in Qt to still work with OLE DND - yet no difference to the end-user. This is what I'm so impressed with, and have no real clue how they accomplished that (yet). XDND protocol works very different to Windows OLE DND, but still X11 window handles are required for the component which is the source or target of a drag-n-drop action, including the top-level window handle so as to communicate with the other app or component. And when I say drag-n-drop, I mean full DND support. In app drag-and-drop (component to component in same app) and application to application. XDND even allows computer-to-computer DND. The DND support Delphi has in the VCL is a joke, and hardly what I would call real drag-n-drop. It's just one component inside the same app sending a message (or executing an event) on another component in that same app. Any app-to-app DND, and you are on your own (outside the scope of the VCL), and you have to resort to Win API calls or implement your own full OLE DND implementation. > In which context? During painting it depends on the screen graphics > library, whether the canvas implements some clipping, or allows to write > on the entire screen. Please reread the blog posting on Nokia's site. They explain it there. I posted the URL earlier. -- Regards, - Graeme - -------------------------------------------------------------- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
