]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/Style.h
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
{
24 weight(SC_WEIGHT_NORMAL
),
26 size(10 * SC_FONT_SIZE_MULTIPLIER
),
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
{
48 XYPOSITION aveCharWidth
;
49 XYPOSITION spaceWidth
;
57 class Style
: public FontSpecification
, public FontMeasurements
{
63 enum ecaseForced
{caseMixed
, caseUpper
, caseLower
};
64 ecaseForced caseForce
;
72 Style(const Style
&source
);
74 Style
&operator=(const Style
&source
);
75 void Clear(ColourDesired fore_
, ColourDesired back_
,
77 const char *fontName_
, int characterSet_
,
78 int weight_
, bool italic_
, bool eolFilled_
,
79 bool underline_
, ecaseForced caseForce_
,
80 bool visible_
, bool changeable_
, bool hotspot_
);
81 void ClearTo(const Style
&source
);
82 void Copy(Font
&font_
, const FontMeasurements
&fm_
);
83 bool IsProtected() const { return !(changeable
&& visible
);}