diff options
author | Neil <nyamatongwe@gmail.com> | 2014-07-08 18:05:35 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-07-08 18:05:35 +1000 |
commit | 5bfc97a368eb7c8d3c78b0c454be806d6dcb6340 (patch) | |
tree | ccca6ba6e81d9cb3e98abf36d1eeaf7eb98c92a4 /src/EditModel.h | |
parent | 1e8908c6d5fd998e9d8a9408a6b86ef4a2ff64e8 (diff) | |
download | scintilla-mirror-5bfc97a368eb7c8d3c78b0c454be806d6dcb6340.tar.gz |
Split out EditModel, MarginView, and EditView classes into separate files.
Diffstat (limited to 'src/EditModel.h')
-rw-r--r-- | src/EditModel.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/EditModel.h b/src/EditModel.h new file mode 100644 index 000000000..86d2cd40e --- /dev/null +++ b/src/EditModel.h @@ -0,0 +1,67 @@ +// Scintilla source code edit control +/** @file EditModel.h + ** Defines the editor state that must be visible to EditorView. + **/ +// Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef EDITMODEL_H +#define EDITMODEL_H + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +/** +*/ +class Caret { +public: + bool active; + bool on; + int period; + + Caret(); +}; + +class EditModel { + // Private so EditModel objects can not be copied + EditModel(const EditModel &); + EditModel &operator=(const EditModel &); + +public: + bool inOverstrike; + int xOffset; ///< Horizontal scrolled amount in pixels + bool trackLineWidth; + + SpecialRepresentations reprs; + Caret caret; + SelectionPosition posDrag; + Position braces[2]; + int bracesMatchStyle; + int highlightGuideColumn; + Selection sel; + bool primarySelection; + + int foldFlags; + ContractionState cs; + // Hotspot support + Range hotspot; + + // Wrapping support + int wrapWidth; + + Document *pdoc; + + EditModel(); + ~EditModel(); + virtual int TopLineOfMain() const = 0; + virtual Point GetVisibleOriginInMain() const = 0; + virtual int LinesOnScreen() const = 0; + virtual Range GetHotSpotRange() const = 0; +}; + +#ifdef SCI_NAMESPACE +} +#endif + +#endif |