1
// Scintilla source code edit control
3
** Define a class that holds data in the X Pixmap (XPM) format.
5
// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
6
// The License.txt file describes the conditions under which this software may be distributed.
16
* Hold a pixmap in XPM format.
19
int pid; // Assigned by container
27
ColourAllocated ColourFromCode(int ch) const;
28
void FillRun(Surface *surface, int code, int startX, int y, int x);
30
ColourPair *colourCodeTable[256];
32
XPM(const char *textForm);
33
XPM(const char *const *linesForm);
35
void Init(const char *textForm);
36
void Init(const char *const *linesForm);
38
/// Similar to same named method in ViewStyle:
39
void RefreshColourPalette(Palette &pal, bool want);
40
/// No palette used, so just copy the desired colours to the allocated colours
41
void CopyDesiredColours();
42
/// Decompose image into runs and use FillRectangle for each run
43
void Draw(Surface *surface, PRectangle &rc);
44
char **InLinesForm() { return lines; }
45
void SetId(int pid_) { pid = pid_; }
46
int GetId() const { return pid; }
47
int GetHeight() const { return height; }
48
int GetWidth() const { return width; }
49
static const char **LinesFormFromTextForm(const char *textForm);
53
* A collection of pixmaps indexed by integer id.
56
XPM **set; ///< The stored XPMs.
57
int len; ///< Current number of XPMs.
58
int maximum; ///< Current maximum number of XPMs, increased by steps if reached.
59
int height; ///< Memorize largest height of the set.
60
int width; ///< Memorize largest width of the set.
67
void Add(int id, const char *textForm);
70
/// Give the largest height of the set.
72
/// Give the largest width of the set.