Update Scintilla to version 3.10.4
[geany-mirror.git] / scintilla / src / EditModel.h
blobab5c23cdb9e41aecf91f2dea5dddd7b77ab4757d
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 namespace Scintilla {
13 /**
15 class Caret {
16 public:
17 bool active;
18 bool on;
19 int period;
21 Caret();
24 class EditModel {
25 public:
26 bool inOverstrike;
27 int xOffset; ///< Horizontal scrolled amount in pixels
28 bool trackLineWidth;
30 SpecialRepresentations reprs;
31 Caret caret;
32 SelectionPosition posDrag;
33 Sci::Position braces[2];
34 int bracesMatchStyle;
35 int highlightGuideColumn;
36 Selection sel;
37 bool primarySelection;
39 enum IMEInteraction { imeWindowed, imeInline } imeInteraction;
41 int foldFlags;
42 int foldDisplayTextStyle;
43 UniqueString defaultFoldDisplayText;
44 std::unique_ptr<IContractionState> pcs;
45 // Hotspot support
46 Range hotspot;
47 Sci::Position hoverIndicatorPos;
49 // Wrapping support
50 int wrapWidth;
52 Document *pdoc;
54 EditModel();
55 // Deleted so EditModel objects can not be copied.
56 EditModel(const EditModel &) = delete;
57 EditModel(EditModel &&) = delete;
58 EditModel &operator=(const EditModel &) = delete;
59 EditModel &operator=(EditModel &&) = delete;
60 virtual ~EditModel();
61 virtual Sci::Line TopLineOfMain() const = 0;
62 virtual Point GetVisibleOriginInMain() const = 0;
63 virtual Sci::Line LinesOnScreen() const = 0;
64 virtual Range GetHotSpotRange() const noexcept = 0;
65 void SetDefaultFoldDisplayText(const char *text);
66 const char *GetDefaultFoldDisplayText() const noexcept;
67 const char *GetFoldDisplayText(Sci::Line lineDoc) const;
72 #endif