Ejemplo n.º 1
0
        void SetSelection_Rect(int anchor, int caret, IView view)
        {
            // calculate graphical position of both anchor and new caret
            Point anchorPos = view.GetVirPosFromIndex(anchor);
            Point caretPos  = view.GetVirPosFromIndex(caret);

            // calculate ranges selected by the rectangle made with the two points
            _RectSelectRanges = view.GetRectSelectRanges(
                Utl.MakeRectFromTwoPoints(anchorPos, caretPos)
                );

            // set selection
            SetSelection_Normal(anchor, caret);
        }