MCPcopy Create free account
hub / github.com/ajkhoury/ReClassEx / OnRButtonDown

Method OnRButtonDown

ReClass/CClassView.cpp:640–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640void CClassView::OnRButtonDown( UINT nFlags, CPoint point )
641{
642 size_t i;
643 CNodeBase* ObjectHit;
644
645 m_Edit.ShowWindow( SW_HIDE );
646
647 //for (auto hs : m_Hotspots)
648 //{
649 // if (hs.Rect.PtInRect( point ))
650 // {
651 // CNodeBase* pHitObject = (CNodeBase*)hs.Object;
652 // if (hs.Type == HS_CLICK)
653 // {
654 // pHitObject->Update( hs );
655 // }
656 // else if (hs.Type == HS_SELECT)
657 // {
658 // if (nFlags == MK_RBUTTON)
659 // {
660 // ClearSelection( );
661 //
662 // pHitObject->Select( );
663 // m_Selected.push_back( hs );
664 //
665 // CRect client;
666 // GetClientRect( &client );
667 // ClientToScreen( &client );
668 //
669 // CMenu menu;
670 // menu.LoadMenu( MAKEINTRESOURCE( IDR_MENU_QUICKMODIFY ) );
671 // menu.GetSubMenu( 0 )->TrackPopupMenu( TPM_LEFTALIGN | TPM_HORNEGANIMATION, client.left + hs.Rect.left + point.x, client.top + point.y, this );
672 // }
673 // }
674 // Invalidate( );
675 // }
676 //}
677
678 for (i = 0; i < m_Hotspots.size( ); i++)
679 {
680 if (m_Hotspots[i].Rect.PtInRect( point ))
681 {
682 ObjectHit = m_Hotspots[i].Object;
683
684 if (m_Hotspots[i].Type == HS_CLICK)
685 {
686 ObjectHit->Update( &m_Hotspots[i] );
687 }
688 else if (m_Hotspots[i].Type == HS_SELECT)
689 {
690 if (nFlags == MK_RBUTTON)
691 {
692 ClearSelection( );
693
694 ObjectHit->Select( );
695 m_Selected.push_back( m_Hotspots[i] );
696
697 CRect ClientRect;

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
UpdateMethod · 0.45
SelectMethod · 0.45

Tested by

no test coverage detected