X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ba06d5a8ccf8c224fcfbd52fa01a55abf7befbd..298a3f2ee8a54964a8ba79931a9a5b1d8be200b4:/contrib/samples/ogl/studio/doc.cpp diff --git a/contrib/samples/ogl/studio/doc.cpp b/contrib/samples/ogl/studio/doc.cpp index 0516794afd..7057be0f79 100644 --- a/contrib/samples/ogl/studio/doc.cpp +++ b/contrib/samples/ogl/studio/doc.cpp @@ -53,6 +53,7 @@ bool csDiagramDocument::OnCloseDocument() return true; } +#if wxUSE_PROLOGIO bool csDiagramDocument::OnSaveDocument(const wxString& file) { if (file == wxEmptyString) @@ -97,9 +98,10 @@ bool csDiagramDocument::OnOpenDocument(const wxString& file) SetFilename(file, true); Modify(false); UpdateAllViews(); - + return true; } +#endif // wxUSE_PROLOGIO /* @@ -120,7 +122,7 @@ csDiagramCommand::csDiagramCommand(const wxString& name, csDiagramDocument *doc, csDiagramCommand::~csDiagramCommand() { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); @@ -147,14 +149,14 @@ void csDiagramCommand::InsertState(csCommandState* state) // Schedule all lines connected to the states to be cut. void csDiagramCommand::RemoveLines() { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); wxShape* shape = state->GetShapeOnCanvas(); wxASSERT( (shape != NULL) ); - wxNode *node1 = shape->GetLines().GetFirst(); + wxObjectList::compatibility_iterator node1 = shape->GetLines().GetFirst(); while (node1) { wxLineShape *line = (wxLineShape *)node1->GetData(); @@ -172,7 +174,7 @@ void csDiagramCommand::RemoveLines() csCommandState* csDiagramCommand::FindStateByShape(wxShape* shape) { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); @@ -185,7 +187,7 @@ csCommandState* csDiagramCommand::FindStateByShape(wxShape* shape) bool csDiagramCommand::Do() { - wxNode* node = m_states.GetFirst(); + wxObjectList::compatibility_iterator node = m_states.GetFirst(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); @@ -200,7 +202,7 @@ bool csDiagramCommand::Undo() { // Undo in reverse order, so e.g. shapes get added // back before the lines do. - wxNode* node = m_states.GetLast(); + wxObjectList::compatibility_iterator node = m_states.GetLast(); while (node) { csCommandState* state = (csCommandState*) node->GetData(); @@ -268,7 +270,7 @@ bool csCommandState::Do() ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, false); m_shapeOnCanvas->Unlink(); - + m_doc->GetDiagram()->RemoveShape(m_shapeOnCanvas); m_savedState = m_shapeOnCanvas; @@ -347,7 +349,7 @@ bool csCommandState::Do() lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(), lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo()); - + lineShape->Show(true); wxClientDC dc(lineShape->GetCanvas()); @@ -475,7 +477,7 @@ bool csCommandState::Do() if (isSelected) m_shapeOnCanvas->Select(true, & dc); - + m_doc->Modify(true); m_doc->UpdateAllViews();