#if wxUSE_RADIOBOX
+#include "wx/radiobox.h"
+
#ifndef WX_PRECOMP
#include "wx/bitmap.h"
#include "wx/brush.h"
- #include "wx/radiobox.h"
#include "wx/settings.h"
#include "wx/log.h"
#endif
}
}
+int wxRadioBox::GetItemFromPoint(const wxPoint& pt) const
+{
+ const unsigned int count = GetCount();
+ for ( unsigned int i = 0; i < count; i++ )
+ {
+ RECT rect = wxGetWindowRect((*m_radioButtons)[i]);
+
+ if ( rect.left <= pt.x && pt.x < rect.right &&
+ rect.top <= pt.y && pt.y < rect.bottom )
+ {
+ return i;
+ }
+ }
+
+ return wxNOT_FOUND;
+}
+
// ----------------------------------------------------------------------------
// radio box drawing
// ----------------------------------------------------------------------------
return lDlgCode | DLGC_WANTARROWS;
}
-#if wxUSE_TOOLTIPS
- case WM_NOTIFY:
- {
- NMHDR* hdr = (NMHDR *)lParam;
- if ( hdr->code == TTN_NEEDTEXT )
- {
- wxRadioBox *
- radiobox = (wxRadioBox *)wxGetWindowUserData(hwnd);
-
- wxCHECK_MSG( radiobox, 0,
- wxT("radio button without radio box?") );
-
- wxToolTip *tooltip = radiobox->GetToolTip();
- if ( tooltip )
- {
- TOOLTIPTEXT *ttt = (TOOLTIPTEXT *)lParam;
- ttt->lpszText = (wxChar *)tooltip->GetTip().c_str();
- }
-
- // processed
- return 0;
- }
- }
- break;
-#endif // wxUSE_TOOLTIPS
-
case WM_KEYDOWN:
{
wxRadioBox *radiobox = (wxRadioBox *)wxGetWindowUserData(hwnd);