Update Scintilla to version 3.7.1
[geany-mirror.git] / scintilla / src / EditModel.cxx
blob0f64e07f9b2ff39e72e4718e657143a02a678dfb
1 // Scintilla source code edit control
2 /** @file EditModel.cxx
3 ** Defines the editor state that must be visible to EditorView.
4 **/
5 // Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #include <stdlib.h>
9 #include <string.h>
10 #include <stdio.h>
11 #include <math.h>
12 #include <assert.h>
13 #include <ctype.h>
15 #include <stdexcept>
16 #include <string>
17 #include <vector>
18 #include <map>
19 #include <algorithm>
20 #include <memory>
22 #include "Platform.h"
24 #include "ILexer.h"
25 #include "Scintilla.h"
27 #include "StringCopy.h"
28 #include "Position.h"
29 #include "SplitVector.h"
30 #include "Partitioning.h"
31 #include "RunStyles.h"
32 #include "ContractionState.h"
33 #include "CellBuffer.h"
34 #include "KeyMap.h"
35 #include "Indicator.h"
36 #include "XPM.h"
37 #include "LineMarker.h"
38 #include "Style.h"
39 #include "ViewStyle.h"
40 #include "CharClassify.h"
41 #include "Decoration.h"
42 #include "CaseFolder.h"
43 #include "Document.h"
44 #include "UniConversion.h"
45 #include "Selection.h"
46 #include "PositionCache.h"
47 #include "EditModel.h"
49 #ifdef SCI_NAMESPACE
50 using namespace Scintilla;
51 #endif
53 Caret::Caret() :
54 active(false), on(false), period(500) {}
56 EditModel::EditModel() {
57 inOverstrike = false;
58 xOffset = 0;
59 trackLineWidth = false;
60 posDrag = SelectionPosition(invalidPosition);
61 braces[0] = invalidPosition;
62 braces[1] = invalidPosition;
63 bracesMatchStyle = STYLE_BRACEBAD;
64 highlightGuideColumn = 0;
65 primarySelection = true;
66 imeInteraction = imeWindowed;
67 foldFlags = 0;
68 foldDisplayTextStyle = SC_FOLDDISPLAYTEXT_HIDDEN;
69 hotspot = Range(invalidPosition);
70 hoverIndicatorPos = invalidPosition;
71 wrapWidth = LineLayout::wrapWidthInfinite;
72 pdoc = new Document();
73 pdoc->AddRef();
76 EditModel::~EditModel() {
77 pdoc->Release();
78 pdoc = 0;