diff options
Diffstat (limited to 'documentation/osissues.html')
| -rw-r--r-- | documentation/osissues.html | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/documentation/osissues.html b/documentation/osissues.html index 692a2ac38..a140dc6b8 100644 --- a/documentation/osissues.html +++ b/documentation/osissues.html @@ -340,18 +340,36 @@ is shown using the <TT>Fl_Window::icon()</TT> method. <P>Sets the icon for the window to the passed pointer. You will need to cast the icon <TT>Pixmap</TT> to a <TT>char *</TT> when -calling this method. To set the icon using a bitmap compiled +calling this method. To set a monochrome icon using a bitmap compiled with your application use: <UL><PRE> #include "icon.xbm" +fl_opendisplay(); // needed if display has not been previously opened + Pixmap p = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display), icon_bits, icon_width, icon_height); window->icon((char *)p); </PRE></UL> +<P>To use a multi-colored icon, the XPM format and library +should be used as follows: + +<UL><PRE> +#include "icon.xpm" + +fl_opendisplay(); // needed if display has not been previously opened + +Pixmap p, mask; + +XpmCreatePixmapFromData(fl_display, DefaultRootWindow(fl_display), + icon_xpm, &p, &mask, NULL); + +window->icon((char *)p); +</PRE></UL> + <CENTER><TABLE WIDTH="90%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc"> <TR> <TD><B>NOTE:</B> |
