public void HandleMouseDown(UIMouseEventArgs e)
{
if (e.Button == UIMouseButtons.Left)
{
InvalidateGraphicOfCurrentLineArea();
if (!e.Shift)
{
internalTextLayerController.SetCaretPos(e.X, e.Y);
if (internalTextLayerController.SelectionRange != null)
{
Rectangle r = GetSelectionUpdateArea();
internalTextLayerController.CancelSelect();
InvalidateGraphicLocalArea(this, r);
}
else
{
InvalidateGraphicOfCurrentLineArea();
}
}
else
{
internalTextLayerController.StartSelectIfNoSelection();
internalTextLayerController.SetCaretPos(e.X, e.Y);
internalTextLayerController.EndSelect();
InvalidateGraphicOfCurrentLineArea();
}
}
}