2 ** Visual elements added over text.
4 // Copyright 1998-2007 by Neil Hodgson <neilh@scintilla.org>
5 // The License.txt file describes the conditions under which this software may be distributed.
15 RunStyles
<int, int> rs
;
17 explicit Decoration(int indicator_
);
21 int Indicator() const {
26 class DecorationList
{
29 Decoration
*current
; // Cached so FillRange doesn't have to search for each call.
31 // Ordered by indicator
32 std::vector
<std::unique_ptr
<Decoration
>> decorationList
;
33 std::vector
<const Decoration
*> decorationView
; // Read-only view of decorationList
36 Decoration
*DecorationFromIndicator(int indicator
);
37 Decoration
*Create(int indicator
, int length
);
38 void Delete(int indicator
);
39 void DeleteAnyEmpty();
46 const std::vector
<const Decoration
*> &View() const { return decorationView
; }
48 void SetCurrentIndicator(int indicator
);
49 int GetCurrentIndicator() const { return currentIndicator
; }
51 void SetCurrentValue(int value
);
52 int GetCurrentValue() const { return currentValue
; }
54 // Returns true if some values may have changed
55 bool FillRange(int &position
, int value
, int &fillLength
);
57 void InsertSpace(int position
, int insertLength
);
58 void DeleteRange(int position
, int deleteLength
);
60 void DeleteLexerDecorations();
62 int AllOnFor(int position
) const;
63 int ValueAt(int indicator
, int position
);
64 int Start(int indicator
, int position
);
65 int End(int indicator
, int position
);
67 bool ClickNotified() const {
70 void SetClickNotified(bool notified
) {
71 clickNotified
= notified
;