2014-05-21 16:26 GMT+08:00 Nikolay Sivov <bunglehead@gmail.com>:
>
> But ITextSelection is a ITextRange too, so you need to implement it for ITextRange only.

Yes, ITextSelection interface is inherits from ITextRange. But I think functions of ITextRange
and functions of ITextSelection are independent of each other. And there are some different
between them: range of an ITextRange is given by ITextDocument::Range and immovable but
range of ITextSelection of is depend on *pCursor in ME_TextEditor.

So I think implementing ITextSelection independently and just share some functions like 
ME_ITextGetText between ITextRange and ITextSelection is a more convenient way.


--
Regards,
Jactry Zeng