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(); } }
public override void InvokeUndo(InternalTextLayerController textMan) { textMan.CurrentLineNumber = startLineNumber; textMan.CharIndex = startCharIndex; textMan.StartSelect(); textMan.CurrentLineNumber = endLineNumber; textMan.CharIndex = endCharIndex; textMan.EndSelect(); }
public override void InvokeUndo(InternalTextLayerController textLayer) { textLayer.CurrentLineNumber = startLineNumber; textLayer.TryMoveCaretTo(startCharIndex); textLayer.StartSelect(); textLayer.CurrentLineNumber = endLineNumber; textLayer.TryMoveCaretTo(endCharIndex); textLayer.EndSelect(); }
public override void InvokeRedo(InternalTextLayerController textdom) { textdom.CurrentLineNumber = startLineNumber; textdom.CharIndex = startCharIndex; textdom.StartSelect(); textdom.CurrentLineNumber = endLineNumber; textdom.CharIndex = endCharIndex; textdom.EndSelect(); textdom.DoDelete(); }