• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setMouseCapture函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: setMouseCapture

BOOL LLManip::handleHover(S32 x, S32 y, MASK mask)
{
	// We only handle the event if mousedown started with us
	if( hasMouseCapture() )
	{
		if( mObjectSelection->isEmpty() )
		{
			// Somehow the object got deselected while we were dragging it.
			// Release the mouse
			setMouseCapture( FALSE );
		}

		lldebugst(LLERR_USER_INPUT) << "hover handled by LLManip (active)" << llendl;
	}
	else
	{
		lldebugst(LLERR_USER_INPUT) << "hover handled by LLManip (inactive)" << llendl;
	}
	gViewerWindow->setCursor(UI_CURSOR_ARROW);
	return TRUE;
}
开发者ID:Xara,项目名称:Meerkat-Viewer,代码行数:21,代码来源:llmanip.cpp


示例17: setMouseCapture

BOOL LLToolGrab::handleMouseUp(S32 x, S32 y, MASK mask)
{
	// call the base class to propogate info to sim
	LLTool::handleMouseUp(x, y, mask);

	if( hasMouseCapture() )
	{
		setMouseCapture( FALSE );
	}
	mMode = GRAB_INACTIVE;

	// HACK: Make some grabs temporary
	if (gGrabTransientTool)
	{
		gBasicToolset->selectTool( gGrabTransientTool );
		gGrabTransientTool = NULL;
	}

	//gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));

	return TRUE;
} 
开发者ID:Xara,项目名称:Meerkat-Viewer,代码行数:22,代码来源:lltoolgrab.cpp


示例18: setMouseCapture

void LLFocusMgr::releaseFocusIfNeeded( LLView* view )
{
	if( childHasMouseCapture( view ) )
	{
		setMouseCapture( NULL );
	}

	if( childHasKeyboardFocus( view ))
	{
		if (view == mLockedView)
		{
			mLockedView = NULL;
			setKeyboardFocus( NULL );
		}
		else
		{
			setKeyboardFocus( mLockedView );
		}
	}

	LLUI::removePopup(view);
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:22,代码来源:llfocusmgr.cpp


示例19: floor

BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
{
	BOOL handled = FALSE;

	// Find the z value of the initial click. 
	LLVector3d spot;
	if( gViewerWindow->mousePointOnLandGlobal( x, y, &spot ) )
	{
		// Round to nearest X,Y grid
		spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 );
		spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 );

		LLRegionPosition region_position( spot );
		LLViewerRegion* regionp = region_position.getRegion();

		if (!canTerraform(regionp))
		{
			alertNoTerraform(regionp);
			return TRUE;
		}

		LLVector3 pos_region = region_position.getPositionRegion();
		U32 grids = regionp->getLand().mGridsPerEdge;
		S32 i = llclamp( (S32)pos_region.mV[VX], 0, (S32)grids );
		S32 j = llclamp( (S32)pos_region.mV[VY], 0, (S32)grids );
		mStartingZ = regionp->getLand().getZ(i+j*grids);
		mMouseX = x;
		mMouseY = y;
		gIdleCallbacks.addFunction( &LLToolBrushLand::onIdle, (void*)this );
		setMouseCapture( TRUE );

		LLViewerParcelMgr::getInstance()->setSelectionVisible(FALSE);
		handled = TRUE;
	}

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


示例20: setMouseCapture

BOOL LLToolGrab::handleHover(S32 x, S32 y, MASK mask)
{
	if (!gViewerWindow->getLeftMouseDown())
	{
		gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB);
		setMouseCapture(FALSE);
		return TRUE;
	}

	// Do the right hover based on mode
	switch( mMode )
	{
	case GRAB_ACTIVE_CENTER:
		handleHoverActive( x, y, mask );	// cursor hidden
		break;
		
	case GRAB_NONPHYSICAL:
		handleHoverNonPhysical(x, y, mask);
		break;

	case GRAB_INACTIVE:
		handleHoverInactive( x, y, mask );  // cursor set here
		break;

	case GRAB_NOOBJECT:
	case GRAB_LOCKED:
		handleHoverFailed( x, y, mask );
		break;

	}

	mLastMouseX = x;
	mLastMouseY = y;
	
	return TRUE;
}
开发者ID:Boy,项目名称:rainbow,代码行数:36,代码来源:lltoolgrab.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setMouseCursor函数代码示例发布时间:2022-05-30
下一篇:
C++ setMotor函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap