diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Document.cxx | 32 | ||||
| -rw-r--r-- | src/Document.h | 38 | 
2 files changed, 35 insertions, 35 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 2eb412f73..f21477276 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -339,7 +339,7 @@ int Document::LineFromHandle(int markerHandle) {  	return static_cast<LineMarkers *>(perLineData[ldMarkers])->LineFromHandle(markerHandle);  } -int SCI_METHOD Document::LineStart(int line) const { +Sci_Position SCI_METHOD Document::LineStart(Sci_Position line) const {  	return cb.LineStart(line);  } @@ -347,7 +347,7 @@ bool Document::IsLineStartPosition(int position) const {  	return LineStart(LineFromPosition(position)) == position;  } -int SCI_METHOD Document::LineEnd(int line) const { +Sci_Position SCI_METHOD Document::LineEnd(Sci_Position line) const {  	if (line >= LinesTotal() - 1) {  		return LineStart(line + 1);  	} else { @@ -381,7 +381,7 @@ void SCI_METHOD Document::SetErrorStatus(int status) {  	}  } -int SCI_METHOD Document::LineFromPosition(int pos) const { +Sci_Position SCI_METHOD Document::LineFromPosition(Sci_Position pos) const {  	return cb.LineFromPosition(pos);  } @@ -410,7 +410,7 @@ int Document::VCHomePosition(int position) const {  		return startText;  } -int SCI_METHOD Document::SetLevel(int line, int level) { +int SCI_METHOD Document::SetLevel(Sci_Position line, int level) {  	int prev = static_cast<LineLevels *>(perLineData[ldLevels])->SetLevel(line, level, LinesTotal());  	if (prev != level) {  		DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, @@ -422,7 +422,7 @@ int SCI_METHOD Document::SetLevel(int line, int level) {  	return prev;  } -int SCI_METHOD Document::GetLevel(int line) const { +int SCI_METHOD Document::GetLevel(Sci_Position line) const {  	return static_cast<LineLevels *>(perLineData[ldLevels])->GetLevel(line);  } @@ -770,7 +770,7 @@ bool Document::NextCharacter(int &pos, int moveDir) const {  }  // Return -1  on out-of-bounds -int SCI_METHOD Document::GetRelativePosition(int positionStart, int characterOffset) const { +Sci_Position SCI_METHOD Document::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const {  	int pos = positionStart;  	if (dbcsCodePage) {  		const int increment = (characterOffset > 0) ? 1 : -1; @@ -810,7 +810,7 @@ int Document::GetRelativePositionUTF16(int positionStart, int characterOffset) c  	return pos;  } -int SCI_METHOD Document::GetCharacterAndWidth(int position, int *pWidth) const { +int SCI_METHOD Document::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const {  	int character;  	int bytesInCharacter = 1;  	if (dbcsCodePage) { @@ -1050,7 +1050,7 @@ void Document::ChangeInsertion(const char *s, int length) {  	insertion.assign(s, length);  } -int SCI_METHOD Document::AddData(char *data, int length) { +int SCI_METHOD Document::AddData(char *data, Sci_Position length) {  	try {  		int position = Length();  		InsertString(position, data, length); @@ -1247,7 +1247,7 @@ static std::string CreateIndentation(int indent, int tabSize, bool insertSpaces)  	return indentation;  } -int SCI_METHOD Document::GetLineIndentation(int line) { +int SCI_METHOD Document::GetLineIndentation(Sci_Position line) {  	int indent = 0;  	if ((line >= 0) && (line < LinesTotal())) {  		int lineStart = LineStart(line); @@ -1827,11 +1827,11 @@ int Document::GetCharsOfClass(CharClassify::cc characterClass, unsigned char *bu      return charClass.GetCharsOfClass(characterClass, buffer);  } -void SCI_METHOD Document::StartStyling(int position, char) { +void SCI_METHOD Document::StartStyling(Sci_Position position, char) {  	endStyled = position;  } -bool SCI_METHOD Document::SetStyleFor(int length, char style) { +bool SCI_METHOD Document::SetStyleFor(Sci_Position length, char style) {  	if (enteredStyling != 0) {  		return false;  	} else { @@ -1848,7 +1848,7 @@ bool SCI_METHOD Document::SetStyleFor(int length, char style) {  	}  } -bool SCI_METHOD Document::SetStyles(int length, const char *styles) { +bool SCI_METHOD Document::SetStyles(Sci_Position length, const char *styles) {  	if (enteredStyling != 0) {  		return false;  	} else { @@ -1900,7 +1900,7 @@ void Document::LexerChanged() {  	}  } -int SCI_METHOD Document::SetLineState(int line, int state) { +int SCI_METHOD Document::SetLineState(Sci_Position line, int state) {  	int statePrevious = static_cast<LineState *>(perLineData[ldState])->SetLineState(line, state);  	if (state != statePrevious) {  		DocModification mh(SC_MOD_CHANGELINESTATE, LineStart(line), 0, 0, 0, line); @@ -1909,7 +1909,7 @@ int SCI_METHOD Document::SetLineState(int line, int state) {  	return statePrevious;  } -int SCI_METHOD Document::GetLineState(int line) const { +int SCI_METHOD Document::GetLineState(Sci_Position line) const {  	return static_cast<LineState *>(perLineData[ldState])->GetLineState(line);  } @@ -1917,7 +1917,7 @@ int Document::GetMaxLineState() {  	return static_cast<LineState *>(perLineData[ldState])->GetMaxLineState();  } -void SCI_METHOD Document::ChangeLexerState(int start, int end) { +void SCI_METHOD Document::ChangeLexerState(Sci_Position start, Sci_Position end) {  	DocModification mh(SC_MOD_LEXERSTATE, start, end-start, 0, 0, 0);  	NotifyModified(mh);  } @@ -1997,7 +1997,7 @@ void Document::IncrementStyleClock() {  	styleClock = (styleClock + 1) % 0x100000;  } -void SCI_METHOD Document::DecorationFillRange(int position, int value, int fillLength) { +void SCI_METHOD Document::DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) {  	if (decorations.FillRange(position, value, fillLength)) {  		DocModification mh(SC_MOD_CHANGEINDICATOR | SC_PERFORMED_USER,  							position, fillLength); diff --git a/src/Document.h b/src/Document.h index 308a67062..ea8ddfbed 100644 --- a/src/Document.h +++ b/src/Document.h @@ -270,7 +270,7 @@ public:  	void SCI_METHOD SetErrorStatus(int status); -	int SCI_METHOD LineFromPosition(int pos) const; +	Sci_Position SCI_METHOD LineFromPosition(Sci_Position pos) const;  	int ClampPositionIntoDocument(int pos) const;  	bool IsCrLf(int pos) const;  	int LenChar(int pos); @@ -278,9 +278,9 @@ public:  	int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true) const;  	int NextPosition(int pos, int moveDir) const;  	bool NextCharacter(int &pos, int moveDir) const;	// Returns true if pos changed -	int SCI_METHOD GetRelativePosition(int positionStart, int characterOffset) const; +	Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const;  	int GetRelativePositionUTF16(int positionStart, int characterOffset) const; -	int SCI_METHOD GetCharacterAndWidth(int position, int *pWidth) const; +	int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const;  	int SCI_METHOD CodePage() const;  	bool SCI_METHOD IsDBCSLeadByte(char ch) const;  	int SafeSegment(const char *text, int length, int lengthSegment) const; @@ -292,7 +292,7 @@ public:  	bool DeleteChars(int pos, int len);  	int InsertString(int position, const char *s, int insertLength);  	void ChangeInsertion(const char *s, int length); -	int SCI_METHOD AddData(char *data, int length); +	int SCI_METHOD AddData(char *data, Sci_Position length);  	void * SCI_METHOD ConvertToDocument();  	int Undo();  	int Redo(); @@ -318,7 +318,7 @@ public:  	const char *RangePointer(int position, int rangeLength) { return cb.RangePointer(position, rangeLength); }  	int GapPosition() const { return cb.GapPosition(); } -	int SCI_METHOD GetLineIndentation(int line); +	int SCI_METHOD GetLineIndentation(Sci_Position line);  	int SetLineIndentation(int line, int indent);  	int GetLineIndentPosition(int line) const;  	int GetColumn(int position); @@ -335,10 +335,10 @@ public:  	void DelCharBack(int pos);  	char CharAt(int position) const { return cb.CharAt(position); } -	void SCI_METHOD GetCharRange(char *buffer, int position, int lengthRetrieve) const { +	void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const {  		cb.GetCharRange(buffer, position, lengthRetrieve);  	} -	char SCI_METHOD StyleAt(int position) const { return cb.StyleAt(position); } +	char SCI_METHOD StyleAt(Sci_Position position) const { return cb.StyleAt(position); }  	void GetStyleRange(unsigned char *buffer, int position, int lengthRetrieve) const {  		cb.GetStyleRange(buffer, position, lengthRetrieve);  	} @@ -350,16 +350,16 @@ public:  	void DeleteMarkFromHandle(int markerHandle);  	void DeleteAllMarks(int markerNum);  	int LineFromHandle(int markerHandle); -	int SCI_METHOD LineStart(int line) const; +	Sci_Position SCI_METHOD LineStart(Sci_Position line) const;  	bool IsLineStartPosition(int position) const; -	int SCI_METHOD LineEnd(int line) const; +	Sci_Position SCI_METHOD LineEnd(Sci_Position line) const;  	int LineEndPosition(int position) const;  	bool IsLineEndPosition(int position) const;  	bool IsPositionInLineEnd(int position) const;  	int VCHomePosition(int position) const; -	int SCI_METHOD SetLevel(int line, int level); -	int SCI_METHOD GetLevel(int line) const; +	int SCI_METHOD SetLevel(Sci_Position line, int level); +	int SCI_METHOD GetLevel(Sci_Position line) const;  	void ClearLevels();  	int GetLastChild(int lineParent, int level=-1, int lastLine=-1);  	int GetFoldParent(int line) const; @@ -369,7 +369,7 @@ public:  	int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false);  	int NextWordStart(int pos, int delta);  	int NextWordEnd(int pos, int delta); -	int SCI_METHOD Length() const { return cb.Length(); } +	Sci_Position SCI_METHOD Length() const { return cb.Length(); }  	void Allocate(int newSize) { cb.Allocate(newSize); }  	struct CharacterExtracted { @@ -395,9 +395,9 @@ public:  	void SetDefaultCharClasses(bool includeWordClass);  	void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass);  	int GetCharsOfClass(CharClassify::cc characterClass, unsigned char *buffer); -	void SCI_METHOD StartStyling(int position, char mask); -	bool SCI_METHOD SetStyleFor(int length, char style); -	bool SCI_METHOD SetStyles(int length, const char *styles); +	void SCI_METHOD StartStyling(Sci_Position position, char mask); +	bool SCI_METHOD SetStyleFor(Sci_Position length, char style); +	bool SCI_METHOD SetStyles(Sci_Position length, const char *styles);  	int GetEndStyled() const { return endStyled; }  	void EnsureStyledTo(int pos);  	void LexerChanged(); @@ -406,12 +406,12 @@ public:  	void SCI_METHOD DecorationSetCurrentIndicator(int indicator) {  		decorations.SetCurrentIndicator(indicator);  	} -	void SCI_METHOD DecorationFillRange(int position, int value, int fillLength); +	void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength); -	int SCI_METHOD SetLineState(int line, int state); -	int SCI_METHOD GetLineState(int line) const; +	int SCI_METHOD SetLineState(Sci_Position line, int state); +	int SCI_METHOD GetLineState(Sci_Position line) const;  	int GetMaxLineState(); -	void SCI_METHOD ChangeLexerState(int start, int end); +	void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end);  	StyledText MarginStyledText(int line) const;  	void MarginSetStyle(int line, int style);  | 
