X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd5206ddbc5510ee880fe82fb4780fd4f53bd6e7..7512bea2cbc6285700115dc54e7c22c8c563f030:/samples/docview/doc.cpp diff --git a/samples/docview/doc.cpp b/samples/docview/doc.cpp index 7bee849656..32d0d2a58f 100644 --- a/samples/docview/doc.cpp +++ b/samples/docview/doc.cpp @@ -252,7 +252,7 @@ void DoodleSegment::Draw(wxDC *dc) */ DrawingCommand::DrawingCommand(const wxString& name, int command, DrawingDocument *ddoc, DoodleSegment *seg): -wxCommand(TRUE, name) +wxCommand(true, name) { doc = ddoc; segment = seg; @@ -281,7 +281,7 @@ bool DrawingCommand::Do(void) segment = (DoodleSegment *)node->GetData(); doc->GetDoodleSegments().Erase(node); - doc->Modify(TRUE); + doc->Modify(true); doc->UpdateAllViews(); } break; @@ -289,12 +289,12 @@ bool DrawingCommand::Do(void) case DOODLE_ADD: { doc->GetDoodleSegments().Append(new DoodleSegment(*segment)); - doc->Modify(TRUE); + doc->Modify(true); doc->UpdateAllViews(); break; } } - return TRUE; + return true; } bool DrawingCommand::Undo(void) @@ -307,11 +307,11 @@ bool DrawingCommand::Undo(void) if (segment) { doc->GetDoodleSegments().Append(segment); - doc->Modify(TRUE); + doc->Modify(true); doc->UpdateAllViews(); segment = (DoodleSegment *) NULL; } - doc->Modify(TRUE); + doc->Modify(true); doc->UpdateAllViews(); break; } @@ -325,12 +325,12 @@ bool DrawingCommand::Undo(void) delete seg; doc->GetDoodleSegments().Erase(node); - doc->Modify(TRUE); + doc->Modify(true); doc->UpdateAllViews(); } } } - return TRUE; + return true; } IMPLEMENT_DYNAMIC_CLASS(TextEditDocument, wxDocument) @@ -342,25 +342,25 @@ bool TextEditDocument::OnSaveDocument(const wxString& filename) TextEditView *view = (TextEditView *)GetFirstView(); if (!view->textsw->SaveFile(filename)) - return FALSE; - Modify(FALSE); + return false; + Modify(false); #ifdef __WXMAC__ wxFileName fn(filename) ; fn.MacSetDefaultTypeAndCreator() ; #endif - return TRUE; + return true; } bool TextEditDocument::OnOpenDocument(const wxString& filename) { TextEditView *view = (TextEditView *)GetFirstView(); if (!view->textsw->LoadFile(filename)) - return FALSE; + return false; - SetFilename(filename, TRUE); - Modify(FALSE); + SetFilename(filename, true); + Modify(false); UpdateAllViews(); - return TRUE; + return true; } bool TextEditDocument::IsModified(void) const