diff --git a/gui/gui/src/HelpText.cxx b/gui/gui/src/HelpText.cxx index d42f7c1a7090b..113bb145113e2 100644 --- a/gui/gui/src/HelpText.cxx +++ b/gui/gui/src/HelpText.cxx @@ -236,7 +236,6 @@ you can create as before the following graphics objects:\n\ TCutG *cut = (TCutG*)gPad->FindObject(\"CUTG\").\n\n\ "; - const char gHelpPullDownMenus[] = "\ Each canvas has a menu bar with the following items:\n\ \"File\" with the items:\n\ @@ -251,6 +250,9 @@ Each canvas has a menu bar with the following items:\n\ makes a SVG file\n\ makes a TeX file\n\ makes a GIF file\n\ + makes a JPEG file\n\ + makes a PNG file\n\ + makes a BMP file\n\ generates a C++ macro to reproduce the canvas\n\ saves canvas objects in a Root file\n\ brings up the Save As... dialog\n\ @@ -264,8 +266,8 @@ Each canvas has a menu bar with the following items:\n\ clears the last selected pad via middle mouse button)\n\ clears this canvas.\n\ not implemented\n\ - not implemented\n\n" -"\"View\" with the items:\n\ + not implemented\n\n\ +\"View\" with the items:\n\ toggles the pad editor\n\ toggles the tool bar\n\ toggles the event status bar that shows the identification\n\ @@ -298,7 +300,6 @@ by clicking with the right mouse button in the regions closed to the canvas \n\ borders. This will display a menu to perform operations on a canvas.\n\n\ "; - const char gHelpCanvas[] = "\ A canvas (see TCanvas) is a top level pad (See TPad).\n\ A pad is a linked list of primitives of any type (graphics objects,\n\ diff --git a/gui/gui/src/TRootCanvas.cxx b/gui/gui/src/TRootCanvas.cxx index d9c9908de3591..f4d6b3f12eedf 100644 --- a/gui/gui/src/TRootCanvas.cxx +++ b/gui/gui/src/TRootCanvas.cxx @@ -127,6 +127,7 @@ enum ERootCanvasCommands { kFileSaveAsGIF, kFileSaveAsJPG, kFileSaveAsPNG, + kFileSaveAsBMP, kFileSaveAsTEX, kFilePrint, kFileCloseCanvas, @@ -198,7 +199,7 @@ enum ERootCanvasCommands { kToolCutG }; - +// clang-format off static const char *gOpenTypes[] = { "ROOT files", "*.root", "All files", "*", 0, 0 }; @@ -211,6 +212,7 @@ static const char *gSaveAsTypes[] = { "PDF", "*.pdf", "PNG", "*.png", "JPEG", "*.jpg", "GIF", "*.gif", + "BMP", "*.bmp", "ROOT macros", "*.C", "ROOT files", "*.root", "XML", "*.xml", @@ -255,6 +257,7 @@ static ToolBarData_t gToolBarData1[] = { { "cut.xpm", "Graphical Cut", kFALSE, kToolCutG, 0 }, { 0, 0, kFALSE, 0, 0 } }; +// clang-format on ////////////////////////////////////////////////////////////////////////// // // @@ -400,8 +403,9 @@ void TRootCanvas::CreateCanvas(const char *name) gErrorIgnoreLevel = sav; } if (img > 0) { - fFileSaveMenu->AddEntry(TString::Format("%s.&jpg",name), kFileSaveAsJPG); - fFileSaveMenu->AddEntry(TString::Format("%s.&png",name), kFileSaveAsPNG); + fFileSaveMenu->AddEntry(Form("%s.&jpg", name), kFileSaveAsJPG); + fFileSaveMenu->AddEntry(Form("%s.&png", name), kFileSaveAsPNG); + fFileSaveMenu->AddEntry(Form("%s.&bmp", name), kFileSaveAsBMP); } fFileSaveMenu->AddEntry(TString::Format("%s.&C", name), kFileSaveAsC); @@ -923,6 +927,7 @@ Bool_t TRootCanvas::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t) Bool_t appendedType = kFALSE; TString fn = fi.fFilename; TString ft = fi.fFileTypes[fi.fFileTypeIdx+1]; + // clang-format off dir = fi.fIniDir; typeidx = fi.fFileTypeIdx; overwr = fi.fOverwrite; @@ -934,6 +939,7 @@ Bool_t TRootCanvas::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t) fn.EndsWith(".svg") || fn.EndsWith(".tex") || fn.EndsWith(".gif") || + fn.EndsWith(".bmp") || fn.EndsWith(".xml") || fn.EndsWith(".xpm") || fn.EndsWith(".jpg") || @@ -953,11 +959,11 @@ Bool_t TRootCanvas::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t) } Warning("ProcessMessage", "file %s cannot be saved with this extension", fi.fFilename); } - for (int i=1;gSaveAsTypes[i];i+=2) { + for (int i = 1; gSaveAsTypes[i]; i += 2) { TString ftype = gSaveAsTypes[i]; ftype.ReplaceAll("*.", "."); if (fn.EndsWith(ftype.Data())) { - typeidx = i-1; + typeidx = i - 1; break; } } @@ -990,6 +996,9 @@ Bool_t TRootCanvas::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t) case kFileSaveAsPNG: fCanvas->SaveAs(".png"); break; + case kFileSaveAsBMP: + fCanvas->SaveAs(".bmp"); + break; case kFileSaveAsTEX: fCanvas->SaveAs(".tex"); break; @@ -1292,6 +1301,7 @@ Bool_t TRootCanvas::ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t) hd->SetText(gHelpPostscript); hd->Popup(); break; + // clang-format on } default: break;