1 /**************************************************************************
2 ** (c) Copyright 1998, Andromeda Technology & Automation
3 ***************************************************************************
4 ** MODULE INFORMATION *
5 ***********************
7 ** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
8 ** VERSION NUMBER : $Revision: 1.1 $
10 ** DESCRIPTION : Definition of icon class
12 ** EXPORTED OBJECTS : class icon
15 ***************************************************************************
16 ** ADMINISTRATIVE INFORMATION *
17 ********************************
18 ** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
19 ** CREATION DATE : Jul 13, 2000
21 **************************************************************************/
23 /*****************************
25 Revision 1.1 2002-07-25 08:01:27 arjen
26 First checkin, AXE release 0.2
28 *****************************/
30 /* static const char *RCSID = "$Id: icon.h,v 1.1 2002-07-25 08:01:27 arjen Exp $"; */
40 ///////////////////////////////////////////////////////////////////////////
43 // MEMBERS : pixmap picture;
47 // DESCRIPTION : An icon is a window that contains a pixmap.
48 // It automatically redraws on Expose events.
52 // LAST MODIFIED : Jul 13, 2000
53 ///////////////////////////////////////////////////////////////////////////
56 class icon : public window
60 virtual int EV_Expose(XExposeEvent ev);
64 icon(window &parent, int x, int y, char *data, unsigned int w, unsigned int h) :
65 window(parent, x, y, w, h)
67 //picture = XCreateBitmapFromData(stddpy, stddpy.Root(), data, w, h);
68 SelectInput(ExposureMask, 1);
71 icon(window &parent, int x, int y, char *pixmap_data[]) :
72 window(parent, x, y, 4, 4, 0)
74 picture.create(pixmap_data);
75 Resize(picture.Size());
76 SelectInput(ExposureMask, 1);
79 icon(window &parent, int x, int y, char *filename) : window(parent, x, y, 4, 4, 0)
81 picture.read(filename);
82 Resize(picture.Size());
83 SelectInput(ExposureMask, 1);
88 #endif /* AXE_ICON_H */