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

Method HitTest

SOUI/src/control/STileView.cpp:485–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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