Update Tortoise.pot
[TortoiseGit.git] / ext / scintilla / src / EditModel.cxx
blob91d6ae6eaabe739c9252d2bbe2187d5b7f139b4e
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 <cstddef>
9 #include <cstdlib>
10 #include <cassert>
11 #include <cstring>
12 #include <cmath>
14 #include <stdexcept>
15 #include <string>
16 #include <vector>
17 #include <map>
18 #include <algorithm>
19 #include <memory>
21 #include "Platform.h"
23 #include "ILexer.h"
24 #include "Scintilla.h"
26 #include "StringCopy.h"
27 #include "Position.h"
28 #include "UniqueString.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(Sci::invalidPosition);
61 braces[0] = Sci::invalidPosition;
62 braces[1] = Sci::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(Sci::invalidPosition);
70 hoverIndicatorPos = Sci::invalidPosition;
71 wrapWidth = LineLayout::wrapWidthInfinite;
72 pdoc = new Document();
73 pdoc->AddRef();
76 EditModel::~EditModel() {
77 pdoc->Release();
78 pdoc = 0;