]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/basic2.cpp
Added wxFileHistory demo
[wxWidgets.git] / contrib / src / ogl / basic2.cpp
index 7a65d7097caea36d7eaa31482cd4c737e316a95e..5dd361faa49eb84f9e672020e07544c3fae8c230 100644 (file)
@@ -14,7 +14,7 @@
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 #pragma hdrstop
 
 #include <wx/wxexpr.h>
 
+#ifdef new
+#undef new
+#endif
+
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
 #else
@@ -582,8 +586,8 @@ void wxPolygonShape::WriteAttributes(wxExpr *clause)
 {
   wxShape::WriteAttributes(clause);
 
-  clause->AddAttributeValue("x", m_xpos);
-  clause->AddAttributeValue("y", m_ypos);
+  clause->AddAttributeValue(wxT("x"), m_xpos);
+  clause->AddAttributeValue(wxT("y"), m_ypos);
 
   // Make a list of lists for the coordinates
   wxExpr *list = new wxExpr(wxExprList);
@@ -601,7 +605,7 @@ void wxPolygonShape::WriteAttributes(wxExpr *clause)
 
     node = node->Next();
   }
-  clause->AddAttributeValue("points", list);
+  clause->AddAttributeValue(wxT("points"), list);
 
   // Save the original (unscaled) points
   list = new wxExpr(wxExprList);
@@ -618,7 +622,7 @@ void wxPolygonShape::WriteAttributes(wxExpr *clause)
 
     node = node->Next();
   }
-  clause->AddAttributeValue("m_originalPoints", list);
+  clause->AddAttributeValue(wxT("m_originalPoints"), list);
 }
 
 void wxPolygonShape::ReadAttributes(wxExpr *clause)
@@ -630,7 +634,7 @@ void wxPolygonShape::ReadAttributes(wxExpr *clause)
   m_originalPoints = new wxList;
 
   wxExpr *points_list = NULL;
-  clause->AssignAttributeValue("points", &points_list);
+  clause->AssignAttributeValue(wxT("points"), &points_list);
 
   // If no points_list, don't crash!! Assume a diamond instead.
   double the_height = 100.0;
@@ -672,7 +676,7 @@ void wxPolygonShape::ReadAttributes(wxExpr *clause)
   }
 
   points_list = NULL;
-  clause->AssignAttributeValue("m_originalPoints", &points_list);
+  clause->AssignAttributeValue(wxT("m_originalPoints"), &points_list);
 
   // If no points_list, don't crash!! Assume a diamond instead.
   if (!points_list)
@@ -940,21 +944,21 @@ bool wxRectangleShape::GetPerimeterPoint(double x1, double y1,
 void wxRectangleShape::WriteAttributes(wxExpr *clause)
 {
   wxShape::WriteAttributes(clause);
-  clause->AddAttributeValue("x", m_xpos);
-  clause->AddAttributeValue("y", m_ypos);
+  clause->AddAttributeValue(wxT("x"), m_xpos);
+  clause->AddAttributeValue(wxT("y"), m_ypos);
 
-  clause->AddAttributeValue("width", m_width);
-  clause->AddAttributeValue("height", m_height);
+  clause->AddAttributeValue(wxT("width"), m_width);
+  clause->AddAttributeValue(wxT("height"), m_height);
   if (m_cornerRadius != 0.0)
-    clause->AddAttributeValue("corner", m_cornerRadius);
+    clause->AddAttributeValue(wxT("corner"), m_cornerRadius);
 }
 
 void wxRectangleShape::ReadAttributes(wxExpr *clause)
 {
   wxShape::ReadAttributes(clause);
-  clause->AssignAttributeValue("width", &m_width);
-  clause->AssignAttributeValue("height", &m_height);
-  clause->AssignAttributeValue("corner", &m_cornerRadius);
+  clause->AssignAttributeValue(wxT("width"), &m_width);
+  clause->AssignAttributeValue(wxT("height"), &m_height);
+  clause->AssignAttributeValue(wxT("corner"), &m_cornerRadius);
 
   // In case we're reading an old file, set the region's size
   if (m_regions.Number() == 1)
@@ -1080,18 +1084,18 @@ void wxEllipseShape::SetSize(double x, double y, bool recursive)
 void wxEllipseShape::WriteAttributes(wxExpr *clause)
 {
   wxShape::WriteAttributes(clause);
-  clause->AddAttributeValue("x", m_xpos);
-  clause->AddAttributeValue("y", m_ypos);
+  clause->AddAttributeValue(wxT("x"), m_xpos);
+  clause->AddAttributeValue(wxT("y"), m_ypos);
 
-  clause->AddAttributeValue("width", m_width);
-  clause->AddAttributeValue("height", m_height);
+  clause->AddAttributeValue(wxT("width"), m_width);
+  clause->AddAttributeValue(wxT("height"), m_height);
 }
 
 void wxEllipseShape::ReadAttributes(wxExpr *clause)
 {
   wxShape::ReadAttributes(clause);
-  clause->AssignAttributeValue("width", &m_width);
-  clause->AssignAttributeValue("height", &m_height);
+  clause->AssignAttributeValue(wxT("width"), &m_width);
+  clause->AssignAttributeValue(wxT("height"), &m_height);
 
   // In case we're reading an old file, set the region's size
   if (m_regions.Number() == 1)