From c196d2fc7c3ece7ccb7d89c425499a75ead7e59b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 8 Mar 2000 01:43:56 +0000 Subject: Initial revision --- src/ViewStyle.h | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/ViewStyle.h (limited to 'src/ViewStyle.h') diff --git a/src/ViewStyle.h b/src/ViewStyle.h new file mode 100644 index 000000000..4436e83ff --- /dev/null +++ b/src/ViewStyle.h @@ -0,0 +1,72 @@ +// Scintilla source code edit control +// ViewStyle.h - store information on how the document is to be viewed +// Copyright 1998-2000 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef VIEWSTYLE_H +#define VIEWSTYLE_H + +class MarginStyle { +public: + bool symbol; + int width; + int mask; + bool sensitive; + MarginStyle(); +}; + +class FontNames { +private: + char *names[STYLE_MAX + 1]; + int max; +public: + FontNames(); + ~FontNames(); + void Clear(); + const char *Save(const char *name); +}; + +class ViewStyle { +public: + FontNames fontNames; + Style styles[STYLE_MAX + 1]; + LineMarker markers[MARKER_MAX + 1]; + Indicator indicators[INDIC_MAX + 1]; + int lineHeight; + unsigned int maxAscent; + unsigned int maxDescent; + unsigned int aveCharWidth; + unsigned int spaceWidth; + bool selforeset; + ColourPair selforeground; + bool selbackset; + ColourPair selbackground; + ColourPair selbar; + ColourPair selbarlight; + // Margins are ordered: Line Numbers, Selection Margin, Spacing Margin + int leftMarginWidth; // Spacing margin on left of text + int rightMarginWidth; // Spacing margin on left of text + enum { margins=3 }; + bool symbolMargin; + int maskInLine; // Mask for markers to be put into text because there is nowhere for them to go in margin + MarginStyle ms[margins]; + int fixedColumnWidth; + int zoomLevel; + bool viewWhitespace; + bool viewEOL; + bool showMarkedLines; + ColourPair caretcolour; + ColourPair edgecolour; + + ViewStyle(); + ViewStyle(const ViewStyle &source); + ~ViewStyle(); + void Init(); + void RefreshColourPalette(Palette &pal, bool want); + void Refresh(Surface &surface); + void ResetDefaultStyle(); + void ClearStyles(); + void SetStyleFontName(int styleIndex, const char *name); +}; + +#endif -- cgit v1.2.3