blob: 9c47d6c0826e2f7b47dcc9efb0817aa068230793 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/** @file Decoration.h
** Visual elements added over text.
**/
// Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef DECORATION_H
#define DECORATION_H
namespace Scintilla::Internal {
class IDecoration {
public:
virtual ~IDecoration() {}
virtual bool Empty() const noexcept = 0;
virtual int Indicator() const noexcept = 0;
virtual Sci::Position Length() const noexcept = 0;
virtual int ValueAt(Sci::Position position) const noexcept = 0;
virtual Sci::Position StartRun(Sci::Position position) const noexcept = 0;
virtual Sci::Position EndRun(Sci::Position position) const noexcept = 0;
virtual void SetValueAt(Sci::Position position, int value) = 0;
virtual void InsertSpace(Sci::Position position, Sci::Position insertLength) = 0;
virtual Sci::Position Runs() const noexcept = 0;
};
class IDecorationList {
public:
virtual ~IDecorationList() {}
virtual const std::vector<const IDecoration*> &View() const noexcept = 0;
virtual void SetCurrentIndicator(int indicator) = 0;
virtual int GetCurrentIndicator() const noexcept = 0;
virtual void SetCurrentValue(int value) noexcept = 0;
virtual int GetCurrentValue() const noexcept = 0;
// Returns with changed=true if some values may have changed
virtual FillResult<Sci::Position> FillRange(Sci::Position position, int value, Sci::Position fillLength) = 0;
virtual void InsertSpace(Sci::Position position, Sci::Position insertLength) = 0;
virtual void DeleteRange(Sci::Position position, Sci::Position deleteLength) = 0;
virtual void DeleteLexerDecorations() = 0;
virtual int AllOnFor(Sci::Position position) const noexcept = 0;
virtual int ValueAt(int indicator, Sci::Position position) noexcept = 0;
virtual Sci::Position Start(int indicator, Sci::Position position) noexcept = 0;
virtual Sci::Position End(int indicator, Sci::Position position) noexcept = 0;
virtual bool ClickNotified() const noexcept = 0;
virtual void SetClickNotified(bool notified) noexcept = 0;
};
std::unique_ptr<IDecoration> DecorationCreate(bool largeDocument, int indicator);
std::unique_ptr<IDecorationList> DecorationListCreate(bool largeDocument);
}
#endif
|