]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tbarbase.cpp
Reinsert missing ctor removed in date/time tidy
[wxWidgets.git] / src / common / tbarbase.cpp
index 82cc3bd9a3cc8b420ae8058b29a262eb0bd7a009..020171d8f4bc1d5b21d23cbeb56792f1c5ae7196 100644 (file)
@@ -458,6 +458,22 @@ void wxToolBarBase::SetToolClientData(int id, wxObject *clientData)
     tool->SetClientData(clientData);
 }
 
+int wxToolBarBase::GetToolPos(int id) const
+{
+    size_t pos = 0;
+    wxToolBarToolsList::Node *node;
+
+    for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
+    {
+        if ( node->GetData()->GetId() == id )
+            return pos;
+
+        pos++;
+    }
+
+    return wxNOT_FOUND;
+}
+
 bool wxToolBarBase::GetToolState(int id) const
 {
     wxToolBarToolBase *tool = FindById(id);