// Clear the wxImage cache
void wxAnimationPlayer::ClearCache()
{
- wxNode* node = m_frames.GetFirst();
+ wxList::compatibility_iterator node = m_frames.GetFirst();
while (node)
{
- wxNode* next = node->GetNext();
+ wxList::compatibility_iterator next = node->GetNext();
wxBitmap* bitmap = (wxBitmap*) node->GetData();
delete bitmap;
- delete node;
+ m_frames.Erase(node);
node = next;
}
}
{
wxASSERT_MSG( (m_animation != NULL), _T("Animation not present in wxAnimationPlayer"));
wxASSERT_MSG( (m_frames.GetCount() != 0), _T("Animation cache not present in wxAnimationPlayer"));
- wxASSERT_MSG( (m_frames.Item(frame) != (wxNode*) NULL), _T("Image not present in wxAnimationPlayer::DrawFrame"));
+ wxASSERT_MSG( !!m_frames.Item(frame), _T("Image not present in wxAnimationPlayer::DrawFrame"));
wxBitmap* bitmap = (wxBitmap*) m_frames.Item(frame)->GetData() ;
//---------------------------------------------------------------------------
wxMultiCellSizer::~wxMultiCellSizer()
{
- m_children.DeleteContents(TRUE);
+ WX_CLEAR_LIST(wxSizerItemList, m_children);
free(m_maxHeight);
free(m_maxWidth);
wxPoint c_point;
wxSize c_size;
- wxSizerItemList::Node *current = m_children.GetFirst();
- while (current != NULL)
+ wxSizerItemList::compatibility_iterator current = m_children.GetFirst();
+ while (current)
{
wxSizerItem *item = current->GetData();
m_weights[x]->SetWidth(0);
}
- wxSizerItemList::Node *node = m_children.GetFirst();
+ wxSizerItemList::compatibility_iterator node = m_children.GetFirst();
while (node)
{
wxSizerItem *item = node->GetData();
x += view_x;
y += view_y;
- wxNode *node = m_owner->m_curves.GetFirst();
+ wxList::compatibility_iterator node = m_owner->m_curves.GetFirst();
while (node)
{
wxPlotCurve *curve = (wxPlotCurve*)node->GetData();
}
*/
- wxNode *node = m_owner->m_curves.GetFirst();
+ wxList::compatibility_iterator node = m_owner->m_curves.GetFirst();
while (node)
{
wxPlotCurve *curve = (wxPlotCurve*) node->GetData();
wxPlotCurve *wxPlotWindow::GetAt( size_t n )
{
- wxNode *node = m_curves.Item( n );
+ wxList::compatibility_iterator node = m_curves.Item( n );
if (!node)
return (wxPlotCurve*) NULL;
void wxPlotWindow::Delete( wxPlotCurve* curve )
{
- wxNode *node = m_curves.Find( curve );
+ wxList::compatibility_iterator node = m_curves.Find( curve );
if (!node) return;
m_curves.DeleteObject( curve );
void wxPlotWindow::Delete( wxPlotOnOffCurve* curve )
{
- wxNode *node = m_onOffCurves.Find( curve );
+ wxList::compatibility_iterator node = m_onOffCurves.Find( curve );
if (!node) return;
m_onOffCurves.DeleteObject( curve );
wxPlotOnOffCurve *wxPlotWindow::GetOnOffCurveAt( size_t n )
{
- wxNode *node = m_onOffCurves.Item( n );
+ wxList::compatibility_iterator node = m_onOffCurves.Item( n );
if (!node)
return (wxPlotOnOffCurve*) NULL;
GetViewStart( &view_x, &view_y );
wxInt32 max = 0;
- wxNode *node = m_curves.GetFirst();
+ wxList::compatibility_iterator node = m_curves.GetFirst();
while (node)
{
wxPlotCurve *curve = (wxPlotCurve*) node->GetData();
void wxPlotWindow::ResetScrollbar()
{
wxInt32 max = 0;
- wxNode *node = m_curves.GetFirst();
+ wxList::compatibility_iterator node = m_curves.GetFirst();
while (node)
{
wxPlotCurve *curve = (wxPlotCurve*) node->GetData();