void gestureRecongnizer_Dragging(GestureRecognizer sender, DraggingEventArgs e)
{
+ Point p = e.Position;
+ TextPointSearchRange searchRange;
+ if (this.View.HitTextArea(p.X, p.Y))
+ searchRange = TextPointSearchRange.TextAreaOnly;
+ else if (this._Controller.SelectionLength > 0)
+ searchRange = TextPointSearchRange.Full;
+ else
+ return;
+ TextPoint tp = this.View.GetTextPointFromPostion(p, searchRange);
+ this._Controller.MoveCaretAndSelect(tp, this.IsModiferKeyPressed(VirtualKey.LeftControl));
+#if ENABLE_AUTMATION
+ if (this.peer != null)
+ this.peer.OnNotifyCaretChanged();
+#endif
this.Refresh();
}
{
this.Cursor = Cursors.Arrow;
}
+ if (leftPressed)
+ {
+ bool controlPressed = (Keyboard.GetKeyStates(Key.LeftCtrl) & KeyStates.Down) == KeyStates.Down;
+ this._Controller.MoveCaretAndSelect(tp, controlPressed);
+ if (this.peer != null)
+ this.peer.OnNotifyCaretChanged();
+ this.Refresh();
+ }
}
Gripper hittedGripper;
this.Cursor = Cursors.Hand;
else
this.Cursor = Cursors.IBeam;
+
+ if (e.Button == MouseButtons.Left)
+ {
+ this.Controller.MoveCaretAndSelect(tp, ModifierKeys.HasFlag(Keys.Control));
+ this.Refresh();
+ }
}
else
{