2009-04-24 23:35:41 +00:00
|
|
|
/** @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
|
|
|
|
|
|
|
|
#ifdef SCI_NAMESPACE
|
|
|
|
namespace Scintilla {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class Decoration {
|
|
|
|
public:
|
|
|
|
Decoration *next;
|
|
|
|
RunStyles rs;
|
|
|
|
int indicator;
|
|
|
|
|
2015-06-07 21:19:26 +00:00
|
|
|
explicit Decoration(int indicator_);
|
2009-04-24 23:35:41 +00:00
|
|
|
~Decoration();
|
|
|
|
|
2013-08-28 00:44:27 +00:00
|
|
|
bool Empty() const;
|
2009-04-24 23:35:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class DecorationList {
|
|
|
|
int currentIndicator;
|
|
|
|
int currentValue;
|
|
|
|
Decoration *current;
|
|
|
|
int lengthDocument;
|
|
|
|
Decoration *DecorationFromIndicator(int indicator);
|
|
|
|
Decoration *Create(int indicator, int length);
|
|
|
|
void Delete(int indicator);
|
|
|
|
void DeleteAnyEmpty();
|
|
|
|
public:
|
|
|
|
Decoration *root;
|
|
|
|
bool clickNotified;
|
|
|
|
|
|
|
|
DecorationList();
|
|
|
|
~DecorationList();
|
|
|
|
|
|
|
|
void SetCurrentIndicator(int indicator);
|
2010-07-12 22:19:51 +00:00
|
|
|
int GetCurrentIndicator() const { return currentIndicator; }
|
2009-04-24 23:35:41 +00:00
|
|
|
|
|
|
|
void SetCurrentValue(int value);
|
2010-07-12 22:19:51 +00:00
|
|
|
int GetCurrentValue() const { return currentValue; }
|
2009-04-24 23:35:41 +00:00
|
|
|
|
|
|
|
// Returns true if some values may have changed
|
|
|
|
bool FillRange(int &position, int value, int &fillLength);
|
|
|
|
|
|
|
|
void InsertSpace(int position, int insertLength);
|
|
|
|
void DeleteRange(int position, int deleteLength);
|
|
|
|
|
2013-08-28 00:44:27 +00:00
|
|
|
int AllOnFor(int position) const;
|
2009-04-24 23:35:41 +00:00
|
|
|
int ValueAt(int indicator, int position);
|
|
|
|
int Start(int indicator, int position);
|
|
|
|
int End(int indicator, int position);
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef SCI_NAMESPACE
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|