bool wxToolBar::Realize()
{
- if (m_tools.Number() == 0)
+ if (m_tools.GetCount() == 0)
return FALSE;
Point localOrigin ;
controlstyle.flags = kControlUseFontMask ;
controlstyle.font = kControlFontSmallSystemFont ;
- wxNode *node = m_tools.First();
+ wxToolBarToolsList::Node *node = m_tools.GetFirst();
int noButtons = 0;
int x = 0 ;
int y = 0 ;
while (node)
{
- wxToolBarTool *tool = (wxToolBarTool *)node->Data();
+ wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
if( !tool->IsSeparator() )
{
if (toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight) {
maxHeight = toolbarrect.top + y + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v ;
}
- node = node->Next();
+ node = node->GetNext();
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
{
if ( m_macToolHandles[index] == (void*) control )
{
- wxToolBarTool *tool = (wxToolBarTool *)m_tools.Nth( index )->Data();
+ wxToolBarTool *tool = (wxToolBarTool *)m_tools.Item( index )->GetData();
if ( tool->CanBeToggled() )
{
tool->Toggle( GetControl32BitValue( (ControlHandle) control ) ) ;
void wxToolBar::MacSuperChangedPosition()
{
- if (m_tools.Number() > 0)
+ if (m_tools.GetCount() > 0)
{
Point localOrigin ;
controlstyle.flags = kControlUseFontMask ;
controlstyle.font = kControlFontSmallSystemFont ;
- wxNode *node = m_tools.First();
+ wxToolBarToolsList::Node *node = m_tools.GetFirst();
int noButtons = 0;
int x = 0 ;
wxSize toolSize = GetToolSize() ;
WindowRef rootwindow = (WindowRef) MacGetRootWindow() ;
while (node)
{
- wxToolBarTool *tool = (wxToolBarTool *)node->Data();
+ wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
if( !tool->IsSeparator() )
{
if (toolbarrect.top + m_yMargin + kwxMacToolBarTopMargin - m_y - localOrigin.v > maxHeight)
maxHeight = toolbarrect.top + kwxMacToolBarTopMargin + m_yMargin - m_y - localOrigin.v ;
- node = node->Next();
+ node = node->GetNext();
}
}
GetControlBounds((ControlHandle) m_macToolHandles[index], &bounds ) ;
if ( PtInRect( pt , &bounds ) )
{
- return (wxToolBarTool*) (m_tools.Nth( index )->Data() ) ;
+ return (wxToolBarTool*) (m_tools.Item( index )->GetData() ) ;
}
}
}