{
if (tp.row < this.Src.Row)
return Rectangle.Empty;
+ //画面外にある時は計算する必要がそもそもない
+ if (tp.row - this.Src.Row > this.LineCountOnScreen)
+ return Rectangle.Empty;
double radius = width / 2;
Point point = this.GetPostionFromTextPoint(tp);
double lineHeight = this.render.emSize.Height;
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();
}
TextPointSearchRange searchRange;
if (this.View.HitTextArea(p.X, p.Y))
+ {
searchRange = TextPointSearchRange.TextAreaOnly;
+ }
else if (leftPressed)
+ {
searchRange = TextPointSearchRange.Full;
+ }
else
- searchRange = TextPointSearchRange.TextAreaOnly;
+ {
+ this.Cursor = Cursors.Arrow;
+ base.OnMouseMove(e);
+ return;
+ }
TextPoint tp = this.View.GetTextPointFromPostion(p, searchRange);
if (tp == TextPoint.Null)
{
+ this.Cursor = Cursors.Arrow;
base.OnMouseMove(e);
return;
}
{
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
{