// Duplicate the list of points
m_points = new wxList;
- wxNode *node = the_points->GetFirst();
+ wxObjectList::compatibility_iterator node = the_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
{
if (m_points)
{
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
delete point;
- delete node;
+ m_points->Erase(node);
node = m_points->GetFirst();
}
delete m_points;
}
if (m_originalPoints)
{
- wxNode *node = m_originalPoints->GetFirst();
+ wxObjectList::compatibility_iterator node = m_originalPoints->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
delete point;
- delete node;
+ m_originalPoints->Erase(node);
node = m_originalPoints->GetFirst();
}
delete m_originalPoints;
double top = 10000;
double bottom = -10000;
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
double top = 10000;
double bottom = -10000;
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
int np = m_points->GetCount();
double *xpoints = new double[np];
double *ypoints = new double[np];
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
int i = 0;
while (node)
{
double x_proportion = (double)(fabs(new_width/m_originalWidth));
double y_proportion = (double)(fabs(new_height/m_originalHeight));
- wxNode *node = m_points->GetFirst();
- wxNode *original_node = m_originalPoints->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator original_node = m_originalPoints->GetFirst();
while (node && original_node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
void wxPolygonShape::UpdateOriginalPoints()
{
if (!m_originalPoints) m_originalPoints = new wxList;
- wxNode *original_node = m_originalPoints->GetFirst();
+ wxObjectList::compatibility_iterator original_node = m_originalPoints->GetFirst();
while (original_node)
{
- wxNode *next_node = original_node->GetNext();
+ wxObjectList::compatibility_iterator next_node = original_node->GetNext();
wxRealPoint *original_point = (wxRealPoint *)original_node->GetData();
delete original_point;
- delete original_node;
+ m_originalPoints->Erase(original_node);
original_node = next_node;
}
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
void wxPolygonShape::AddPolygonPoint(int pos)
{
- wxNode *node = m_points->Item(pos);
+ wxObjectList::compatibility_iterator node = m_points->Item(pos);
if (!node) node = m_points->GetFirst();
wxRealPoint *firstPoint = (wxRealPoint *)node->GetData();
- wxNode *node2 = m_points->Item(pos + 1);
+ wxObjectList::compatibility_iterator node2 = m_points->Item(pos + 1);
if (!node2) node2 = m_points->GetFirst();
wxRealPoint *secondPoint = (wxRealPoint *)node2->GetData();
void wxPolygonShape::DeletePolygonPoint(int pos)
{
- wxNode *node = m_points->Item(pos);
+ wxObjectList::compatibility_iterator node = m_points->Item(pos);
if (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
delete point;
- delete node;
+ m_points->Erase(node);
UpdateOriginalPoints();
if (m_selected)
{
{
// Look for the point we'd be connecting to. This is
// a heuristic...
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
double *xpoints = new double[n];
double *ypoints = new double[n];
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
int i = 0;
while (node)
{
// Make as many control points as there are vertices.
void wxPolygonShape::MakeControlPoints()
{
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
void wxPolygonShape::ResetControlPoints()
{
- wxNode *node = m_points->GetFirst();
- wxNode *controlPointNode = m_controlPoints.GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator controlPointNode = m_controlPoints.GetFirst();
while (node && controlPointNode)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
// Make a list of lists for the coordinates
wxExpr *list = new wxExpr(wxExprList);
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
polyCopy.m_points = new wxList;
polyCopy.m_originalPoints = new wxList;
- wxNode *node = m_points->GetFirst();
+ wxObjectList::compatibility_iterator node = m_points->GetFirst();
while (node)
{
wxRealPoint *point = (wxRealPoint *)node->GetData();
int wxPolygonShape::GetNumberOfAttachments() const
{
int maxN = (m_points ? (m_points->GetCount() - 1) : 0);
- wxNode *node = m_attachmentPoints.GetFirst();
+ wxObjectList::compatibility_iterator node = m_attachmentPoints.GetFirst();
while (node)
{
wxAttachmentPoint *point = (wxAttachmentPoint *)node->GetData();
if ((attachment >= 0) && (attachment < (int) m_points->GetCount()))
return true;
- wxNode *node = m_attachmentPoints.GetFirst();
+ wxObjectList::compatibility_iterator node = m_attachmentPoints.GetFirst();
while (node)
{
wxAttachmentPoint *point = (wxAttachmentPoint *)node->GetData();
// Rotate attachment points
double sinTheta = (double)sin(actualTheta);
double cosTheta = (double)cos(actualTheta);
- wxNode *node = m_attachmentPoints.GetFirst();
+ wxObjectList::compatibility_iterator node = m_attachmentPoints.GetFirst();
while (node)
{
wxAttachmentPoint *point = (wxAttachmentPoint *)node->GetData();
m_penColour = region.m_penColour;
ClearText();
- wxNode *node = region.m_formattedText.GetFirst();
+ wxObjectList::compatibility_iterator node = region.m_formattedText.GetFirst();
while (node)
{
wxShapeTextLine *line = (wxShapeTextLine *)node->GetData();
void wxShapeRegion::ClearText()
{
- wxNode *node = m_formattedText.GetFirst();
+ wxObjectList::compatibility_iterator node = m_formattedText.GetFirst();
while (node)
{
wxShapeTextLine *line = (wxShapeTextLine *)node->GetData();
- wxNode *next = node->GetNext();
+ wxObjectList::compatibility_iterator next = node->GetNext();
delete line;
- delete node;
+ m_formattedText.Erase(node);
node = next;
}
}