I am writing a C++ raytracer and using the CImg library to display the final image. I want to be able to right click on particular pixels in the final rendered image and display a menu with pixel-specific content. CImg makes it pretty easy to detect a right click on a pixel location, but it doesn't seem to give me the ability to spawn a right-click menu. I've never used a graphical widget toolkit before and I'm not sure how to go about finding one and integrating it with the window that CImg spawns. I'm developing this in linux, but ideally I'd like a cross-platform solution.
Asked
Active
Viewed 308 times
1 Answers
0
According to cimg they are providing platform independent code, so highly possible you will need to use some OS specific code do make the popup menu. For windows you start from: http://msdn.microsoft.com/en-us/library/windows/desktop/ms647626%28v=vs.85%29.aspx for QT you start from http://qt-project.org/doc/qt-4.8/qmenu.html and fro GTK: http://developer.gnome.org/gtk-faq/stable/x669.html

Ferenc Deak
- 34,348
- 17
- 99
- 167