StartSelect() public method

public StartSelect ( ) : void
return void
示例#1
0
        public void HandleDoubleClick(UIMouseEventArgs e)
        {
            internalTextLayerController.CancelSelect();
            EditableRun textRun = this.CurrentTextRun;

            if (textRun != null)
            {
                VisualPointInfo pointInfo          = internalTextLayerController.GetCurrentPointInfo();
                int             lineCharacterIndex = pointInfo.LineCharIndex;
                int             local_sel_Index    = pointInfo.RunLocalSelectedIndex;
                //default behaviour is select only a hit word under the caret
                //so ask the text layer to find a hit word
                int startAt, len;
                internalTextLayerController.FindUnderlyingWord(out startAt, out len);
                if (len > 0)
                {
                    InvalidateGraphicOfCurrentLineArea();
                    internalTextLayerController.TryMoveCaretTo(startAt, true);
                    internalTextLayerController.StartSelect();
                    internalTextLayerController.TryMoveCaretTo(startAt + len);
                    internalTextLayerController.EndSelect();


                    //internalTextLayerController.TryMoveCaretTo(lineCharacterIndex - local_sel_Index, true);
                    //internalTextLayerController.StartSelect();
                    //internalTextLayerController.TryMoveCaretTo(internalTextLayerController.CharIndex + textRun.CharacterCount);
                    //internalTextLayerController.EndSelect();

                    InvalidateGraphicOfCurrentLineArea();
                }
            }
        }
        public void OnDoubleClick(UIMouseEventArgs e)
        {
            internalTextLayerController.CancelSelect();
            EditableRun textRun = this.CurrentTextRun;

            if (textRun != null)
            {
                VisualPointInfo pointInfo          = internalTextLayerController.GetCurrentPointInfo();
                int             lineCharacterIndex = pointInfo.LineCharIndex;
                int             localselIndex      = pointInfo.LocalSelectedIndex;
                internalTextLayerController.CharIndex = lineCharacterIndex - localselIndex - 1;
                internalTextLayerController.StartSelect();
                internalTextLayerController.CharIndex += textRun.CharacterCount;
                internalTextLayerController.EndSelect();
            }
        }
示例#3
0
 public override void InvokeUndo(InternalTextLayerController textMan)
 {
     textMan.CurrentLineNumber = startLineNumber;
     textMan.CharIndex         = startCharIndex;
     textMan.StartSelect();
     textMan.CurrentLineNumber = endLineNumber;
     textMan.CharIndex         = endCharIndex;
     textMan.EndSelect();
 }
示例#4
0
 public override void InvokeUndo(InternalTextLayerController textLayer)
 {
     textLayer.CurrentLineNumber = startLineNumber;
     textLayer.TryMoveCaretTo(startCharIndex);
     textLayer.StartSelect();
     textLayer.CurrentLineNumber = endLineNumber;
     textLayer.TryMoveCaretTo(endCharIndex);
     textLayer.EndSelect();
 }
示例#5
0
 public override void InvokeRedo(InternalTextLayerController textdom)
 {
     textdom.CurrentLineNumber = startLineNumber;
     textdom.CharIndex         = startCharIndex;
     textdom.StartSelect();
     textdom.CurrentLineNumber = endLineNumber;
     textdom.CharIndex         = endCharIndex;
     textdom.EndSelect();
     textdom.DoDelete();
 }
示例#6
0
 public override void InvokeUndo(InternalTextLayerController textMan)
 {
     textMan.CurrentLineNumber = startLineNumber;
     textMan.CharIndex = startCharIndex;
     textMan.StartSelect();
     textMan.CurrentLineNumber = endLineNumber;
     textMan.CharIndex = endCharIndex;
     textMan.EndSelect();
 }
示例#7
0
 public override void InvokeRedo(InternalTextLayerController textdom)
 {
     textdom.CurrentLineNumber = startLineNumber;
     textdom.CharIndex = startCharIndex;
     textdom.StartSelect();
     textdom.CurrentLineNumber = endLineNumber;
     textdom.CharIndex = endCharIndex;
     textdom.EndSelect();
     textdom.DoDelete();
 }