~ubuntu-branches/ubuntu/wily/apparmor/wily

« back to all changes in this revision

Viewing changes to deprecated/management/profile-editor/src/wxStyledTextCtrl/ViewStyle.h

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-08-10 18:12:34 UTC
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20110810181234-b6obckg60cp99crg
Tags: upstream-2.7.0~beta1+bzr1774
ImportĀ upstreamĀ versionĀ 2.7.0~beta1+bzr1774

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
 
/**
12
 
 */
13
 
class MarginStyle {
14
 
public:
15
 
        bool symbol;
16
 
        int width;
17
 
        int mask;
18
 
        bool sensitive;
19
 
        MarginStyle();
20
 
};
21
 
 
22
 
/**
23
 
 */
24
 
class FontNames {
25
 
private:
26
 
        char *names[STYLE_MAX + 1];
27
 
        int max;
28
 
 
29
 
public:
30
 
        FontNames();
31
 
        ~FontNames();
32
 
        void Clear();
33
 
        const char *Save(const char *name);
34
 
};
35
 
 
36
 
enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterIndent=2};
37
 
 
38
 
/**
39
 
 */
40
 
class ViewStyle {
41
 
public:
42
 
        FontNames fontNames;
43
 
        Style styles[STYLE_MAX + 1];
44
 
        LineMarker markers[MARKER_MAX + 1];
45
 
        Indicator indicators[INDIC_MAX + 1];
46
 
        int lineHeight;
47
 
        unsigned int maxAscent;
48
 
        unsigned int maxDescent;
49
 
        unsigned int aveCharWidth;
50
 
        unsigned int spaceWidth;
51
 
        bool selforeset;
52
 
        ColourPair selforeground;
53
 
        bool selbackset;
54
 
        ColourPair selbackground;
55
 
        ColourPair selbackground2;
56
 
        bool whitespaceForegroundSet;
57
 
        ColourPair whitespaceForeground;
58
 
        bool whitespaceBackgroundSet;
59
 
        ColourPair whitespaceBackground;
60
 
        ColourPair selbar;
61
 
        ColourPair selbarlight;
62
 
        bool foldmarginColourSet;
63
 
        ColourPair foldmarginColour;
64
 
        bool foldmarginHighlightColourSet;
65
 
        ColourPair foldmarginHighlightColour;
66
 
        bool hotspotForegroundSet;
67
 
        ColourPair hotspotForeground;
68
 
        bool hotspotBackgroundSet;
69
 
        ColourPair hotspotBackground;
70
 
        bool hotspotUnderline;
71
 
        bool hotspotSingleLine;
72
 
        /// Margins are ordered: Line Numbers, Selection Margin, Spacing Margin
73
 
        enum { margins=3 };
74
 
        int leftMarginWidth;    ///< Spacing margin on left of text
75
 
        int rightMarginWidth;   ///< Spacing margin on left of text
76
 
        bool symbolMargin;
77
 
        int maskInLine; ///< Mask for markers to be put into text because there is nowhere for them to go in margin
78
 
        MarginStyle ms[margins];
79
 
        int fixedColumnWidth;
80
 
        int zoomLevel;
81
 
        WhiteSpaceVisibility viewWhitespace;
82
 
        bool viewIndentationGuides;
83
 
        bool viewEOL;
84
 
        bool showMarkedLines;
85
 
        ColourPair caretcolour;
86
 
        bool showCaretLineBackground;
87
 
        ColourPair caretLineBackground;
88
 
        ColourPair edgecolour;
89
 
        int edgeState;
90
 
        int caretWidth;
91
 
        bool someStylesProtected;
92
 
        bool extraFontFlag;
93
 
 
94
 
        ViewStyle();
95
 
        ViewStyle(const ViewStyle &source);
96
 
        ~ViewStyle();
97
 
        void Init();
98
 
        void RefreshColourPalette(Palette &pal, bool want);
99
 
        void Refresh(Surface &surface);
100
 
        void ResetDefaultStyle();
101
 
        void ClearStyles();
102
 
        void SetStyleFontName(int styleIndex, const char *name);
103
 
        bool ProtectionActive() const;
104
 
};
105
 
 
106
 
#endif