]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gbsizer.cpp
mac encodings support
[wxWidgets.git] / src / common / gbsizer.cpp
index 83753c51e13f580487c0f07bd2dabfbab607a852..85653bc76d3faec6c08f5dbea8e350f21c978a88 100644 (file)
@@ -406,6 +406,24 @@ wxGBSizerItem* wxGridBagSizer::FindItemAtPosition(const wxGBPosition& pos)
 
 
 
+wxGBSizerItem* wxGridBagSizer::FindItemAtPoint(const wxPoint& pt)
+{
+    wxSizerItemList::compatibility_iterator node = m_children.GetFirst();
+    while (node)
+    {
+        wxGBSizerItem* item = (wxGBSizerItem*)node->GetData();
+        wxRect rect(item->GetPosition(), item->GetSize());
+        rect.Inflate(m_hgap, m_vgap);
+        if ( rect.Inside(pt) )
+            return item;
+        node = node->GetNext();
+    }
+    return NULL;
+}
+
+
+
+
 wxGBSizerItem* wxGridBagSizer::FindItemWithData(const wxObject* userData)
 {
     wxSizerItemList::compatibility_iterator node = m_children.GetFirst();