- (void)wxMessageBox("Sorry, could not open this file for saving.", msgTitle, wxOK | wxICON_EXCLAMATION,
+ (void)wxMessageBox(_T("Sorry, could not open this file for saving."), msgTitle, wxOK | wxICON_EXCLAMATION,
- (void)wxMessageBox("Sorry, could not open this file.", msgTitle, wxOK|wxICON_EXCLAMATION,
+ (void)wxMessageBox(_T("Sorry, could not open this file."), msgTitle, wxOK|wxICON_EXCLAMATION,
csDiagramCommand::csDiagramCommand(const wxString& name, csDiagramDocument *doc,
csCommandState* onlyState):
csDiagramCommand::csDiagramCommand(const wxString& name, csDiagramDocument *doc,
csCommandState* onlyState):
if (!FindStateByShape(line))
{
csCommandState* newState = new csCommandState(ID_CS_CUT, NULL, line);
InsertState(newState);
}
if (!FindStateByShape(line))
{
csCommandState* newState = new csCommandState(ID_CS_CUT, NULL, line);
InsertState(newState);
}
}
bool csDiagramCommand::Undo()
{
// Undo in reverse order, so e.g. shapes get added
// back before the lines do.
}
bool csDiagramCommand::Undo()
{
// Undo in reverse order, so e.g. shapes get added
// back before the lines do.
- m_shapeOnCanvas->Select(FALSE);
- ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, FALSE);
+ m_shapeOnCanvas->Select(false);
+ ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, false);
- m_shapeOnCanvas->Select(TRUE, &dc);
- ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, TRUE);
+ m_shapeOnCanvas->Select(true, &dc);
+ ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, true);
lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(),
lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo());
lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(),
lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo());
- lineShape->Select(TRUE, &dc);
- ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, TRUE);
+ lineShape->Select(true, &dc);
+ ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, true);
if (m_cmd == ID_CS_SIZE || m_cmd == ID_CS_ROTATE_CLOCKWISE || m_cmd == ID_CS_ROTATE_ANTICLOCKWISE ||
m_cmd == ID_CS_CHANGE_LINE_ORDERING || m_cmd == ID_CS_CHANGE_LINE_ATTACHMENT)
if (m_cmd == ID_CS_SIZE || m_cmd == ID_CS_ROTATE_CLOCKWISE || m_cmd == ID_CS_ROTATE_ANTICLOCKWISE ||
m_cmd == ID_CS_CHANGE_LINE_ORDERING || m_cmd == ID_CS_CHANGE_LINE_ATTACHMENT)
m_shapeOnCanvas->SetSize(width, height);
m_shapeOnCanvas->Move(dc, m_shapeOnCanvas->GetX(), m_shapeOnCanvas->GetY());
m_shapeOnCanvas->SetSize(width, height);
m_shapeOnCanvas->Move(dc, m_shapeOnCanvas->GetX(), m_shapeOnCanvas->GetY());
- if (m_shapeOnCanvas->GetChildren().Number() > 0)
- m_shapeOnCanvas->DrawLinks(dc, -1, TRUE);
+ if (m_shapeOnCanvas->GetChildren().GetCount() > 0)
+ m_shapeOnCanvas->DrawLinks(dc, -1, true);
- m_shapeOnCanvas->Select(FALSE, &dc);
- ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, FALSE);
+ m_shapeOnCanvas->Select(false, &dc);
+ ((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, false);
m_doc->GetDiagram()->RemoveShape(m_shapeOnCanvas);
m_shapeOnCanvas->Unlink(); // Unlinks the line, if it is a line
m_doc->GetDiagram()->RemoveShape(m_shapeOnCanvas);
m_shapeOnCanvas->Unlink(); // Unlinks the line, if it is a line