Exemplo n.º 1
0
void OnLButtonUp(HWND hWnd, UINT nFlags, POINTS p)
{
	if (bTracking)
	{
		StopTracking(hWnd);
	}
}
Exemplo n.º 2
0
void FW_SizingControlBar::OnLButtonUp(UINT nFlags, CPoint point) 
{
    if (m_bTracking)
        StopTracking();

    baseCSizingControlBar::OnLButtonUp(nFlags, point);
}
Exemplo n.º 3
0
void CCoolDialogBar::OnCaptureChanged(CWnd *pWnd) 
{
    if (m_bTracking && pWnd != this)
        StopTracking(FALSE); // cancel tracking

    CControlBar::OnCaptureChanged(pWnd);
}
Exemplo n.º 4
0
void CSizingControlBar::OnRButtonDown(UINT nFlags, CPoint point) 
{
    if (m_bTracking)
        StopTracking();
    
    baseCSizingControlBar::OnRButtonDown(nFlags, point);
}
void CPositionRequest::HandleTrackingStateL()
    {
    switch (iTrackingState)
        {
        case EPosNoTracking:
            break;

        case EPosFirstTrackingRequest:
            // start internal tracking
            iTrackingState = EPosTracking;
            ContinueTrackingTimer();

            StartPsyTrackingL();
            break;

        case EPosTracking:
            // if tracking interval was changed
            if (iNewTrackingInterval)
                {
                RestartTrackingL();
                }
            break;

        case EPosStopTracking:
            StopTracking();
            break;

        default:
            DebugPanic(EPosServerPanicTrackingInconsistency);
        }
    }
Exemplo n.º 6
0
void CSizingControlBar::OnCaptureChanged(CWnd *pWnd) 
{
    if (m_bTracking && (pWnd != this))
        StopTracking();

    baseCSizingControlBar::OnCaptureChanged(pWnd);
}
Exemplo n.º 7
0
void CSizableReBar::OnLButtonUp( UINT nFlags, CPoint point )
{
    if ( m_bTracking )
    {
        StopTracking();
    }
    CControlBar::OnLButtonUp( nFlags, point );
}
Exemplo n.º 8
0
void COXTabViewContainer::OnLButtonUp(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	
	StopTracking(point);

	CWnd::OnLButtonUp(nFlags,point);
}
Exemplo n.º 9
0
void CSizableReBar::OnCaptureChanged( CWnd *pWnd )
{
    if ( m_bTracking && ( pWnd != this ) )
    {
        StopTracking();
    }

    CControlBar::OnCaptureChanged( pWnd );
}
/**
 * From CActive
 */
void CPositionRequest::DoCancel()
    {
    OstTraceFunctionEntry1( CPOSITIONREQUEST_DOCANCEL_ENTRY, this );
    LBS_RDEBUG_VAR_INT("CPositionRequest::DoCancel() iRequestPhase", iRequestPhase);
    iTimeoutTimer->Cancel();

    switch (iRequestPhase)
        {
        case EPosReqPositionRequest:
            {
            __ASSERT_DEBUG(iPositioner, DebugPanic(EPosServerPanicPositionerNotInitialized));
            DEBUG_TRACE("calling CPositioner::CancelNotifyPositionUpdate()", __LINE__)
            if(iRequestTimedOut)
            	{
            	iPositioner->CancelNotifyPositionUpdate(KErrTimedOut);
            	}
            else
            	{
            	iPositioner->CancelNotifyPositionUpdate();
            	}
            break;
            }
        case EPosWaitForTracking:
            CompleteSelf(KErrCancel);
            break;

        default:
        	DEBUG_TRACE("CPositionRequest::DoCancel() panicing", __LINE__)
            DebugPanic(EPosServerPanicRequestInconsistency);
        }
    
    // Deactive positioning status after cancellation.
    DeActivatePositioningStatusIfNeeded();

    TInt err;
    if (iRequestTimedOut)
        {
        iRequestTimedOut = EFalse;
        CompleteClient(KErrTimedOut);
        TRAP(err, HandleTrackingStateL());
        }
    else
        {
        CompleteClient(KErrCancel);

        // Handle Tracking State
        if (iTrackingState == EPosStopTracking)
            {
            StopTracking();
            }
        }

    iRequestPhase = EPosReqInactive;
    
    OstTraceFunctionExit1( CPOSITIONREQUEST_DOCANCEL_EXIT, this );
    }
