BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
	// let children to change selection first
	childrenHandleRightMouseDown(x, y, mask);
	mParentLandmarksPanel->setCurrentSelectedList((LLPlacesInventoryPanel*)getParentPanel());

	// then determine its type and set necessary menu handle
	if (getCurSelectedItem())
	{
		LLInventoryType::EType inventory_type = getCurSelectedItem()->getListener()->getInventoryType();
		inventory_type_menu_handle_t::iterator it_handle = mMenuHandlesByInventoryType.find(inventory_type);

		if (it_handle != mMenuHandlesByInventoryType.end())
		{
			mPopupMenuHandle = (*it_handle).second;
		}
		else
		{
			llwarns << "Requested menu handle for non-setup inventory type: " << inventory_type << llendl;
		}

	}

	return LLFolderView::handleRightMouseDown(x, y, mask);
}
Exemple #2
0
BOOL LLViewerTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
	BOOL handled = childrenHandleRightMouseDown(x, y, mask) != NULL;

	// *TODO: Add right click menus for SLURLs
// 	if(! handled)
// 	{
// 		const LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y );
// 		if( cur_segment )
// 		{
// 			if(cur_segment->getStyle()->isLink())
// 			{
// 				handled = TRUE;
// 				mHTML = cur_segment->getStyle()->getLinkHREF();
// 			}
// 		}
// 	}
// 	LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
// 	if(handled && menu && mParseHTML && mHTML.length() > 0)
// 	{
// 		menu->setVisible(TRUE);
// 		menu->arrange();
// 		menu->updateParent(LLMenuGL::sMenuContainer);
// 		LLMenuGL::showPopup(this, menu, x, y);
// 		mHTML = "";
// 	}
// 	else
// 	{
// 		if(menu && menu->getVisible())
// 		{
// 			menu->setVisible(FALSE);
// 		}
// 	}
	return handled;
}
BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
	BOOL handled = childrenHandleRightMouseDown( x, y, mask) != NULL;
	if(!handled && !gMenuHolder->hasVisibleMenu())
	{
		show_navbar_context_menu(this,x,y);
		handled = true;
	}
					
	return handled;
}
Exemple #4
0
BOOL	LLButton::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
	if (!childrenHandleRightMouseDown(x, y, mask))
	{
		// Route future Mouse messages here preemptively.  (Release on mouse up.)
		gFocusMgr.setMouseCapture( this );

		if (hasTabStop() && !getIsChrome())
		{
			setFocus(TRUE);
		}

//		if (pointInView(x, y))
//		{
//		}
	}
	// send the mouse down signal
	LLUICtrl::handleRightMouseDown(x,y,mask);
	// *TODO: Return result of LLUICtrl call above?  Should defer to base class
	// but this might change the mouse handling of existing buttons in a bad way
	// if they are not mouse opaque.
	return TRUE;
}
Exemple #5
0
BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
	childrenHandleRightMouseDown(x, y, mask);
	return TRUE;
}