Currently, void * is used for findtext, formatrange, textrange and their full versions, It can be changed to use TextToFind, RangeToFormat, TextRange and the full versions.
All RangeToFormat, TextRange and full versions pointer parameter can de declared as const.
ScintillaCall.handScintillaStructures.hare parts of the external interface of Scintilla and should not be modified in ways that are incompatible with projects that use these interfaces. These changes break compilation of SciTE. While SciTE can be easily updated, this indicates that other projects are also likely to break.TextRangeis only const in the shallow sense since the memory pointed to bylpstrTextis modified - C++ doesn't have deep const which is sometimes called 'frozen'. I feelGetTextRange(const TextRange *tr)is misleading.GetTextRange(const TextRange *tr)means not change member them self, e.g. changelpstrTextto a new pointer, which is different fromFindTextFull(Scintilla::FindOption searchFlags, TextToFindFull *ft), wherechrgTextmember will be updated.How about the change without adding
const?, e.g.:Which will improve readability the of code (they are available like other types in
Scintilla::namespace).The non-"Full" types should be discouraged instead of being made more prominent. They will be deprecated later.
Then, these non-full version methods can be marked as
[[deprecated]].OK, only with full version, non-const structures.
From rhkramer, trying to reply on scintilla-tracker but its not hooked up to work.
The
*Fullstructs (likeTextRangeFull) and APIs likeSCI_GETTEXTRANGEFULLare compatible with documents larger than 2GB. Due to using 32-bit types that were compatible with the Win32 edit control, the old interfaces likeTextRangeandSCI_GETTEXTRANGEfail on these huge documents.Committed change as [4d34a3] only for
*Fullstructures. Added forward declarations inScintillaCall.hto maintain compatibility for most projects.Related
Commit: [4d34a3]