Generate a stable file list of the help files for the installer
[TortoiseGit.git] / ext / scintilla / src / EditModel.h
blob5975f6447c08013c6986856922a73a72cfb70b0f
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::Internal {
13 /**
15 class Caret {
16 public:
17 bool active;
18 bool on;
19 int period;
21 Caret() noexcept;
24 class EditModel {
25 public:
26 bool inOverstrike;
27 int xOffset; ///< Horizontal scrolled amount in pixels
28 bool trackLineWidth;
30 std::unique_ptr<SpecialRepresentations> reprs;
31 Caret caret;
32 SelectionPosition posDrag;
33 Sci::Position braces[2];
34 int bracesMatchStyle;
35 int highlightGuideColumn;
36 bool hasFocus;
37 Selection sel;
38 bool primarySelection;
39 std::string copySeparator;
41 Scintilla::IMEInteraction imeInteraction;
42 Scintilla::Bidirectional bidirectional;
44 Scintilla::FoldFlag foldFlags;
45 Scintilla::FoldDisplayTextStyle foldDisplayTextStyle;
46 UniqueString defaultFoldDisplayText;
47 std::unique_ptr<IContractionState> pcs;
48 // Hotspot support
49 Range hotspot;
50 bool hotspotSingleLine;
51 Sci::Position hoverIndicatorPos;
53 Scintilla::ChangeHistoryOption changeHistoryOption = Scintilla::ChangeHistoryOption::Disabled;
55 // Wrapping support
56 int wrapWidth;
58 Document *pdoc;
60 EditModel();
61 // Deleted so EditModel objects can not be copied.
62 EditModel(const EditModel &) = delete;
63 EditModel(EditModel &&) = delete;
64 EditModel &operator=(const EditModel &) = delete;
65 EditModel &operator=(EditModel &&) = delete;
66 virtual ~EditModel();
67 virtual Sci::Line TopLineOfMain() const noexcept = 0;
68 virtual Point GetVisibleOriginInMain() const = 0;
69 virtual Sci::Line LinesOnScreen() const = 0;
70 bool BidirectionalEnabled() const noexcept;
71 bool BidirectionalR2L() const noexcept;
72 SurfaceMode CurrentSurfaceMode() const noexcept;
73 void SetDefaultFoldDisplayText(const char *text);
74 const char *GetDefaultFoldDisplayText() const noexcept;
75 const char *GetFoldDisplayText(Sci::Line lineDoc) const noexcept;
76 InSelection LineEndInSelection(Sci::Line lineDoc) const;
77 [[nodiscard]] int GetMark(Sci::Line line) const;
82 #endif