diff options
Diffstat (limited to 'src/CellBuffer.h')
-rw-r--r-- | src/CellBuffer.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/CellBuffer.h b/src/CellBuffer.h index 7faeecd23..9cece4854 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -147,7 +147,8 @@ public: */ class CellBuffer { private: - SplitVector<char> body; + SplitVector<char> substance; + SplitVector<char> style; bool readOnly; bool collectingUndo; @@ -157,10 +158,6 @@ private: SVector lineStates; - char ByteAt(int position) { - return body.ValueAt(position); - } - public: CellBuffer(); @@ -171,18 +168,17 @@ public: void GetCharRange(char *buffer, int position, int lengthRetrieve); char StyleAt(int position); - int ByteLength(); int Length(); void Allocate(int newSize); int Lines(); int LineStart(int line); int LineFromPosition(int pos) { return lv.LineFromPosition(pos); } - const char *InsertString(int position, char *s, int insertLength, bool &startSequence); + const char *InsertString(int position, const char *s, int insertLength, bool &startSequence); /// Setting styles for positions outside the range of the buffer is safe and has no effect. /// @return true if the style of a character is changed. - bool SetStyleAt(int position, char style, char mask='\377'); - bool SetStyleFor(int position, int length, char style, char mask); + bool SetStyleAt(int position, char styleValue, char mask='\377'); + bool SetStyleFor(int position, int length, char styleValue, char mask); const char *DeleteChars(int position, int deleteLength, bool &startSequence); @@ -203,7 +199,7 @@ public: int LineFromHandle(int markerHandle); /// Actions without undo - void BasicInsertString(int position, char *s, int insertLength); + void BasicInsertString(int position, const char *s, int insertLength); void BasicDeleteChars(int position, int deleteLength); bool SetUndoCollection(bool collectUndo); @@ -232,6 +228,4 @@ public: void ClearLevels(); }; -#define CELL_SIZE 2 - #endif |