geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Style.h
Go to the documentation of this file.
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
11namespace Scintilla {
12
14 const char *fontName;
15 int weight;
16 bool italic;
17 int size;
20 FontSpecification() noexcept :
21 fontName(nullptr),
23 italic(false),
25 characterSet(0),
26 extraFontFlag(0) {
27 }
28 bool operator==(const FontSpecification &other) const noexcept;
29 bool operator<(const FontSpecification &other) const noexcept;
30};
31
32// Just like Font but only has a copy of the FontID so should not delete it
33class FontAlias : public Font {
34public:
35 FontAlias() noexcept;
36 // FontAlias objects can not be assigned except for initialization
37 FontAlias(const FontAlias &) noexcept;
38 FontAlias(FontAlias &&) = delete;
39 FontAlias &operator=(const FontAlias &) = delete;
41 ~FontAlias() override;
42 void MakeAlias(const Font &fontOrigin) noexcept;
43 void ClearFont() noexcept;
44};
45
47 unsigned int ascent;
48 unsigned int descent;
49 XYPOSITION capitalHeight; // Top of capital letter to baseline: ascent - internal leading
53 FontMeasurements() noexcept;
54 void ClearMeasurements() noexcept;
55};
56
57/**
58 */
60public:
65 enum ecaseForced {caseMixed, caseUpper, caseLower, caseCamel};
67 bool visible;
69 bool hotspot;
70
72
73 Style();
74 Style(const Style &source) noexcept;
75 // Style objects should not be moved but MSVC 2015 requires this.
76 Style(Style &&) = default;
77 ~Style();
78 Style &operator=(const Style &source) noexcept;
79 Style &operator=(Style &&) = delete;
80 void Clear(ColourDesired fore_, ColourDesired back_,
81 int size_,
82 const char *fontName_, int characterSet_,
83 int weight_, bool italic_, bool eolFilled_,
84 bool underline_, ecaseForced caseForce_,
85 bool visible_, bool changeable_, bool hotspot_) noexcept;
86 void ClearTo(const Style &source) noexcept;
87 void Copy(const Font &font_, const FontMeasurements &fm_) noexcept;
88 bool IsProtected() const noexcept { return !(changeable && visible);}
89};
90
91}
92
93#endif
#define SC_WEIGHT_NORMAL
Definition: Scintilla.h:260
#define SC_FONT_SIZE_MULTIPLIER
Definition: Scintilla.h:257
FontAlias() noexcept
Definition: Style.cxx:19
FontAlias & operator=(const FontAlias &)=delete
FontAlias & operator=(FontAlias &&)=delete
FontAlias(FontAlias &&)=delete
void MakeAlias(const Font &fontOrigin) noexcept
Definition: Style.cxx:31
~FontAlias() override
Definition: Style.cxx:26
void ClearFont() noexcept
Definition: Style.cxx:35
ColourDesired back
Definition: Style.h:62
ecaseForced caseForce
Definition: Style.h:66
Style & operator=(Style &&)=delete
Style(Style &&)=default
bool IsProtected() const noexcept
Definition: Style.h:88
ColourDesired fore
Definition: Style.h:61
bool hotspot
Definition: Style.h:69
bool visible
Definition: Style.h:67
bool changeable
Definition: Style.h:68
FontAlias font
Definition: Style.h:71
bool underline
Definition: Style.h:64
bool eolFilled
Definition: Style.h:63
Styling buffer using one element for each run rather than using a filled buffer.
Definition: Converter.h:9
float XYPOSITION
Definition: Platform.h:81
unsigned int ascent
Definition: Style.h:47
XYPOSITION spaceWidth
Definition: Style.h:51
unsigned int descent
Definition: Style.h:48
XYPOSITION aveCharWidth
Definition: Style.h:50
XYPOSITION capitalHeight
Definition: Style.h:49
bool operator==(const FontSpecification &other) const noexcept
Definition: Style.cxx:39
FontSpecification() noexcept
Definition: Style.h:20
const char * fontName
Definition: Style.h:14
bool operator<(const FontSpecification &other) const noexcept
Definition: Style.cxx:48