Update Scintilla to 3.5.1 pre-release
[geany-mirror.git] / scintilla / src / EditModel.h
blobd8def32942ea9dbffa2ecc58d005e1b673fd3df9
1 // Scintilla source code edit control
2 /** @file EditModel.h
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 #ifndef EDITMODEL_H
9 #define EDITMODEL_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 /**
17 class Caret {
18 public:
19 bool active;
20 bool on;
21 int period;
23 Caret();
26 class EditModel {
27 // Private so EditModel objects can not be copied
28 EditModel(const EditModel &);
29 EditModel &operator=(const EditModel &);
31 public:
32 bool inOverstrike;
33 int xOffset; ///< Horizontal scrolled amount in pixels
34 bool trackLineWidth;
36 SpecialRepresentations reprs;
37 Caret caret;
38 SelectionPosition posDrag;
39 Position braces[2];
40 int bracesMatchStyle;
41 int highlightGuideColumn;
42 Selection sel;
43 bool primarySelection;
45 enum IMEInteraction { imeWindowed, imeInline } imeInteraction;
47 int foldFlags;
48 ContractionState cs;
49 // Hotspot support
50 Range hotspot;
52 // Wrapping support
53 int wrapWidth;
55 Document *pdoc;
57 EditModel();
58 virtual ~EditModel();
59 virtual int TopLineOfMain() const = 0;
60 virtual Point GetVisibleOriginInMain() const = 0;
61 virtual int LinesOnScreen() const = 0;
62 virtual Range GetHotSpotRange() const = 0;
65 #ifdef SCI_NAMESPACE
67 #endif
69 #endif