~ubuntu-branches/ubuntu/karmic/fltk1.1/karmic

« back to all changes in this revision

Viewing changes to documentation/osissues.html

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-05-22 13:57:06 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050522135706-mchag24yf42lu7bu
Tags: 1.1.6-5
* Revert previous change, which seems to have been ineffective for some
  reason, in favor of commenting out the problematic Makefile rule
  altogether.  (Closes: #310151.)
* debian/control: Go back to specifying the URL as part of the
  description rather than via a non-standard field that doesn't seem to
  have caught on.  (Closes: #310240.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
333
333
 
334
334
<H3>Setting the Icon of a Window</H3>
335
335
 
336
 
<P>FLTK currently supports setting a window's icon *before* it
 
336
<P>FLTK currently supports setting a window's icon <b>before</b> it
337
337
is shown using the <TT>Fl_Window::icon()</TT> method.
338
338
 
339
339
<H4>void Fl_Window::icon(char *)</H4>
340
340
 
341
341
<P>Sets the icon for the window to the passed pointer. You will
342
342
need to cast the icon <TT>Pixmap</TT> to a <TT>char *</TT> when
343
 
calling this method. To set the icon using a bitmap compiled
 
343
calling this method. To set a monochrome icon using a bitmap compiled
344
344
with your application use:
345
345
 
346
346
<UL><PRE>
347
347
#include &quot;icon.xbm&quot;
348
348
 
 
349
fl_open_display(); // needed if display has not been previously opened
 
350
 
349
351
Pixmap p = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display),
350
352
                                 icon_bits, icon_width, icon_height);
351
353
 
352
354
window-&gt;icon((char *)p);
353
355
</PRE></UL>
354
356
 
 
357
<P>To use a multi-colored icon, the XPM format and library
 
358
should be used as follows:
 
359
 
 
360
<UL><PRE>
 
361
#include &lt;X11/xpm.h&gt;
 
362
#include &quot;icon.xpm&quot;
 
363
 
 
364
fl_opendisplay();                // needed if display has not been previously opened
 
365
 
 
366
Pixmap p, mask;
 
367
 
 
368
XpmCreatePixmapFromData(fl_display, DefaultRootWindow(fl_display),
 
369
                                 icon_xpm, &amp;p, &amp;mask, NULL);
 
370
 
 
371
window-&gt;icon((char *)p);
 
372
</PRE></UL>
 
373
 
 
374
<p>When using the Xpm library, be sure to include it in the list
 
375
of libraries that are used to link the application (usually
 
376
"-lXpm").</p>
 
377
 
355
378
<CENTER><TABLE WIDTH="90%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc">
356
379
<TR>
357
380
        <TD><B>NOTE:</B>