Re: XForms: pixmap buttons

Sindre Mehus (mehus@darmstadt.gmd.de)
Fri, 20 Jun 1997 17:38:39 +0200

To subscribers of the xforms list from Sindre Mehus <mehus@darmstadt.gmd.de> :

Hi,

> Can someone tell me how or where I might look to find how to
> embed the pixmap for pixmap buttons in the executable so it does not
> look for and try to load the pixmap at runtime?

I guess you can do it like this:

Assuming the pixmap is called logo.xpm and begins with the following
line:
static char *logo_xpm[] = {

you can do
#include "logo.xpm"

in your C-file, and then
fl_set_pixmapbutton_data(obj, logo_xpm);

NB! When I use xv to view/manipulate my pixmaps, it puts some stuff at
the end of the xpm-file. You should skim through the file and check
that it is correct.

Hope this helps,
Sindre

-- 
Sindre Mehus                 __     mailto:mehus@darmstadt.gmd.de
GMD-IPSI                    /\_\    http://www.cs.uit.no/~sindrem
Dolivostr. 15               \/_/    Tel:         +49 6151 869 902
D-64293 Darmstadt, Germany          Fax:         +49 6151 869 966
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/