~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to scintilla/src/ViewStyle.h

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Scintilla source code edit control
 
2
/** @file ViewStyle.h
 
3
 ** Store information on how the document is to be viewed.
 
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 VIEWSTYLE_H
 
9
#define VIEWSTYLE_H
 
10
 
 
11
#ifdef SCI_NAMESPACE
 
12
namespace Scintilla {
 
13
#endif
 
14
 
 
15
/**
 
16
 */
 
17
class MarginStyle {
 
18
public:
 
19
        int style;
 
20
        int width;
 
21
        int mask;
 
22
        bool sensitive;
 
23
        int cursor;
 
24
        MarginStyle();
 
25
};
 
26
 
 
27
/**
 
28
 */
 
29
class FontNames {
 
30
private:
 
31
        char **names;
 
32
        int size;
 
33
        int max;
 
34
 
 
35
public:
 
36
        FontNames();
 
37
        ~FontNames();
 
38
        void Clear();
 
39
        const char *Save(const char *name);
 
40
};
 
41
 
 
42
enum IndentView {ivNone, ivReal, ivLookForward, ivLookBoth};
 
43
 
 
44
enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
 
45
 
 
46
/**
 
47
 */
 
48
class ViewStyle {
 
49
public:
 
50
        FontNames fontNames;
 
51
        size_t stylesSize;
 
52
        Style *styles;
 
53
        LineMarker markers[MARKER_MAX + 1];
 
54
        Indicator indicators[INDIC_MAX + 1];
 
55
        int lineHeight;
 
56
        unsigned int maxAscent;
 
57
        unsigned int maxDescent;
 
58
        unsigned int aveCharWidth;
 
59
        unsigned int spaceWidth;
 
60
        bool selforeset;
 
61
        ColourPair selforeground;
 
62
        ColourPair selAdditionalForeground;
 
63
        bool selbackset;
 
64
        ColourPair selbackground;
 
65
        ColourPair selAdditionalBackground;
 
66
        ColourPair selbackground2;
 
67
        int selAlpha;
 
68
        int selAdditionalAlpha;
 
69
        bool selEOLFilled;
 
70
        bool whitespaceForegroundSet;
 
71
        ColourPair whitespaceForeground;
 
72
        bool whitespaceBackgroundSet;
 
73
        ColourPair whitespaceBackground;
 
74
        ColourPair selbar;
 
75
        ColourPair selbarlight;
 
76
        bool foldmarginColourSet;
 
77
        ColourPair foldmarginColour;
 
78
        bool foldmarginHighlightColourSet;
 
79
        ColourPair foldmarginHighlightColour;
 
80
        bool hotspotForegroundSet;
 
81
        ColourPair hotspotForeground;
 
82
        bool hotspotBackgroundSet;
 
83
        ColourPair hotspotBackground;
 
84
        bool hotspotUnderline;
 
85
        bool hotspotSingleLine;
 
86
        /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
 
87
        enum { margins=5 };
 
88
        int leftMarginWidth;    ///< Spacing margin on left of text
 
89
        int rightMarginWidth;   ///< Spacing margin on left of text
 
90
        bool symbolMargin;
 
91
        int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
 
92
        MarginStyle ms[margins];
 
93
        int fixedColumnWidth;
 
94
        int zoomLevel;
 
95
        WhiteSpaceVisibility viewWhitespace;
 
96
        int whitespaceSize;
 
97
        IndentView viewIndentationGuides;
 
98
        bool viewEOL;
 
99
        bool showMarkedLines;
 
100
        ColourPair caretcolour;
 
101
        ColourPair additionalCaretColour;
 
102
        bool showCaretLineBackground;
 
103
        ColourPair caretLineBackground;
 
104
        int caretLineAlpha;
 
105
        ColourPair edgecolour;
 
106
        int edgeState;
 
107
        int caretStyle;
 
108
        int caretWidth;
 
109
        bool someStylesProtected;
 
110
        bool someStylesForceCase;
 
111
        int extraFontFlag;
 
112
        int extraAscent;
 
113
        int extraDescent;
 
114
        int marginStyleOffset;
 
115
        int annotationVisible;
 
116
        int annotationStyleOffset;
 
117
 
 
118
        ViewStyle();
 
119
        ViewStyle(const ViewStyle &source);
 
120
        ~ViewStyle();
 
121
        void Init(size_t stylesSize_=64);
 
122
        void RefreshColourPalette(Palette &pal, bool want);
 
123
        void Refresh(Surface &surface);
 
124
        void AllocStyles(size_t sizeNew);
 
125
        void EnsureStyle(size_t index);
 
126
        void ResetDefaultStyle();
 
127
        void ClearStyles();
 
128
        void SetStyleFontName(int styleIndex, const char *name);
 
129
        bool ProtectionActive() const;
 
130
        bool ValidStyle(size_t styleIndex) const;
 
131
};
 
132
 
 
133
#ifdef SCI_NAMESPACE
 
134
}
 
135
#endif
 
136
 
 
137
#endif