Factor/GSoC/2009/Drag and drop
For Windows, there is a COM bridge and a demo vocabulary implementing a drag and drop example.
Factor's graphical user interface library, written completely in Factor, does not yet support drag and drop. On the simplest level, this is used just for plain text, but it can also be used for things like formatted text, images and files. Implementing this will involve work on all three UI platforms (Windows, Cocoa and X) as well as a high-level protocol abstracting over all platforms, designed by the student.
Windows uses COM for drag-and-drop, and since Factor ships with a COM demo vocabulary, the student will be able to reuse this code and fit it into the overarching protocol.
Drag-and-drop on Linux will require a bit of creativity on the candidate's part, as there are no good standards to implement for dragging and dropping anything besides text. The student can learn about Linux standards like those at http://www.newplanetsoftware.com/xdnd/.
Factor has an Objective-C bridge capable of calling arbitrary Cocoa APIs required for implementing drag-and-drop. As on the other platforms, make a layer wrapping the Cocoa API first, and then fit it into your generic protocol.
Benefit to student
The student learns about UI design and the device input APIs on three major operating systems.
Benefit to community
Drag and drop is expected in modern UI toolkits. By implementing it as a generic protocol, we can achieve cross-platform applications with a single drag-and-drop interface easily accessible to the programmer.
This revision created on Fri, 13 Mar 2009 22:18:40 by erg
All content is © 2008-2010 by its respective authors. By adding content to this wiki, you agree to release it under the BSD license.