-int wxToolBar::GetToolSeparation()
-{
- return m_separation;
-}
-
-wxString wxToolBar::GetToolLongHelp(int toolIndex)
-{
- wxNode *node = m_tools.First();
- while (node)
- {
- wxToolBarTool *tool = (wxToolBarTool*)node->Data();
- if (tool->m_index == toolIndex)
- {
- return tool->m_longHelpString;
- }
- node = node->Next();
- }
-
- wxFAIL_MSG( T("wrong toolbar index") );
-
- return T("");
-}
-
-wxString wxToolBar::GetToolShortHelp(int toolIndex)
-{
- wxNode *node = m_tools.First();
- while (node)
- {
- wxToolBarTool *tool = (wxToolBarTool*)node->Data();
- if (tool->m_index == toolIndex)
- {
- return tool->m_shortHelpString;
- }
- node = node->Next();
- }
-
- wxFAIL_MSG( T("wrong toolbar index") );
-
- return T("");
-}
-
-void wxToolBar::SetToolLongHelp(int toolIndex, const wxString& helpString)
-{
- wxNode *node = m_tools.First();
- while (node)
- {
- wxToolBarTool *tool = (wxToolBarTool*)node->Data();
- if (tool->m_index == toolIndex)
- {
- tool->m_longHelpString = helpString;
- return;
- }
- node = node->Next();
- }
-
- wxFAIL_MSG( T("wrong toolbar index") );
-
- return;
-}
-
-void wxToolBar::SetToolShortHelp(int toolIndex, const wxString& helpString)
-{
- wxNode *node = m_tools.First();
- while (node)
- {
- wxToolBarTool *tool = (wxToolBarTool*)node->Data();
- if (tool->m_index == toolIndex)
- {
- tool->m_shortHelpString = helpString;
- return;
- }
- node = node->Next();
- }
-
- wxFAIL_MSG( T("wrong toolbar index") );
-
- return;
-}
-
-void wxToolBar::OnIdle( wxIdleEvent &WXUNUSED(ievent) )
-{
- wxEvtHandler* evtHandler = GetEventHandler();
-
- wxNode* node = m_tools.First();
- while (node)
- {
- wxToolBarTool* tool = (wxToolBarTool*) node->Data();
-
- wxUpdateUIEvent event( tool->m_index );
- event.SetEventObject(this);
-
- if (evtHandler->ProcessEvent( event ))
- {
- if (event.GetSetEnabled())
- EnableTool(tool->m_index, event.GetEnabled());
- if (event.GetSetChecked())
- ToggleTool(tool->m_index, event.GetChecked());
-/*
- if (event.GetSetText())
- // Set tooltip?
-*/
- }
-
- node = node->Next();
- }
-}