当前位置: 首页>>代码示例>>C++>>正文


C++ setMouseCapture函数代码示例

本文整理汇总了C++中setMouseCapture函数的典型用法代码示例。如果您正苦于以下问题:C++ setMouseCapture函数的具体用法?C++ setMouseCapture怎么用?C++ setMouseCapture使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了setMouseCapture函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setMouseCapture

// virtual
void LLToolObjPicker::handleDeselect()
{
	if (hasMouseCapture())
	{
		LLTool::handleDeselect();
		setMouseCapture(FALSE);
	}
}
开发者ID:xinyaojiejie,项目名称:Dale,代码行数:9,代码来源:lltoolobjpicker.cpp

示例2: setMouseCapture

void LLToolGrab::handleDeselect()
{
	if( hasMouseCapture() )
	{
		setMouseCapture( FALSE );
	}

}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:8,代码来源:lltoolgrab.cpp

示例3: setMouseCapture

BOOL LLPathfindingPathTool::handleRightMouseDown(S32 pX, S32 pY, MASK pMask)
{
	setMouseCapture(TRUE);
	mIsRightMouseButtonHeld = true;
	gViewerWindow->setCursor(UI_CURSOR_TOOLNO);

	return TRUE;
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:8,代码来源:llpathfindingpathtool.cpp

示例4: setMouseCapture

BOOL LLToolPipette::handleMouseDown(S32 x, S32 y, MASK mask)
{
	mSuccess = TRUE;
	mTooltipMsg.clear();
	setMouseCapture(TRUE);
	gViewerWindow->pickAsync(x, y, mask, pickCallback);
	return TRUE;
}
开发者ID:Boy,项目名称:rainbow,代码行数:8,代码来源:lltoolpipette.cpp

示例5: setMouseCapture

void	LLToolCompGun::handleDeselect()
{
	LLToolComposite::handleDeselect();
	if (mTimerFOV.getStarted()) // <singu/> Note: Load Default FOV if we were zooming in
	{
		LLViewerCamera::getInstance()->loadDefaultFOV();
	}
	setMouseCapture(FALSE);
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:9,代码来源:lltoolcomp.cpp

示例6: setMouseCapture

void LLToolPie::handleDeselect()
{
	if(	hasMouseCapture() )
	{
		setMouseCapture( FALSE );  // Calls onMouseCaptureLost() indirectly
	}
	// remove temporary selection for pie menu
	LLSelectMgr::getInstance()->validateSelection();
}
开发者ID:zwagoth,项目名称:Emerald-SVN-History,代码行数:9,代码来源:lltoolpie.cpp

示例7: setMouseCapture

BOOL LLToolPipette::handleMouseUp(S32 x, S32 y, MASK mask)
{
	mSuccess = TRUE;
	LLSelectMgr::getInstance()->unhighlightAll();
	// *NOTE: This assumes the pipette tool is a transient tool.
	LLToolMgr::getInstance()->clearTransientTool();
	setMouseCapture(FALSE);
	return TRUE;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:9,代码来源:lltoolpipette.cpp

示例8: setMouseCapture

BOOL LLManip::handleMouseUp(S32 x, S32 y, MASK mask)
{
	BOOL	handled = FALSE;
	if( hasMouseCapture() )
	{
		handled = TRUE;
		setMouseCapture( FALSE );
	}
	return handled;
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:10,代码来源:llmanip.cpp

示例9: setMouseCapture

bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
{
	//FIXME: how do we handle object in different parcel than us?
	LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
	LLPointer<LLViewerObject> objectp = pick.getObject();


	if (!parcel ||
		objectp.isNull() ||
		pick.mObjectFace < 0 || 
		pick.mObjectFace >= objectp->getNumTEs()) 
	{
		LLViewerMediaFocus::getInstance()->clearFocus();

		return false;
	}

	// Does this face have media?
	const LLTextureEntry* tep = objectp->getTE(pick.mObjectFace);
	if(!tep)
		return false;

	LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL;
	if(!mep)
		return false;
	
	viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());

	if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
	{
		if (!LLViewerMediaFocus::getInstance()->isFocusedOnFace(pick.getObject(), pick.mObjectFace) || media_impl.isNull())
		{
			// It's okay to give this a null impl
			LLViewerMediaFocus::getInstance()->setFocusFace(pick.getObject(), pick.mObjectFace, media_impl, pick.mNormal);
		}
		else
		{
			// Make sure keyboard focus is set to the media focus object.
			gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance());
			
			media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE));
			mMediaMouseCaptureID = mep->getMediaID();
			setMouseCapture(TRUE);  // This object will send a mouse-up to the media when it loses capture.
		}

		return true;
	}

	LLViewerMediaFocus::getInstance()->clearFocus();

	return false;
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:52,代码来源:lltoolpie.cpp

示例10: computeFinalPoints

BOOL LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask)
{
	BOOL returnVal = FALSE;

	if (mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld)
	{
		computeFinalPoints(pX, pY, pMask);
		setMouseCapture(FALSE);
		returnVal = TRUE;
	}
	mIsLeftMouseButtonHeld = false;

	return returnVal;
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:14,代码来源:llpathfindingpathtool.cpp

示例11: setMouseCapture

void LLToolSelectRect::handlePick(const LLPickInfo& pick)
{
	mPick = pick;

	// start dragging rectangle
	setMouseCapture( TRUE );

	mDragStartX = pick.mMousePt.mX;
	mDragStartY = pick.mMousePt.mY;
	mDragEndX = pick.mMousePt.mX;
	mDragEndY = pick.mMousePt.mY;

	mMouseOutsideSlop = FALSE;
}
开发者ID:gabeharms,项目名称:firestorm,代码行数:14,代码来源:lltoolselectrect.cpp

示例12: setMouseCapture

BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask)
{
	// start dragging rectangle
	setMouseCapture( TRUE );

	mDragStartX = x;
	mDragStartY = y;
	mDragEndX = x;
	mDragEndY = y;

	mMouseOutsideSlop = FALSE;

	LLToolSelect::handleMouseDown(x, y, mask);
	return TRUE;
}
开发者ID:Boy,项目名称:netbook,代码行数:15,代码来源:lltoolselectrect.cpp

