X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c95e653ca42e6474c32d71e69a3fd8a2bc443fc4..7e0c58e92cb173bb192444670535f49583a6bf1d:/src/stc/scintilla/src/RunStyles.h diff --git a/src/stc/scintilla/src/RunStyles.h b/src/stc/scintilla/src/RunStyles.h new file mode 100644 index 0000000000..bbf20b2624 --- /dev/null +++ b/src/stc/scintilla/src/RunStyles.h @@ -0,0 +1,41 @@ +/** @file RunStyles.h + ** Data structure used to store sparse styles. + **/ +// Copyright 1998-2007 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +/// Styling buffer using one element for each run rather than using +/// a filled buffer. + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + +class RunStyles { +public: + Partitioning *starts; + SplitVector *styles; + int RunFromPosition(int position); + int SplitRun(int position); + void RemoveRun(int run); + void RemoveRunIfEmpty(int run); + void RemoveRunIfSameAsPrevious(int run); +public: + RunStyles(); + ~RunStyles(); + int Length(); + int ValueAt(int position); + int FindNextChange(int position, int end); + int StartRun(int position); + int EndRun(int position); + // Returns true if some values may have changed + bool FillRange(int &position, int value, int &fillLength); + void SetValueAt(int position, int value); + void InsertSpace(int position, int insertLength); + void DeleteAll(); + void DeleteRange(int position, int deleteLength); +}; + +#ifdef SCI_NAMESPACE +} +#endif