Applied patch [ 689188 ] adds wxToolBar::GetToolPos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user