~ubuntu-branches/ubuntu/hardy/codeblocks/hardy-backports

« back to all changes in this revision

Viewing changes to src/sdk/wxscintilla/src/scintilla/src/Style.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Casadevall
  • Date: 2008-07-17 04:39:23 UTC
  • Revision ID: james.westby@ubuntu.com-20080717043923-gmsy5cwkdjswghkm
Tags: upstream-8.02
ImportĀ upstreamĀ versionĀ 8.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
11
/**
 
12
 */
 
13
class Style {
 
14
public:
 
15
        ColourPair fore;
 
16
        ColourPair back;
 
17
        bool aliasOfDefaultFont;
 
18
        bool bold;
 
19
        bool italic;
 
20
        int size;
 
21
        const char *fontName;
 
22
        int characterSet;
 
23
        bool eolFilled;
 
24
        bool underline;
 
25
        enum ecaseForced {caseMixed, caseUpper, caseLower};
 
26
        ecaseForced caseForce;
 
27
        bool visible;
 
28
        bool changeable;
 
29
        bool hotspot;
 
30
 
 
31
        Font font;
 
32
        int sizeZoomed;
 
33
        unsigned int lineHeight;
 
34
        unsigned int ascent;
 
35
        unsigned int descent;
 
36
        unsigned int externalLeading;
 
37
        unsigned int aveCharWidth;
 
38
        unsigned int spaceWidth;
 
39
 
 
40
        Style();
 
41
        Style(const Style &source);
 
42
        ~Style();
 
43
        Style &operator=(const Style &source);
 
44
        void Clear(ColourDesired fore_, ColourDesired back_,
 
45
                   int size_,
 
46
                   const char *fontName_, int characterSet_,
 
47
                   bool bold_, bool italic_, bool eolFilled_,
 
48
                   bool underline_, ecaseForced caseForce_,
 
49
                   bool visible_, bool changeable_, bool hotspot_);
 
50
        void ClearTo(const Style &source);
 
51
        bool EquivalentFontTo(const Style *other) const;
 
52
        void Realise(Surface &surface, int zoomLevel, Style *defaultStyle = 0, bool extraFontFlag = false);
 
53
        bool IsProtected() const { return !(changeable && visible);};
 
54
};
 
55
 
 
56
#endif