本文整理汇总了C++中setMouseCapture函数的典型用法代码示例。如果您正苦于以下问题:C++ setMouseCapture函数的具体用法?C++ setMouseCapture怎么用?C++ setMouseCapture使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setMouseCapture函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setMouseCapture
// virtual
void LLToolObjPicker::handleDeselect()
{
if (hasMouseCapture())
{
LLTool::handleDeselect();
setMouseCapture(FALSE);
}
}
示例2: setMouseCapture
void LLToolGrab::handleDeselect()
{
if( hasMouseCapture() )
{
setMouseCapture( FALSE );
}
}
示例3: setMouseCapture
BOOL LLPathfindingPathTool::handleRightMouseDown(S32 pX, S32 pY, MASK pMask)
{
setMouseCapture(TRUE);
mIsRightMouseButtonHeld = true;
gViewerWindow->setCursor(UI_CURSOR_TOOLNO);
return TRUE;
}
示例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;
}
示例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);
}
示例6: setMouseCapture
void LLToolPie::handleDeselect()
{
if( hasMouseCapture() )
{
setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly
}
// remove temporary selection for pie menu
LLSelectMgr::getInstance()->validateSelection();
}
示例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;
}
示例8: setMouseCapture
BOOL LLManip::handleMouseUp(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
if( hasMouseCapture() )
{
handled = TRUE;
setMouseCapture( FALSE );
}
return handled;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}