scintilla: Update scintilla with changeset 3662:1d1c06df8a2f using gtk+3
[anjuta-extras.git] / plugins / scintilla / scintilla / Style.h
blob29122b0a43f5685b2687b238fa0e6aa7a6c91518
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.
8 #ifndef STYLE_H
9 #define STYLE_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 struct FontSpecification {
16 const char *fontName;
17 bool bold;
18 bool italic;
19 int size;
20 int characterSet;
21 int extraFontFlag;
22 FontSpecification() :
23 fontName(0),
24 bold(false),
25 italic(false),
26 size(10),
27 characterSet(0),
28 extraFontFlag(0) {
30 bool EqualTo(const FontSpecification &other) const;
33 // Just like Font but only has a copy of the FontID so should not delete it
34 class FontAlias : public Font {
35 // Private so FontAlias objects can not be copied
36 FontAlias(const FontAlias &);
37 FontAlias &operator=(const FontAlias &);
38 public:
39 FontAlias();
40 virtual ~FontAlias();
41 void MakeAlias(Font &fontOrigin);
42 void ClearFont();
45 struct FontMeasurements {
46 unsigned int lineHeight;
47 unsigned int ascent;
48 unsigned int descent;
49 unsigned int externalLeading;
50 unsigned int aveCharWidth;
51 unsigned int spaceWidth;
52 int sizeZoomed;
53 FontMeasurements();
54 void Clear();
57 /**
59 class Style : public FontSpecification, public FontMeasurements {
60 public:
61 ColourPair fore;
62 ColourPair back;
63 bool eolFilled;
64 bool underline;
65 enum ecaseForced {caseMixed, caseUpper, caseLower};
66 ecaseForced caseForce;
67 bool visible;
68 bool changeable;
69 bool hotspot;
71 FontAlias font;
73 Style();
74 Style(const Style &source);
75 ~Style();
76 Style &operator=(const Style &source);
77 void Clear(ColourDesired fore_, ColourDesired back_,
78 int size_,
79 const char *fontName_, int characterSet_,
80 bool bold_, bool italic_, bool eolFilled_,
81 bool underline_, ecaseForced caseForce_,
82 bool visible_, bool changeable_, bool hotspot_);
83 void ClearTo(const Style &source);
84 void Copy(Font &font_, const FontMeasurements &fm_);
85 bool IsProtected() const { return !(changeable && visible);}
88 #ifdef SCI_NAMESPACE
90 #endif
92 #endif