コード例 #1
0
ファイル: cscrollview.cpp プロジェクト: EQ4/vstgui
//-----------------------------------------------------------------------------
void CScrollContainer::onDragMove (IDataPackage* drag, const CPoint& where)
{
	if (autoDragScroll)
	{
		float x, y;
		if (getScrollValue (where, x, y))
		{
			CScrollView* scrollView = static_cast<CScrollView*> (getParentView ());
			if (scrollView)
			{
				CRect r (getViewSize ());
				r.offset (x, y);
				scrollView->makeRectVisible (r);
			}
		}
	}
	return CViewContainer::onDragMove (drag, where);
}