I have implemented the Winboard_x engine-output window in xboard, but I have some trouble with the display of the various icons that indicate the engine state in this window. Problme is that I hardly know anything about X-windows, and could only do it by cloning existing features that approximately did what I needed.
I am using the XtNleftBitmap parameter to draw a Pixmap into a Widget that I defined fthe purpose. (Like xboard does to draw the checkmark in front of selected options in the Option menu.) The Bitmap was created by using the function XpmCreatePixmapFromData, like xboard does to make the piece symbols. As data I feed it this funny Pixmap format that represents the picture as a set of character strings, in which I designed the needed icons as 2- or 3-color pixmaps.
The icons do appear, but not in the colors I designed them. It seems that all colors are changed into either black or transparent: some icons do not show up at all, others become black blobs that have lost the detail.
Can anyone tell me what I am doing wrong? Should I somehow switch the target Widget into color mode?
Help needed with X-windows Pixmaps
Moderators: hgm, Rebel, chrisw
-
- Posts: 28123
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
-
- Posts: 2278
- Joined: Mon Sep 29, 2008 1:50 am
Re: Help needed with X-windows Pixmaps
I fear that with the advent of the modern toolkits Gtk and Qt, Xt programmers have become almost extinct.
Do you happen to have a link for the Xt documentation?
Michel
Do you happen to have a link for the Xt documentation?
Michel
-
- Posts: 2278
- Joined: Mon Sep 29, 2008 1:50 am
Re: Help needed with X-windows Pixmaps
This seems to be it.
http://www.x.org/docs/Xt/intrinsics.pdf
This should be the Xaw documentation
http://www.x.org/docs/Xaw/widgets.pdf
Michel
http://www.x.org/docs/Xt/intrinsics.pdf
This should be the Xaw documentation
http://www.x.org/docs/Xaw/widgets.pdf
Michel
-
- Posts: 28123
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Help needed with X-windows Pixmaps
I did not have those, so thanks! Perhaps I will be able to dig out there what I need. I am not to optimistic, though, as the only thing a lot of Googling has revealed so far is a few claims that it is impossible to display color bitmaps.
But as I understand now how the colors of my icons are mapped onto black and transparent (actually foreground and backround color, I guess), I have made some bitmaps that show up OK as monochrome.
Would you be able to make a screenshot of xboard, running an engine-engine match with ponder on, and the move-history list and engine-output window open, if I sent you the sources?
But as I understand now how the colors of my icons are mapped onto black and transparent (actually foreground and backround color, I guess), I have made some bitmaps that show up OK as monochrome.
Would you be able to make a screenshot of xboard, running an engine-engine match with ponder on, and the move-history list and engine-output window open, if I sent you the sources?
-
- Posts: 2278
- Joined: Mon Sep 29, 2008 1:50 am
Re: Help needed with X-windows Pixmaps
Sure but not tonight. I am fighting a deadline.Would you be able to make a screenshot of xboard, running an engine-engine match with ponder on, and the move-history list and engine-output window open, if I sent you the sources?