Exemplo n.º 11
0
/////////////////////////////////////////////////////////////////////////
// Mouse Handling
//
void CCoolDialogBar::OnLButtonUp(UINT nFlags, CPoint point) 
{
    if (!m_bTracking)
        CControlBar::OnLButtonUp(nFlags, point);
    else
    {
        ClientToWnd(point);
        StopTracking(TRUE);
    }
}
Exemplo n.º 12
0
void COXTabViewContainer::OnCancelMode() 
{
	CWnd::OnCancelMode();
	
	// TODO: Add your message handler code here

	CPoint point;
	::GetCursorPos(&point);
	ScreenToClient(&point);
	StopTracking(point);
}
Exemplo n.º 13
0
/////////////////////////////////////////////////////////////////////////
// Mouse Handling
//
void CCoolDialogBar::OnLButtonUp(UINT nFlags, CPoint point) 
{
    //MessageBox("lup", "JMC", MB_OK | MB_ICONSTOP);
    if (!m_bTracking && !false_move)
        CControlBar::OnLButtonUp(nFlags, point);
    else
    {
        ClientToWnd(point);
        StopTracking(TRUE);
    }
}
void AdaptiveHistogramCamshift::Deinit()
{
  // Free buffers that enable tracking.
  StopTracking();

  cvReleaseImage(&m_imgHue);
  cvReleaseImage(&m_imgMask);
  cvReleaseImage(&m_imgHSV);
  cvReleaseImage(&m_imgBackproject);
  cvReleaseImage(&m_histImg);

  cvReleaseHist(&m_hist);
  cvReleaseHist(&m_histSubdiv);
  cvReleaseHist(&m_histTrackWnd);
  m_initialized = false;
}
/**
 * Called when the server class is shutting down.
 */
void CPositionRequest::NotifyServerShutdown()
    {
    if (IsActive())
        {
        DEBUG_TRACE("CPositionRequest::NotifyServerShutdown() with active request", __LINE__)
        CompleteClient(KErrServerTerminated);
        Cancel();
        }

    if (iTrackingState == EPosTracking)
        {
        StopTracking();
        }
    delete iPositioner;
    iPositioner = NULL;
    }
/**
 * Destructor.
 */
CPositionRequest::~CPositionRequest()
    {
    // Panic client if request is outstanding
    if (IsActive())
        {
        iMessage.Panic(KPosClientFault, EPositionRequestsNotCancelled);
        }
    Cancel();
    if (iTrackingState == EPosTracking)
        {
        StopTracking();
        }
    delete iTrackingTimer;
    delete iPositionBuffer;
    delete iTimeoutTimer;
    delete iPositioner;
    
    // Deactivate the positioning status when the object dies.
    DeActivatePositioningStatusIfNeeded();
    }
