Factor/GSoC/2010/Drag and drop

Mentor

Slava Pestov

Skills Required

  • Knowledge of Factor
  • Ability to learn APIs

Level

Intermediate

Existing work

For Windows, there is a COM bridge and a demo vocabulary implementing a drag and drop example; look at unmaintained/dragdrop-listener.

Technical details

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

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.

Linux

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/.

MacOSX

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.

Challenges

  • Learning the Factor UI framework

This revision created on Sun, 28 Feb 2010 05:41:24 by slava