With the Resource Editor you should make any bitmaps and cursors to your X11 programs.
In the QT Widget programming you can use DIB bitmaps easily.
Cursor files are double bitmaps. One array for the cursor body and other for
mask.
Cursor bitmaps are 1 bit/pixel format arrays. All cursors' size are 32x32.
Here is a sample cursor and the file.
// CURSOR crArrow
#define crArrow_width 32
#define crArrow_height 32
#define crArrow_x 0
#define crArrow_y 0
static unsigned char crArrow_m[] = {
0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x0f, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
0x3f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00,
0xff, 0x03, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00,
0xff, 0x0f, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0xf7, 0x01, 0x00, 0x00,
0xe3, 0x01, 0x00, 0x00, 0xc1, 0x03, 0x00, 0x00,
0xc0, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00,
0x80, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static unsigned char crArrow_b[] = {
0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x21, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
0x81, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
0x01, 0x02, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00,
0x81, 0x0f, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00,
0x99, 0x00, 0x00, 0x00, 0x35, 0x01, 0x00, 0x00,
0x23, 0x01, 0x00, 0x00, 0x41, 0x02, 0x00, 0x00,
0x40, 0x02, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00,
0x80, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
The bitmap resources are simple byte-arrays, that contains natural
device independent bitmap files encoded by HEX-ASCII. This arrays are ready to
use to C/C++ programming.
Here is a simple bitmap and the array, like the ResEdit format.
// BITMAP bmKey_A
uchar bmKey_A[]=
{
0x42,0x4d,0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x28,0x00,
0x00,0x00,0x14,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,
0x00,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x80,
0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x80,
0x00,0x00,0x80,0x80,0x80,0x00,0xc0,0xc0,0xc0,0x00,0x00,0x00,0xff,0x00,0x00,0xff,
0x00,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff,
0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xf7,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
0x77,0x77,0xff,0x00,0xff,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0xff,0x00,
0xff,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x88,
0x88,0x88,0x88,0x88,0x88,0x77,0xff,0x00,0xff,0x88,0x00,0x08,0x88,0x88,0x80,0x00,
0x88,0x77,0xff,0x00,0xff,0x88,0x80,0x08,0x88,0x88,0x80,0x08,0x88,0x77,0xff,0x00,
0xff,0x88,0x80,0x00,0x88,0x88,0x00,0x08,0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x00,
0x88,0x88,0x00,0x88,0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x00,0x00,0x00,0x00,0x88,
0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x80,0x08,0x80,0x08,0x88,0x88,0x77,0xff,0x00,
0xff,0x88,0x88,0x80,0x08,0x80,0x08,0x88,0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x80,
0x08,0x80,0x08,0x88,0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x88,0x00,0x00,0x88,0x88,
0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x88,0x00,0x00,0x88,0x88,0x88,0x77,0xff,0x00,
0xff,0x88,0x88,0x88,0x80,0x08,0x88,0x88,0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x88,
0x88,0x88,0x88,0x88,0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
0x88,0x77,0xff,0x00,0xff,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x77,0xff,0x00,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xff,0x00,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,
};
The Cursor Editor is a simple bit-mask editor, like bitmap in the X systems. Parts of the program window:
The Bitmap Editor is a picture editor.
Maximum allowed size is 95X95 pixel and maximum colours is 16 or 256.
Parts of the program window:
This page made by: Zsolt Borka