FLTK logo

Re: How to enable Drag n Drop on OpenGL window ?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.opengl  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: How to enable Drag n Drop on OpenGL window ? Furqan Feb 18, 2013  
 
Thanks UWE,
I tried but no success, still the same. File only accepted when drop over the Fl_Double_Window.

Here is my code..

MainWindow->begin(); // Fl_Double_Window

DnDReceiver b(0,0,WINDOW_SIZE_W, WINDOW_SIZE_H); // Drag n Drop Box

glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_ACCUM | GLUT_ALPHA | GLUT_STENCIL | GLUT_MULTISAMPLE);
GLUT_MAIN_WINDOW = glutCreateWindow(RACS_VERSION);
MainWindow->end();
MainWindow->show(argc, argv);

I tried to put DnDReceiver box before, after, middle, everywhere, inside of begin and end of Fl_Double_Window but no success.

Please guide me Where to put "DnDReceiver" box in the code.

thanks.






> Am 18.02.2013 08:52, schrieb Furqan:
>
> > Now the issue is, when I drag n drop one file over the OpenGL screen it doesn't accept the file. File only accepted if I drop on the "Receiver box". But my application screen is totally covered with the OpenGL screen, so, how can I enable Drag n Drop on the OpenGL screen ?
>
> You can place a invisible widget e.g. Fl_Box with the attribute
> Fl_No_Box over the whole application, which just recieves D&D events
> like in your described even handler and filters only these. All other
> events from mouse, keyboard etc. should pass to get handled as usual by
> the appropriate widgets.
>
> kind regards
> Kai-Uwe
>
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.