]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/composit.cpp
Merged wxPython 2.4.x to the 2.5 branch (Finally!!!)
[wxWidgets.git] / contrib / src / ogl / composit.cpp
index ba237db51f65681ac841394d8b5c83e0d7a14858..7834012aaf448779dbe3164e8a6bcb149acf546f 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/ogl/misc.h>
 #include <wx/ogl/canvas.h>
 
+#if wxUSE_PROLOGIO
 // Sometimes, objects need to access the whole database to
 // construct themselves.
 wxExprDatabase *GlobalwxExprDatabase = NULL;
-
+#endif
 
 /*
  * Division control point
@@ -598,7 +599,7 @@ bool wxCompositeShape::Constrain()
   return changed;
 }
 
-#ifdef PROLOGIO
+#if wxUSE_PROLOGIO
 void wxCompositeShape::WriteAttributes(wxExpr *clause)
 {
   wxRectangleShape::WriteAttributes(clause);
@@ -723,7 +724,7 @@ void wxCompositeShape::ReadConstraints(wxExpr *clause, wxExprDatabase *database)
     if (objExpr1 && objExpr1->GetClientData())
       m_constrainingObject = (wxShape *)objExpr1->GetClientData();
     else
-      wxFatalError("Couldn't find constraining image of composite.", "Object graphics error");
+      wxLogFatalError(wxT("Object graphics error: Couldn't find constraining image of composite."));
 
     int i = 0;
     wxExpr *currentIdExpr = constrainedExpr->Nth(i);
@@ -737,7 +738,7 @@ void wxCompositeShape::ReadConstraints(wxExpr *clause, wxExprDatabase *database)
       }
       else
       {
-        wxFatalError("Couldn't find constrained image of composite.", "Object graphics error");
+        wxLogFatalError(wxT("Object graphics error: Couldn't find constrained image of composite."));
       }
 
       i ++;
@@ -746,7 +747,7 @@ void wxCompositeShape::ReadConstraints(wxExpr *clause, wxExprDatabase *database)
     wxOGLConstraint *newConstraint = AddConstraint(cType, m_constrainingObject, m_constrainedObjects);
     newConstraint->SetSpacing(cXSpacing, cYSpacing);
     newConstraint->m_constraintId = cId;
-    newConstraint->m_constraintName = (const char*) cName;
+    newConstraint->m_constraintName = cName;
     constraintNo ++;
   }
 }
@@ -826,10 +827,10 @@ wxDivisionShape::wxDivisionShape()
   m_handleSide = DIVISION_SIDE_NONE;
   m_leftSidePen = wxBLACK_PEN;
   m_topSidePen = wxBLACK_PEN;
-  m_leftSideColour = "BLACK";
-  m_topSideColour = "BLACK";
-  m_leftSideStyle = "Solid";
-  m_topSideStyle = "Solid";
+  m_leftSideColour = wxT("BLACK");
+  m_topSideColour = wxT("BLACK");
+  m_leftSideStyle = wxT("Solid");
+  m_topSideStyle = wxT("Solid");
   ClearRegions();
 }
 
@@ -984,7 +985,7 @@ void wxDivisionShape::Copy(wxShape& copy)
   // Division geometry copying is handled at the wxCompositeShape level.
 }
 
-#ifdef PROLOGIO
+#if wxUSE_PROLOGIO
 void wxDivisionShape::WriteAttributes(wxExpr *clause)
 {
   wxCompositeShape::WriteAttributes(clause);
@@ -1573,11 +1574,11 @@ bool wxDivisionShape::ResizeAdjoining(int side, double newPos, bool test)
 class OGLPopupDivisionMenu : public wxMenu {
 public:
     OGLPopupDivisionMenu() : wxMenu() {
-        Append(DIVISION_MENU_SPLIT_HORIZONTALLY, "Split horizontally");
-        Append(DIVISION_MENU_SPLIT_VERTICALLY, "Split vertically");
+        Append(DIVISION_MENU_SPLIT_HORIZONTALLY, wxT("Split horizontally"));
+        Append(DIVISION_MENU_SPLIT_VERTICALLY, wxT("Split vertically"));
         AppendSeparator();
-        Append(DIVISION_MENU_EDIT_LEFT_EDGE, "Edit left edge");
-        Append(DIVISION_MENU_EDIT_TOP_EDGE, "Edit top edge");
+        Append(DIVISION_MENU_EDIT_LEFT_EDGE, wxT("Edit left edge"));
+        Append(DIVISION_MENU_EDIT_TOP_EDGE, wxT("Edit top edge"));
     }
 
     void OnMenu(wxCommandEvent& event);
@@ -1625,7 +1626,7 @@ void OGLPopupDivisionMenu::OnMenu(wxCommandEvent& event)
 
 void wxDivisionShape::EditEdge(int side)
 {
-  wxMessageBox("EditEdge() not implemented", "OGL", wxOK);
+  wxMessageBox(wxT("EditEdge() not implemented"), wxT("OGL"), wxOK);
 
 #if 0
   wxBeginBusyCursor();
@@ -1747,7 +1748,7 @@ void wxDivisionShape::PopupMenu(double x, double y)
     oglPopupDivisionMenu->Enable(DIVISION_MENU_EDIT_TOP_EDGE, FALSE);
 
   int x1, y1;
-  m_canvas->ViewStart(&x1, &y1);
+  m_canvas->GetViewStart(&x1, &y1);
 
   int unit_x, unit_y;
   m_canvas->GetScrollPixelsPerUnit(&unit_x, &unit_y);