OSDN Git Service

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