On 28.08.2008, at 12:03, Louis wrote:

> Hi all.
> I successfully compiled fltk.
> Then I compiled the editor.cxx example.
> The example runs very well and fast but I have one problem.
> I am not able to drop a file onto the application bundle.
>
> Is it possible to open files with drag and drop from the finder?
> If it is possible, how?

Yes, it is possible. Make sure that your app is in a bundle. If you  
have a correct bundle, you call fl_open_callback() with a function  
that will handle all drop operations onto the application icon.

If you also want to allow d'n'd onto the application window, you can  
check out the DND part of the FLTK manual. An sAFAIK Greg's cheat  
sheet has some DND sample code as well:

<http://www.seriss.com/people/erco/fltk/#DragAndDrop>


Matthias


----
http://robowerk.com/


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to