/*
 * Copyright 1994-1995 TriloBYTE Software Solutions.
 *
 * Author: Amen Zwa, TriloBYTE.
 */



// static char* sccsid = "XmWidget: %W%\t%G%\tAmen Zwa, TriloBYTE.";



// WIcon.h: icon manager class



#if !defined(WICON_H)
#define WICON_H

#include "WEtc.h"



// black and white icon class
struct WIcon {
    Pixmap xpm;				// X pixmap
    WIcon() { xpm = 0; }
    WIcon(const char* ibit, int iw, int ih) {
	alloc(ibit, iw, ih); }
    ~WIcon() { free(); }
    void alloc(const char* ibit, int iw, int ih) {
	xpm = XCreateBitmapFromData(display, root_wnd, ibit, iw, ih); }
    void free() { if (xpm) XFreePixmap(display, xpm); }
};

#endif	// WICON_H