示例13: setMouseCapture

BOOL LLToolBrushLand::handleMouseUp(S32 x, S32 y, MASK mask)
{
	BOOL handled = FALSE;
	mLastAffectedRegions.clear();
	if( hasMouseCapture() )
	{
		// Release the mouse
		setMouseCapture( FALSE );

		LLViewerParcelMgr::getInstance()->setSelectionVisible(TRUE);

		gIdleCallbacks.deleteFunction( &LLToolBrushLand::onIdle, (void*)this );
		handled = TRUE;
	}

	return handled;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:17,代码来源:lltoolbrush.cpp

示例14: if

BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask)
{
	// Claim that we're mousing up somewhere
	mMouseUpX = x;
	mMouseUpY = y;
	mMouseUpMask = mask;

	if (hasMouseCapture())
	{
		if (mValidClickPoint)
		{
			if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() )
			{
				LLCoordGL mouse_pos;
				LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgent.getFocusGlobal());
				BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos);
				if (success)
				{
					LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY);
				}
			}
			else if (mMouseSteering)
			{
				LLUI::setCursorPositionScreen(mMouseDownX, mMouseDownY);
			}
			else
			{
				gViewerWindow->moveCursorToCenter();
			}
		}
		else
		{
			// not a valid zoomable object
			LLUI::setCursorPositionScreen(mMouseDownX, mMouseDownY);
		}

		// calls releaseMouse() internally
		setMouseCapture(FALSE);
	}
	else
	{
		releaseMouse();
	}

	return TRUE;
}
开发者ID:CharleyLevenque,项目名称:SingularityViewer,代码行数:46,代码来源:lltoolfocus.cpp

示例15: setMouseCapture

BOOL LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask)
{
	LLView* viewp = gViewerWindow->getRootView();
	BOOL handled = viewp->handleHover(x, y, mask);
	if (handled)
	{
		// let UI handle this
	}

	LLTool::handleMouseUp(x, y, mask);
	if (hasMouseCapture())
	{
		setMouseCapture(FALSE);
	}
	else
	{
		llwarns << "PickerTool doesn't have mouse capture on mouseUp" << llendl;	
	}
	return handled;
}
开发者ID:OS-Development,项目名称:VW.Kirsten,代码行数:20,代码来源:lltoolobjpicker.cpp


注:本文中的setMouseCapture函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。