Exemplo n.º 17
0
void CDynSplitterWnd::OnMouseMove(UINT nFlags, CPoint pt) 
{
	if(!m_bDynSplit)
	{
		CSplitterWnd::OnMouseMove(nFlags, pt);
		return;
	}

	if (GetCapture() != this)
		StopTracking(FALSE);

	if (m_bTracking)
	{
		// move tracker to current cursor position
		pt.Offset(m_ptTrackOffset); // pt is the upper right of hit detect
		// limit the point to the valid split range
		if (pt.y < m_rectLimit.top)
			pt.y = m_rectLimit.top;
		else if (pt.y > m_rectLimit.bottom)
			pt.y = m_rectLimit.bottom;
		if (pt.x < m_rectLimit.left)
			pt.x = m_rectLimit.left;
		else if (pt.x > m_rectLimit.right)
			pt.x = m_rectLimit.right;

		if (m_htTrack == vSplitterBox ||
			m_htTrack >= vSplitterBar1 && m_htTrack <= vSplitterBar15)
		{
			if (m_rectTracker.top != pt.y)
			{
				OnInvertTracker(m_rectTracker);
				m_rectTracker.OffsetRect(0, pt.y - m_rectTracker.top);
				OnInvertTracker(m_rectTracker);
			}
		}
		else if (m_htTrack == hSplitterBox ||
			m_htTrack >= hSplitterBar1 && m_htTrack <= hSplitterBar15)
		{
			if (m_rectTracker.left != pt.x)
			{
				OnInvertTracker(m_rectTracker);
				m_rectTracker.OffsetRect(pt.x - m_rectTracker.left, 0);
				OnInvertTracker(m_rectTracker);
			}
		}
		else if (m_htTrack == bothSplitterBox ||
		   (m_htTrack >= splitterIntersection1 &&
			m_htTrack <= splitterIntersection225))
		{
			if (m_rectTracker.top != pt.y)
			{
				OnInvertTracker(m_rectTracker);
				m_rectTracker.OffsetRect(0, pt.y - m_rectTracker.top);
				OnInvertTracker(m_rectTracker);
			}
			if (m_rectTracker2.left != pt.x)
			{
				OnInvertTracker(m_rectTracker2);
				m_rectTracker2.OffsetRect(pt.x - m_rectTracker2.left, 0);
				OnInvertTracker(m_rectTracker2);
			}
		}

		OnLButtonUp(MK_LBUTTON,pt);
		OnLButtonDown(MK_LBUTTON,pt);
		if(m_OldPoint != pt)
		{
			RedrawWindow(NULL, NULL, RDW_ALLCHILDREN | RDW_UPDATENOW);
			m_OldPoint = pt;
		}
	}
	else
	{
		// simply hit-test and set appropriate cursor
		int ht = HitTest(pt);
		SetSplitCursor(ht);
	}
}
/**
 * Set the TPositionUpdateOptions object.
 *
 * When this class is constructed, the TPositionUpdateOptions object
 * is constructed using default constructor with no parameters.
 *
 * @param aOptions The update options from the client.
 */
void CPositionRequest::SetUpdateOptions(
    const TPositionUpdateOptionsBase& aOptions)
    {
    iTimeOut = aOptions.UpdateTimeOut();
    TTimeIntervalMicroSeconds newInterval = aOptions.UpdateInterval();
    TTimeIntervalMicroSeconds oldInterval = iTrackingUpdateInterval;

    if (newInterval != iTrackingUpdateInterval)
        {
        iTrackingUpdateInterval = newInterval;

        if (newInterval == 0) // "stop periodic updates"
            {
            switch (iTrackingState)
                {
                case EPosFirstTrackingRequest:
                    iTrackingState = EPosNoTracking;
                    break;

                case EPosTracking:
                    if (!IsActive())
                        {
                        // can stop it right now
                        StopTracking();
                        }
                    else
                        {
                        // mark to stop later
                        iTrackingState = EPosStopTracking;
                        }
                    break;

                case EPosNoTracking:
                case EPosStopTracking:
                    break;
                default:
                    DebugPanic(EPosServerPanicTrackingInconsistency);
                    break;
                }
            }
        else if (oldInterval != 0) // "use another update interval"
            {
            if (iRequestPhase == EPosReqInactive)
                {
                TInt err;
                TRAP(err, RestartTrackingL());
                }
            else
                {
                // can't affect outstanding request
                // postpone until request is completed
                // it will be handled by RunL or DoCancel
                // via HandleTrackingStateL
                iNewTrackingInterval = ETrue;
                }
            }
        else
            {
            // oldInterval == 0
            // newInterval != 0
            // it means - "start periodic updates"
            iTrackingState = EPosFirstTrackingRequest;
            }
        }
    }