1 // Scintilla source code edit control
3 ** Defines the font and colour style for a class of text.
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.
15 struct FontSpecification
{
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
&);
41 void MakeAlias(Font
&fontOrigin
);
45 struct FontMeasurements
{
46 unsigned int lineHeight
;
49 unsigned int externalLeading
;
50 unsigned int aveCharWidth
;
51 unsigned int spaceWidth
;
59 class Style
: public FontSpecification
, public FontMeasurements
{
65 enum ecaseForced
{caseMixed
, caseUpper
, caseLower
};
66 ecaseForced caseForce
;
74 Style(const Style
&source
);
76 Style
&operator=(const Style
&source
);
77 void Clear(ColourDesired fore_
, ColourDesired back_
,
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
);}