MCPcopy Create free account
hub / github.com/SOUI2/soui / HitTest

Method HitTest

SOUI/src/control/SListView.cpp:489–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487 }
488
489 SItemPanel * SListView::HitTest(CPoint & pt)
490 {
491 SPOSITION pos = m_lstItems.GetHeadPosition();
492 while(pos)
493 {
494 ItemInfo ii = m_lstItems.GetNext(pos);
495 CRect rcItem = ii.pItem->GetItemRect();
496 if(rcItem.PtInRect(pt))
497 {
498 pt-=rcItem.TopLeft();
499 return ii.pItem;
500 }
501 }
502 return NULL;
503 }
504
505 LRESULT SListView::OnMouseEvent(UINT uMsg,WPARAM wParam,LPARAM lParam)
506 {

Callers

nothing calls this directly

Calls 4

GetHeadPositionMethod · 0.80
PtInRectMethod · 0.80
GetNextMethod · 0.45
GetItemRectMethod · 0.45

Tested by

no test coverage detected