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

Method OnLButtonDown

ReClass/CClassView.cpp:454–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454void CClassView::OnLButtonDown( UINT nFlags, CPoint point )
455{
456 CNodeBase* ObjectHit;
457 CNodeBase* SelectedNode;
458 CNodeClass* SelectedParentClassNode;
459 UINT Idx1, Idx2;
460 size_t i, s, j, m;
461
462 m_Edit.ShowWindow( SW_HIDE );
463
464 for (i = 0; i < m_Hotspots.size( ); i++)
465 {
466 if (m_Hotspots[i].Rect.PtInRect( point ))
467 {
468 ObjectHit = static_cast<CNodeBase*>(m_Hotspots[i].Object);
469
470 if (m_Hotspots[i].Type == HS_OPENCLOSE)
471 {
472 ObjectHit->ToggleLevelOpen( m_Hotspots[i].Level );
473 }
474
475 if (m_Hotspots[i].Type == HS_CLICK)
476 {
477 ObjectHit->Update( &m_Hotspots[i] );
478 }
479
480 if (m_Hotspots[i].Type == HS_SELECT)
481 {
482 if (nFlags == MK_LBUTTON)
483 {
484 //g_ReClassApp.ClearSelection( );
485 //m_Selected.clear( );
486 ClearSelection( );
487
488 ObjectHit->Select( );
489
490 m_Selected.push_back( m_Hotspots[i] );
491 }
492 if (nFlags == (MK_LBUTTON | MK_CONTROL))
493 {
494 ObjectHit->ToggleSelected( );
495
496 if (ObjectHit->IsSelected( ))
497 {
498 m_Selected.push_back( m_Hotspots[i] );
499 }
500 else
501 {
502 for (s = 0; s < m_Selected.size( ); s++)
503 {
504 if (m_Selected[s].Object == ObjectHit)
505 {
506 m_Selected.erase( m_Selected.begin( ) + s );
507 break;
508 }
509 }
510 }
511 }

Callers

nothing calls this directly

Calls 13

ToggleLevelOpenMethod · 0.80
ToggleSelectedMethod · 0.80
IsSelectedMethod · 0.80
GetParentMethod · 0.80
GetTypeMethod · 0.80
GetOffsetMethod · 0.80
GetNodeMethod · 0.80
CalcAllOffsetsMethod · 0.80
clearMethod · 0.80
sizeMethod · 0.45
UpdateMethod · 0.45
SelectMethod · 0.45

Tested by

no test coverage detected