Xaw-Xpm Xaw-Xpm

Xaw-Xpm (a hack of Xaw3d).
Ben Buxton bb@zip.com.au

Version 1.1 now available!!

The original version of the Athena Widget Set is ugly. That was improved considerably with Xaw3d, which gave it a motif look and feel. I've hacked it even further now, and it has numerous aesthetic improvements, as well as the ability to put colour background pixmaps (images) into almost every widget.

Version 1.0b only had the pixmap feature in it, whilst in this version I went and made numerous other improvements, which makes it a great replacement even without pixmaps.

I call this the better than Motif look and feel widget set.
With appropriate images, you can have very nice looking Xaw based apps, especially if you combine it with Rastermans Enlightenmentwindow manager.

Xaw-Xpm speaks! Check out the new features in this version, including sound!

I intend to make Xaw-Xpm a complete project which improves the look of Xaw to beyond that of any other GUI widget set, and have added such features as shaped widgets (extending way beyond the current simple shapes), bordered text, sound, etc.
I soon hope to recode some common Xaw-based applications to take better advantage of Xaw-Xpm, just like there are some that are modified for Xaw3d.

Standard X resources are used in setting the pixmaps, allowing you to set them in your .Xdefaults (or .Xresources) file. You can also change them dynamically with editres. If you dont know how to do any of these, then I suggest you RTFM. As an example, this resource will set the background pixmap for every button in Xedit:

	xedit*Command.pixmapName: /usr/local/pixmaps/marble3.xpm
You need the Xpm library to compile/run Xaw-Xpm. It's available at most X mirrors. Xaw-Xpm has been tested to run on Linux, and should also compile/run on any other flavour of Unix supporting the Xpm library.

