#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
// and also wide enough for its label
int widthLabel;
- GetTextExtent(wxStripMenuCodes(GetLabel()), &widthLabel, NULL);
+ GetTextExtent(GetLabelText(), &widthLabel, NULL);
widthLabel += RADIO_SIZE; // FIXME this is bogus too
if ( widthLabel > width )
width = widthLabel;
}
}
+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
// ----------------------------------------------------------------------------