]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/stc/scintilla/src/XPM.h
948e557a924c7c243dfbebf1b11beb76aa66a9b1
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.
12 * Hold a pixmap in XPM format.
15 int id
; // Assigned by container
23 ColourAllocated
ColourFromCode(int ch
);
24 void FillRun(Surface
*surface
, int code
, int startX
, int y
, int x
);
26 ColourPair
*colourCodeTable
[256];
28 XPM(const char *textForm
);
29 XPM(const char * const *linesForm
);
31 void Init(const char *textForm
);
32 void Init(const char * const *linesForm
);
34 // Similar to same named method in ViewStyle:
35 void RefreshColourPalette(Palette
&pal
, bool want
);
36 // No palette used, so just copy the desired colours to the allocated colours:
37 void CopyDesiredColours();
38 // Decompose image into runs and use FillRectangle for each run:
39 void Draw(Surface
*surface
, PRectangle
&rc
);
40 char **InLinesForm() { return lines
; }
41 void SetId(int id_
) { id
= id_
; }
42 int GetId() { return id
; }
43 int GetHeight() { return height
; }
44 int GetWidth() { return width
; }
45 static const char **LinesFormFromTextForm(const char *textForm
);
49 * A collection of pixmaps indexed by integer id.
61 void Add(int id
, const char *textForm
);