X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d90879fa39fd71f4fd270e0fe38c851690781dbc..6ba7c06eeeda47b88783025428ca0f290e3bf236:/include/wx/msw/checklst.h diff --git a/include/wx/msw/checklst.h b/include/wx/msw/checklst.h index 473cc09b76..b8b1eb28fb 100644 --- a/include/wx/msw/checklst.h +++ b/include/wx/msw/checklst.h @@ -46,6 +46,10 @@ public: virtual bool IsChecked(size_t uiIndex) const; virtual void Check(size_t uiIndex, bool bCheck = TRUE); + // return the index of the item at this position or wxNOT_FOUND + int HitTest(const wxPoint& pt) const { return DoHitTestItem(pt.x, pt.y); } + int HitTest(wxCoord x, wxCoord y) const { return DoHitTestItem(x, y); } + // accessors size_t GetItemHeight() const { return m_nItemHeight; } @@ -55,6 +59,9 @@ protected: virtual wxOwnerDrawn *CreateItem(size_t n); virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item); + // this can't be called DoHitTest() because wxWindow already has this method + int DoHitTestItem(wxCoord x, wxCoord y) const; + // pressing space or clicking the check box toggles the item void OnKeyDown(wxKeyEvent& event); void OnLeftClick(wxMouseEvent& event);