#endif
// For compilers that support precompilation, includes "wx.h".
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#include <wx/wx.h>
#endif
-#include <wx/wxexpr.h>
+#include <wx/deprecated/wxexpr.h>
#include <wx/types.h>
-#if wxUSE_IOSTREAMH
-#include <iostream.h>
-#else
-#include <iostream>
+#ifdef new
+#undef new
#endif
+
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
double m_xpos, double m_ypos, double width, double height,
int formatMode)
{
- int n = text_list->Number();
+ int n = text_list->GetCount();
if (!text_list || (n == 0))
return;
// Store text extents for speed
double *widths = new double[n];
- wxNode *current = text_list->First();
+ wxNode *current = text_list->GetFirst();
int i = 0;
while (current)
{
- wxShapeTextLine *line = (wxShapeTextLine *)current->Data();
+ wxShapeTextLine *line = (wxShapeTextLine *)current->GetData();
dc.GetTextExtent(line->GetText(), ¤t_width, &char_height);
widths[i] = current_width;
xOffset = 0.0;
}
- current = text_list->First();
+ current = text_list->GetFirst();
i = 0;
while (current)
{
- wxShapeTextLine *line = (wxShapeTextLine *)current->Data();
+ wxShapeTextLine *line = (wxShapeTextLine *)current->GetData();
double x;
if ((formatMode & FORMAT_CENTRE_HORIZ) && (widths[i] < width))
void oglCentreTextNoClipping(wxDC& dc, wxList *text_list,
double m_xpos, double m_ypos, double width, double height)
{
- int n = text_list->Number();
+ int n = text_list->GetCount();
if (!text_list || (n == 0))
return;
// Store text extents for speed
double *widths = new double[n];
- wxNode *current = text_list->First();
+ wxNode *current = text_list->GetFirst();
int i = 0;
while (current)
{
- wxShapeTextLine *line = (wxShapeTextLine *)current->Data();
+ wxShapeTextLine *line = (wxShapeTextLine *)current->GetData();
dc.GetTextExtent(line->GetText(), ¤t_width, &char_height);
widths[i] = current_width;
double xoffset = (double)(m_xpos - width/2.0);
- current = text_list->First();
+ current = text_list->GetFirst();
i = 0;
while (current)
{
- wxShapeTextLine *line = (wxShapeTextLine *)current->Data();
+ wxShapeTextLine *line = (wxShapeTextLine *)current->GetData();
double x = (double)((width - widths[i])/2.0 + xoffset);
double y = (double)(i*char_height + yoffset);
double m_xpos, double m_ypos, double width, double height,
double *actual_width, double *actual_height)
{
- int n = text_list->Number();
+ int n = text_list->GetCount();
if (!text_list || (n == 0))
{
long max_width = 0;
long current_width = 0;
- wxNode *current = text_list->First();
+ wxNode *current = text_list->GetFirst();
int i = 0;
while (current)
{
- wxShapeTextLine *line = (wxShapeTextLine *)current->Data();
+ wxShapeTextLine *line = (wxShapeTextLine *)current->GetData();
dc.GetTextExtent(line->GetText(), ¤t_width, &char_height);
if (current_width > max_width)
{
wxString oldBuffer(buffer);
- char *s = (char *)node->Data();
+ char *s = (char *)node->GetData();
if (!s)
{
// FORCE NEW LINE
(long)(m_xpos - width/2.0), (long)(m_ypos - height/2.0),
(long)width, (long)height);
- wxNode *current = text_list->First();
+ wxNode *current = text_list->GetFirst();
while (current)
{
- wxShapeTextLine *line = (wxShapeTextLine *)current->Data();
+ wxShapeTextLine *line = (wxShapeTextLine *)current->GetData();
dc.DrawText(line->GetText(), WXROUND(xoffset + line->GetX()), WXROUND(yoffset + line->GetY()));
current = current->Next();
double xcount = 0;
double ycount = 0;
- wxNode *node = points->First();
+ wxNode *node = points->GetFirst();
while (node)
{
- wxRealPoint *point = (wxRealPoint *)node->Data();
+ wxRealPoint *point = (wxRealPoint *)node->GetData();
xcount += point->x;
ycount += point->y;
node = node->Next();
}
- *x = (xcount/points->Number());
- *y = (ycount/points->Number());
+ *x = (xcount/points->GetCount());
+ *y = (ycount/points->GetCount());
}
/*
if (!list)
return;
- wxNode *node = list->First();
+ wxNode *node = list->GetFirst();
while (node)
{
- char *s = (char *)node->Data();
+ char *s = (char *)node->GetData();
item->Append(s);
node = node->Next();
}