Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions gui/gui/src/HelpText.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand All @@ -251,6 +250,9 @@ Each canvas has a menu bar with the following items:\n\
<name.svg > makes a SVG file\n\
<name.tex > makes a TeX file\n\
<name.gif > makes a GIF file\n\
<name.jpg > makes a JPEG file\n\
<name.png > makes a PNG file\n\
<name.bmp > makes a BMP file\n\
<name.C > generates a C++ macro to reproduce the canvas\n\
<name.root> saves canvas objects in a Root file\n\
<Save As... > brings up the Save As... dialog\n\
Expand All @@ -264,8 +266,8 @@ Each canvas has a menu bar with the following items:\n\
<Pad > clears the last selected pad via middle mouse button)\n\
<Canvas> clears this canvas.\n\
<Undo > not implemented\n\
<Redo > not implemented\n\n"
"\"View\" with the items:\n\
<Redo > not implemented\n\n\
\"View\" with the items:\n\
<Editor > toggles the pad editor\n\
<Toolbar > toggles the tool bar\n\
<Event Status> toggles the event status bar that shows the identification\n\
Expand Down Expand Up @@ -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\
Expand Down
14 changes: 11 additions & 3 deletions gui/gui/src/TRootCanvas.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ enum ERootCanvasCommands {
kFileSaveAsGIF,
kFileSaveAsJPG,
kFileSaveAsPNG,
kFileSaveAsBMP,
kFileSaveAsTEX,
kFilePrint,
kFileCloseCanvas,
Expand Down Expand Up @@ -158,7 +159,7 @@ enum ERootCanvasCommands {
kToolCutG

};

// clang-format off
static const char *gOpenTypes[] = { "ROOT files", "*.root",
"All files", "*",
0, 0 };
Expand All @@ -171,6 +172,7 @@ static const char *gSaveAsTypes[] = { "PDF", "*.pdf",
"PNG", "*.png",
"JPEG", "*.jpg",
"GIF", "*.gif",
"BMP", "*.bmp",
"ROOT macros", "*.C",
"ROOT files", "*.root",
"XML", "*.xml",
Expand Down Expand Up @@ -215,6 +217,7 @@ static ToolBarData_t gToolBarData1[] = {
{ "cut.xpm", "Graphical Cut", kFALSE, kToolCutG, 0 },
{ 0, 0, kFALSE, 0, 0 }
};
// clang-format on

//////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -360,6 +363,7 @@ void TRootCanvas::CreateCanvas(const char *name)
if (img > 0) {
fFileSaveMenu->AddEntry(Form("%s.&jpg",name), kFileSaveAsJPG);
fFileSaveMenu->AddEntry(Form("%s.&png",name), kFileSaveAsPNG);
fFileSaveMenu->AddEntry(Form("%s.&bmp", name), kFileSaveAsBMP);
}

fFileSaveMenu->AddEntry(Form("%s.&C", name), kFileSaveAsC);
Expand Down Expand Up @@ -880,6 +884,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;
Expand All @@ -891,6 +896,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") ||
Expand All @@ -910,16 +916,17 @@ 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;
}
}
}
break;
// clang-format on
case kFileSaveAsRoot:
fCanvas->SaveAs(".root");
break;
Expand All @@ -944,6 +951,7 @@ 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;
Expand Down
Loading