public override void DragAndDrop_Hover(DragDrop.Package p, int x, int y)
{
Vector2i pos = CanvasPosToLocal(new Vector2i(x, y));
Pos dir = GetDroppedTabDirection(pos.X, pos.Y);
if (dir == Pos.Fill)
{
if (null == m_DockedTabControl)
{
m_HoverRect = new Rectangle(0,0,0,0);
return;
}
m_HoverRect = InnerBounds;
return;
}
m_HoverRect = RenderBounds;
int HelpBarWidth = 0;
if (dir == Pos.Left)
{
HelpBarWidth = (int)(m_HoverRect.Width * 0.25f);
m_HoverRect.Width = HelpBarWidth;
}
if (dir == Pos.Right)
{
HelpBarWidth = (int)(m_HoverRect.Width * 0.25f);
m_HoverRect.X = m_HoverRect.Width - HelpBarWidth;
m_HoverRect.Width = HelpBarWidth;
}
if (dir == Pos.Top)
{
HelpBarWidth = (int)(m_HoverRect.Height * 0.25f);
m_HoverRect.Height = HelpBarWidth;
}
if (dir == Pos.Bottom)
{
HelpBarWidth = (int)(m_HoverRect.Height * 0.25f);
m_HoverRect.Y = m_HoverRect.Height - HelpBarWidth;
m_HoverRect.Height = HelpBarWidth;
}
if ((dir == Pos.Top || dir == Pos.Bottom) && !m_DropFar)
{
if (m_Left != null && m_Left.IsVisible)
{
m_HoverRect.X += m_Left.Width;
m_HoverRect.Width -= m_Left.Width;
}
if (m_Right != null && m_Right.IsVisible)
{
m_HoverRect.Width -= m_Right.Width;
}
}
if ((dir == Pos.Left || dir == Pos.Right) && !m_DropFar)
{
if (m_Top != null && m_Top.IsVisible)
{
m_HoverRect.Y += m_Top.Height;
m_HoverRect.Height -= m_Top.Height;
}
if (m_Bottom != null && m_Bottom.IsVisible)
{
m_HoverRect.Height -= m_Bottom.Height;
}
}
}