Here are a couple of screenshots of Xaw-Xpm.

  • A 307k full screenshot with colour pixmaps and the enlightenment WM as well.
  • A 257k full screenshot without pixmaps - shows features, using mainly greyscale colours.

    Don't forget that if you don't like the pixmaps here, you can always put your own pixmaps in...so you've got no excuse for saying it's no good. :)

    If you've got a good Xaw-Xpm setup, mail me screenshots :)

    New resources added in Xaw-Xpm

    Resource Description Used in
    pixmapName Filename of pixmap used for the
    normal background of the widget.
    Almost every widget :)
    hlPixmap Filename of pixmap used for the
    'highlight' state of the widget. ie
    when the mouse pointer is over it.
    Command, Toggle,
    MenuButton, Others
    based on Command.
    setPixmap Pixmap to be used for the 'set'
    state of a widget, ie when it's pressed
    Command, Toggle
    thumbPixmap Pixmap used for the thumb (slider)
    of scrollbars
    sliderPixmap Pixmap to be used for the slider of
    the Panner widget (the thing in
    editres :)
    New since version 1.0b

    pixDir Directory to search for pixmaps.
    Current directory is also searched
    Widgets that use
    doubleArrow Whether to use an Amiga/NeXt style
    double arrow scrollbar
    thumbMargin Distance between scrollbar thumb
    and outer shadows
    showSliderMark Whether to show a 3d 'grip on
    scrollbar sliders
    notifySound Filename of .au file to play
    to /dev/audio when button has
    been pressed and released
    Command, Toggle
    Repeater, SmeBSB
    armSound .au file to play when button
    has been pressed in
    Command, Toggle,
    hlSound .au file to play when widget
    is highlighted. ie has the pointer
    over it
    Command, Toggle,
    MenuButton, etc
    drawTextBorder Whether to draw a 1 pixel wide
    outline around widget text
    Label, Command,
    textBorder Colour of widget text border Same as for
    shaped Whether to shape the widget Label,Command
    Toggle, etc
    shapeMask Filename of .xpm file used to
    determine widget shape. Uses
    'pixmapName' if unspecified
    Same as for
    downSound .au file to play when menu goes
    away. (Pops down)
    upSound .au file to play when menu appears SimpleMenu
    showGroove Whether to show a groove down the
    showArrows Whether to show end arrows Scrollbar

    Without and with Xaw-Xpm...which is better? (The one with I hope!:)

    Efficiency of Xaw-Xpm.

    Xaw-Xpm uses an efficient algorithm whereby a pixmap will only ever be loaded once, even if multiple widgets use it. This saves *masses* of memory, which would totally thrash your system if it had to load them for every widget.

    The core X11 widget base does have a 'backgroundPixmap' resource, which when set will set a widget's background to that pixmap. However, the pixmaps for that can only be created in the code of the application, and thus Xaw-Xpm's primary feature is that you can set the background pixmaps in a user environment, ie you dont have to code the pixmaps in, and thus dont need to recompile your applications.

    NOTE - If you want to use pixmaps and only have an 8 bit display, you should be careful as you can run out of colours.

    A number of pixmaps and sample resource files are included, with the setups similar to the ones in the screenshots above. The sample resources file that it comes with is here. See how easy it is to use? :)

    New features since 1.0b

    I've made significant improvements and fixes in Xaw-Xpm, which I've finally released. Below is a list of some of the improvements:

  • Fixed the *setPixmap bug.

  • Can set a pixmap directory (eg *pixDir: /usr/include/X11/pixmaps), saving having to specify full pixmap pathnames.

  • Added SOUND! Xaw-Xpm speaketh! There is now the ability to specify .au files to be played when certain widget events occur. :)

  • True 3d menus. Menu borders now have 3d bevels, rather than flat single colours. Menu lines (SmeLine) are 3d also.

  • Shaped widgets. Some widgets (currently (Sub)Classes of the Label widget) can be shaped, either by a specified pixmap or the background one.

  • Right hand scrollbars in the text widget. Also fixed a 'bug' in Xaw that let text be scrolled off the page.

  • New scrollbar style! A resource lets you change the style so that the arrows are both at one end of the scrollbar (Amiga/neXt style), or no arrows at all.

  • Some widgets can have a border placed around the actual text. This improves the clarity and look of the text. (Shown in the xman screenshot above)

  • Better colour handling in 8-bit displays - uses closest colours.

  • Miscellaneous improvements to widget look and feel.

  • New shadow type - ridge and groove style shadows available.

    If you want to see any other improvements, feel free to drop me a line.

    Download Xaw-Xpm

    The archive comes with sample pixmaps and resources. I suggest you download the that links to sunsite.unc.edu as this will be faster, unless you are in Australia. Both archives contain a Linux/ELF binary.

    Download Xaw-XPM-1.1.tar.gz with sample setups/pixmaps (1.4Mb from sunsite).

    Download Xaw-XPM-1.1.tar.gz (From Zip, in .au)

    Thanks to all those who offered suggestions, comments, etc, and especially to Rasterman for extensive testing and ideas.

    Enjoy! :)

    Known bugs/problems

    Some apps that create their own 'composite' widgets at compile time, such as xxgdb, xarchie, xclock and others might need recompiling with XawXpm and its include files, otherwise they may core dump. This is not a bug in XawXpm as such, but a side-effect of the modified widget structures.

    If your system isnt recognising the library (eg you get 'can't load library libXaw.so.6'), try putting a symlink to the library in /usr/lib called libXaw.so.6:

    # ls -l /usr/X11R6/lib/libXaw.so.6
    lrwxrwxrwx   1 root     root           13 Jul 30 13:58 /usr/X11R6/lib/libXaw.so.6 -> libXaw.so.6.0*
    # cd /usr/lib
    # ln -s /usr/X11R6/lib/libXaw.so.6
    # ls -l libXaw.so.6
    lrwxrwxrwx   1 root     root           15 Nov 30 03:28 libXaw.so.6 -> /usr/X11R6/lib/libXaw.so.6


    Here are a few cool things, some of them relate to XawXpm and the quest to beautify the linux/X11 desktop. :)

  • Enlightenment, a new window manager that looks better than *any* desktop GUI I've ever seen. :)

  • XBanner is just the thing you need to beautify that XDM login screen. :)

  • Linux penguin bootlogo - Kernel patch that displays the Linux penguin on the console while it's booting.

  • PNG Magick Netscape Plugin displays many image formats in the browser window.

  • Another Linux page of mine. You'll find Xbiff-Xpm here too. :)

  • We can't forget Zip Internet, Sydney's greatest ISP (and employer of me :)

    Contact me by email (bb@zip.com.au) or as rifleman on #zip (IceNet - /server irc.icenet.org)
    Ignore this spam tarpit though if you're a human.
    29 Nov 96

    Hosted on Virtually the best ISP. :)