@file
#ifndef XPM_H
#define XPM_H
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
class XPM {
int pid;
int height;
int width;
int nColours;
char *data;
char codeTransparent;
char *codes;
ColourPair *colours;
ColourAllocated ColourFromCode(int ch);
void FillRun(Surface *surface, int code, int startX, int y, int x);
char **lines;
ColourPair *colourCodeTable[256];
public:
XPM(const char *textForm);
XPM(const char * const *linesForm);
~XPM();
void Init(const char *textForm);
void Init(const char * const *linesForm);
void Clear();
void RefreshColourPalette(Palette &pal, bool want);
void CopyDesiredColours();
void Draw(Surface *surface, PRectangle &rc);
char **InLinesForm() { return lines; }
void SetId(int pid_) { pid = pid_; }
int GetId() { return pid; }
int GetHeight() { return height; }
int GetWidth() { return width; }
static const char **LinesFormFromTextForm(const char *textForm);
};
class XPMSet {
XPM **set;
int len;
int maximum;
int height;
int width;
public:
XPMSet();
~XPMSet();
void Clear();
void Add(int id, const char *textForm);
XPM *Get(int id);
int GetHeight();
int GetWidth();
};
#ifdef SCI_NAMESPACE
}
#endif
#endif