]> git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/Style.h
63259b1a93b9edf6bfc41ea9995b81eebef5a75a
[wxWidgets.git] / src / stc / scintilla / src / Style.h
1 // Scintilla source code edit control
2 /** @file Style.h
3 ** Defines the font and colour style for a class of text.
4 **/
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
7
8 #ifndef STYLE_H
9 #define STYLE_H
10
11 /**
12 */
13 class Style {
14 public:
15 ColourPair fore;
16 ColourPair back;
17 bool aliasOfDefaultFont;
18 bool bold;
19 bool italic;
20 int size;
21 const char *fontName;
22 int characterSet;
23 bool eolFilled;
24 bool underline;
25 enum ecaseForced {caseMixed, caseUpper, caseLower};
26 ecaseForced caseForce;
27 bool visible;
28 bool changeable;
29
30 Font font;
31 int sizeZoomed;
32 unsigned int lineHeight;
33 unsigned int ascent;
34 unsigned int descent;
35 unsigned int externalLeading;
36 unsigned int aveCharWidth;
37 unsigned int spaceWidth;
38
39 Style();
40 Style(const Style &source);
41 ~Style();
42 Style &operator=(const Style &source);
43 void Clear(ColourDesired fore_, ColourDesired back_,
44 int size_,
45 const char *fontName_, int characterSet_,
46 bool bold_, bool italic_, bool eolFilled_,
47 bool underline_, ecaseForced caseForce_,
48 bool visible_, bool changeable_);
49 void ClearTo(const Style &source);
50 bool EquivalentFontTo(const Style *other) const;
51 void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0);
52 bool IsProtected() { return !(changeable && visible);} ;
53 };
54
55 #endif