示例#1
0
bool CUIContainer::OnLBtnDown( int x ,int y )
{
	for (unsigned int i = 0;i < mChilds.size() ; i ++)
	{
		CPosition pt = mChilds[i]->ParentToSelf(x,y);
		if(mChilds[i]->Bound().Contain(x ,y) && mChilds[i]->OnLBtnDown(pt.X() , pt.Y()))
		{
			if(mFcousedObj && mFcousedObj != mChilds[i])
			{
				mFcousedObj->OnFocusOut(mChilds[i]);
			}
			mFcousedObj = mChilds[i];
			return true;
		}
	}
	if(mFcousedObj)
	{
		mFcousedObj->OnFocusOut(NULL);
		mFcousedObj = NULL;
	}
	return false;
}
示例#2
0
文件: Bound.cpp 项目: wzAdmin/Graph
bool CBound::Contain( CPosition p ) const
{
	return Contain(p.X() , p.Y());
}