Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
20 changes: 15 additions & 5 deletions gui/gui/src/TRootCanvas.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ enum ERootCanvasCommands {
kFileSaveAsGIF,
kFileSaveAsJPG,
kFileSaveAsPNG,
kFileSaveAsBMP,
kFileSaveAsTEX,
kFilePrint,
kFileCloseCanvas,
Expand Down Expand Up @@ -198,7 +199,7 @@ enum ERootCanvasCommands {
kToolCutG

};

// clang-format off
static const char *gOpenTypes[] = { "ROOT files", "*.root",
"All files", "*",
0, 0 };
Expand All @@ -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",
Expand Down Expand Up @@ -255,6 +257,7 @@ static ToolBarData_t gToolBarData1[] = {
{ "cut.xpm", "Graphical Cut", kFALSE, kToolCutG, 0 },
{ 0, 0, kFALSE, 0, 0 }
};
// clang-format on

//////////////////////////////////////////////////////////////////////////
// //
Expand Down Expand Up @@ -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);
Comment thread
ferdymercury marked this conversation as resolved.
Outdated
Comment thread
linev marked this conversation as resolved.
Outdated
}

fFileSaveMenu->AddEntry(TString::Format("%s.&C", name), kFileSaveAsC);
Expand Down Expand Up @@ -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;
Expand All @@ -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") ||
Expand All @@ -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;
}
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading