A VST plug-in is a Library.
An array of type CResTable, named xpmResources, must be defined in one of the VST Plug-ins files, and the files, which contain the pixmaps used, have to be included too. These pixmap files are in XPM format (XPM stands for X PixMap). For futher informations about this format see the location :
http://www.inria.fr/koala/lehors/xpm.htmlCResTable
is defined as an array of :
struct CResTableEntry {
int id; // ident
char **xpm; // pointer to the xpm structure
};
id
is the ident which will be used to initialize a bitmap
object. xpm
is a pointer to a structure defined in the
pixmap XPM format.
Note that the last element of this array should be {0, 0}
!
enum {
// MUST BE >= 128 (for MAC) !!
kBackgroundBitmap =1000,
kLeftRightBitmap
};
#if MOTIF
#include "sco100.xpm"
#include "sco101.xpm"
CResTable xpmResources = {
{kBackgroundBitmap , sco100},
{kLeftRightBitmap , sco101},
{0, 0}
};
#endif
// init the bitmap with the identifier
CBitmap *bitmap = new CBitmap (kBackgroundBitmap);
...
With sco100.xpm, for example:
/* XPM */
static char *sco100[] = {
/* width height num_colors chars_per_pixel */
" 7 7 3 1",
/* colors */
"# c #ffe0e0",
"a c #ffb7b7",
/* pixels */
"..###..",
".#####.",
"##aa###",
"##aa###",
"##aa###",
".#####.",
"..###.."
};