🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36875

Re: trouble with bitmaps under Aw

#36875
From: Chris D. Peterson
Date: Thu, 15 Feb 1990 13:55
35 lines
1856 bytes
> I've just started using the Athena widgets and the Xtoolkit. So much easier
> than trying to get everything going with just Xlib!

> I'm having problems getting a bitmap to display in a widget. There are no
> examples to do this in the manuals, or in the example code supplied. 

There is a string to bitmap converter registered in the Athena widgets.
The string is a filename that corrosponds to a file in the format produced
by XWriteBitmapFile.  

As an example try the following:

% cd /x/examples/Xaw
% xlabel -xrm "*label*bitmap:xlogo64"

For specifics on how the Athena string to bitmap converter works see
the Athena widget documentation section 2.4.3.

> What i'm trying to do is have a label widget with a bitmap. Do i have to
> do resource conversions? Are there any toolkit functions to help with 
> this. With Xlib i used to do an XCreateImage, and then PutPixel them
> onto the window. There must be an easier simpler way under Aw.

You can also use the SetValues() interface to place a pixmap of arbitrary depth
into the Label widget's XtNbitmap resource.  How you create this pixmap is up to
you, there a no tools provided by Xt, so you are relegated to using XLib calls.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213
Technical Details
Message-ID: <9002151355.AA11371@expo.lcs.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!math.lsa.umich.edu!zaphod.mps.ohio-state.edu!think!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit
References: <17769@eerie.acsu.Buffalo.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!math.lsa.umich.edu!zaphod.mps.ohio-state.edu!think!snorkelwacker!bloom-beacon!EXPO.LCS.MIT.EDU!kit
From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson)
Newsgroups: comp.windows.x
Subject: Re: trouble with bitmaps under Aw
Message-ID: <9002151355.AA11371@expo.lcs.mit.edu>
Date: 15 Feb 90 13:55:26 GMT
References: <17769@eerie.acsu.Buffalo.EDU>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 35