> Is there some (even a rocky one) to use Fl_Window::icon(...) > the same way in Windows and Linux? May be with a .ico file?
Short answer: no, sorry. The icon stuff is platform specific, really. Also, most platforms don't even recognise the others icon formats (both win32 and OSX use proprietary formats for their icons, for example...) The situation on Linux is more complicated since the window icon stuff sets the icon as known by the X-server, but most modern desktop environments (gnome, kde) have their own *additional* mechanisms for setting app icons that (pretty much) ignore what is set for the X-server icon and use their own system as well (or ecen instead...) > Or does fltk just hand whatever is placed in _icon by > Fl_Window:icon(...) to the appropriate os function to set the > program icon? Pretty much. But that does nothing at all on OSX (where you really have to create an app bundle and place the icons in the correct folder inside the bundle.) And under gnome, for example, you *also* need to set up cues that the gnome WM will use, alongside the X-server stuff set in this way. > I would like to load a *.ico file (or some other image file > format) as a char array and just set it with the ::icon > method, in windows and linux. Yup. Seems reasonable, but generally doesn't work. If you can munge the ico data into a format that X recognises this might work. > If this is not possible at all, how do i use a *.ico as > program icon in linux? I fear i have to, as for a xpm, use > some X-function to create a Pixmap(<- what is this > actually??, this special type seems to come out of the fltk > includes [may be because of them including X includes?], > though it is the return type of a X-function). It's an image format that X recognises. Google, wikipedia, etc... What I do is draw up my icons as PNG files, which I keep in a subdir of my project. I convert these PNG's into pixmaps, into win32 .ico format and Mac OSX icon format, and keep those in the folder too. Then at build time the code just picks up whichever is appropriate for the current target, via a few ifdef's in the code. The PNG's are also used to set up gnome desktop icons for the app (which can use PNG directly.) Works, but not ideal. SELEX Sensors and Airborne Systems Limited Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

