return true;
}
+#if wxUSE_PROLOGIO
bool csDiagramDocument::OnSaveDocument(const wxString& file)
{
if (file == wxEmptyString)
SetFilename(file, true);
Modify(false);
UpdateAllViews();
-
+
return true;
}
+#endif // wxUSE_PROLOGIO
/*
csDiagramCommand::~csDiagramCommand()
{
- wxNode* node = m_states.GetFirst();
+ wxObjectList::compatibility_iterator node = m_states.GetFirst();
while (node)
{
csCommandState* state = (csCommandState*) node->GetData();
// 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();
csCommandState* csDiagramCommand::FindStateByShape(wxShape* shape)
{
- wxNode* node = m_states.GetFirst();
+ wxObjectList::compatibility_iterator node = m_states.GetFirst();
while (node)
{
csCommandState* state = (csCommandState*) node->GetData();
bool csDiagramCommand::Do()
{
- wxNode* node = m_states.GetFirst();
+ wxObjectList::compatibility_iterator node = m_states.GetFirst();
while (node)
{
csCommandState* state = (csCommandState*) node->GetData();
{
// 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();
((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, false);
m_shapeOnCanvas->Unlink();
-
+
m_doc->GetDiagram()->RemoveShape(m_shapeOnCanvas);
m_savedState = m_shapeOnCanvas;
lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(),
lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo());
-
+
lineShape->Show(true);
wxClientDC dc(lineShape->GetCanvas());
if (isSelected)
m_shapeOnCanvas->Select(true, & dc);
-
+
m_doc->Modify(true);
m_doc->UpdateAllViews();