예제 #1
0
bool HyperLinkManager::doHyperLinkByMouseRight(const Window* pOwnerWindow,const Point& position)
{

	HyperLinkNameRegistry::const_iterator itCur, itEnd;
	HyperLink nHyperLink;

	itCur		= d_HyperLinkNameMap.begin();
	itEnd		= d_HyperLinkNameMap.end();

	while ( itCur != itEnd )
	{
		nHyperLink = itCur->second;

		if(nHyperLink.isInRange(pOwnerWindow,position))
		{
			HyperLinkEventArgs e(pOwnerWindow->getName(), nHyperLink.d_name);

			fireEvent(EventHyperLinkRightActive, e, EventNamespace);
			return true;
		}

		itCur++;
	}
	return false;

}
예제 #2
0
	bool HyperLinkManager::isHyperLinkRange(const Window* pOwnerWindow, const Point& position)
	{
		HyperLinkNameRegistry::const_iterator itCur, itEnd;
		HyperLink nHyperLink;

		itCur		= d_HyperLinkNameMap.begin();
		itEnd		= d_HyperLinkNameMap.end();
		Rect rectRange;
		while ( itCur != itEnd )
		{
			nHyperLink = itCur->second;

			if(nHyperLink.isInRange(pOwnerWindow,position, &rectRange))
			{
				d_lastMouseInLinkName = nHyperLink.d_name;
				d_lastMouseInLinkWindow = (Window*)pOwnerWindow;

				HyperLinkEventArgs e(pOwnerWindow->getName(), nHyperLink.d_name);

				fireEvent(EventHyperLinkInactive, e, EventNamespace);		
				return true;
			}

			if( d_lastMouseInLinkWindow == pOwnerWindow && d_lastMouseInLinkName == nHyperLink.d_name)
			{
				d_lastMouseInLinkWindow = NULL;
				d_lastMouseInLinkName = "";
			}

			itCur++;
		}
		return false;
	}
예제 #3
0
String HyperLinkManager::getHyperLinkContex(const Window* pOwnerWindow, const Point& position)
{
	HyperLinkNameRegistry::const_iterator itCur, itEnd;
	HyperLink nHyperLink;

	itCur		= d_HyperLinkNameMap.begin();
	itEnd		= d_HyperLinkNameMap.end();

	while ( itCur != itEnd )
	{
		nHyperLink = itCur->second;

		if(nHyperLink.isInRange(pOwnerWindow,position))
		{
			HyperLinkEventArgs e(pOwnerWindow->getName(), nHyperLink.d_name);
			return nHyperLink.d_name;
		}

		itCur++;
	}
	return "";
}