Exemplo n.º 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;
}
Exemplo n.º 2
0
bool CBound::Contain( CPosition p ) const
{
	return Contain(p.X() , p.Y());
}