]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/XPM.h
4d3da28d36e58b67f668914df2abaf9c1dbd6826
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.
52 XPM
**set
; ///< The stored XPMs.
53 int len
; ///< Current number of XPMs.
54 int maximum
; ///< Current maximum number of XPMs, increased by steps if reached.
55 int height
; ///< Memorize largest height of the set.
56 int width
; ///< Memorize largest width of the set.
63 void Add(int id
, const char *textForm
);
66 /// Give the largest height of the set.
68 /// Give the largest width of the set.