}
#ifdef PROLOGIO
-// Prolog database stuff
-char *wxDrawnShape::GetFunctor()
+void wxDrawnShape::WriteAttributes(wxExpr *clause)
{
- return "node_image";
-}
-
-void wxDrawnShape::WritePrologAttributes(wxExpr *clause)
-{
- wxRectangleShape::WritePrologAttributes(clause);
+ wxRectangleShape::WriteAttributes(clause);
+ clause->AddAttributeValue("current_angle", (long)m_currentAngle);
clause->AddAttributeValue("save_metafile", (long)m_saveToFile);
if (m_saveToFile)
{
for (i = 0; i < 4; i++)
{
if (m_metafiles[i].IsValid())
- m_metafiles[i].WritePrologAttributes(clause, i);
+ m_metafiles[i].WriteAttributes(clause, i);
}
}
}
-void wxDrawnShape::ReadPrologAttributes(wxExpr *clause)
+void wxDrawnShape::ReadAttributes(wxExpr *clause)
{
- wxRectangleShape::ReadPrologAttributes(clause);
+ wxRectangleShape::ReadAttributes(clause);
int iVal = (int) m_saveToFile;
- clause->AssignAttributeValue("save_metafile", &iVal);
+ clause->GetAttributeValue("save_metafile", iVal);
+ clause->GetAttributeValue("current_angle", m_currentAngle);
m_saveToFile = (iVal != 0);
if (m_saveToFile)
int i = 0;
for (i = 0; i < 4; i++)
{
- m_metafiles[i].ReadPrologAttributes(clause, i);
+ m_metafiles[i].ReadAttributes(clause, i);
}
}
}
m_metafiles[m_currentAngle].DestroyClippingRect();
}
-void wxDrawnShape::SetPen(wxPen* pen, bool isOutline)
+void wxDrawnShape::SetDrawnPen(wxPen* pen, bool isOutline)
{
m_metafiles[m_currentAngle].SetPen(pen, isOutline);
}
-void wxDrawnShape::SetBrush(wxBrush* brush, bool isFill)
+void wxDrawnShape::SetDrawnBrush(wxBrush* brush, bool isFill)
{
m_metafiles[m_currentAngle].SetBrush(brush, isFill);
}
-void wxDrawnShape::SetFont(wxFont* font)
+void wxDrawnShape::SetDrawnFont(wxFont* font)
{
m_metafiles[m_currentAngle].SetFont(font);
}
-void wxDrawnShape::SetTextColour(const wxColour& colour)
+void wxDrawnShape::SetDrawnTextColour(const wxColour& colour)
{
m_metafiles[m_currentAngle].SetTextColour(colour);
}
-void wxDrawnShape::SetBackgroundColour(const wxColour& colour)
+void wxDrawnShape::SetDrawnBackgroundColour(const wxColour& colour)
{
m_metafiles[m_currentAngle].SetBackgroundColour(colour);
}
-void wxDrawnShape::SetBackgroundMode(int mode)
+void wxDrawnShape::SetDrawnBackgroundMode(int mode)
{
m_metafiles[m_currentAngle].SetBackgroundMode(mode);
}
wxExpr *wxOpSetGDI::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
switch (m_op)
{
wxExpr *wxOpSetClipping::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
switch (m_op)
{
wxExpr *wxOpDraw::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
switch (m_op)
{
{
expr->Append(new wxExpr(m_x1));
expr->Append(new wxExpr(m_y1));
- expr->Append(new wxExpr(PrologString, m_textString));
+ expr->Append(new wxExpr(wxExprString, m_textString));
break;
}
case DRAWOP_DRAW_ARC:
wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *image)
{
- wxExpr *expr = new wxExpr(PrologList);
+ wxExpr *expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)m_op));
expr->Append(new wxExpr((long)m_noPoints));
strcat(oglBuffer, buf3);
}
}
- expr->Append(new wxExpr(PrologString, oglBuffer));
+ expr->Append(new wxExpr(wxExprString, oglBuffer));
return expr;
}
}
#ifdef PROLOGIO
-void wxPseudoMetaFile::WritePrologAttributes(wxExpr *clause, int whichAngle)
+void wxPseudoMetaFile::WriteAttributes(wxExpr *clause, int whichAngle)
{
wxString widthStr;
widthStr.Printf("meta_width%d", whichAngle);
if (obj->IsKindOf(CLASSINFO(wxPen)))
{
wxPen *thePen = (wxPen *)obj;
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)gyTYPE_PEN));
expr->Append(new wxExpr((long)thePen->GetWidth()));
expr->Append(new wxExpr((long)thePen->GetStyle()));
else if (obj->IsKindOf(CLASSINFO(wxBrush)))
{
wxBrush *theBrush = (wxBrush *)obj;
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)gyTYPE_BRUSH));
expr->Append(new wxExpr((long)theBrush->GetStyle()));
expr->Append(new wxExpr((long)theBrush->GetColour().Red()));
else if (obj->IsKindOf(CLASSINFO(wxFont)))
{
wxFont *theFont = (wxFont *)obj;
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)gyTYPE_FONT));
expr->Append(new wxExpr((long)theFont->GetPointSize()));
expr->Append(new wxExpr((long)theFont->GetFamily()));
else
{
// If no recognised GDI object, append a place holder anyway.
- expr = new wxExpr(PrologList);
+ expr = new wxExpr(wxExprList);
expr->Append(new wxExpr((long)0));
}
// Write outline and fill GDI op lists (if any)
if (m_outlineColours.Number() > 0)
{
- wxExpr *outlineExpr = new wxExpr(PrologList);
+ wxExpr *outlineExpr = new wxExpr(wxExprList);
node = m_outlineColours.First();
while (node)
{
}
if (m_fillColours.Number() > 0)
{
- wxExpr *fillExpr = new wxExpr(PrologList);
+ wxExpr *fillExpr = new wxExpr(wxExprList);
node = m_fillColours.First();
while (node)
{
}
-void wxPseudoMetaFile::ReadPrologAttributes(wxExpr *clause, int whichAngle)
+void wxPseudoMetaFile::ReadAttributes(wxExpr *clause, int whichAngle)
{
wxString widthStr;
widthStr.Printf("meta_width%d", whichAngle);