14 #include <TGPicture.h>
15 #include <TRootEmbeddedCanvas.h>
18 #include "ImageCloseFiles.xpm"
19 #include "ImageListOpenFiles.xpm"
20 #include "ImageOpenFile.xpm"
21 #include "ImageOpenSession.xpm"
22 #include "ImageSaveSession.xpm"
32 TGCompositeFrame(p, w, h),
33 fCanvasWindow(p), fCloseFilesButton(0), fOpenFileButton(0), fOpenSessionButton(0), fSaveSessionButton(0)
35 SetCleanup(kDeepCleanup);
37 fOpenFileButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"OpenFile", (
char**)ImageOpenFile));
38 AddFrame(
fOpenFileButton,
new TGLayoutHints(kLHintsCenterX, 2, 2, 0, 0));
40 fOpenFileButton->Connect(
"Clicked()",
"QGCanvasSetupFrame",
this,
"OpenFile()");
42 fCloseFilesButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"CloseFiles", (
char**)ImageCloseFiles));
45 fCloseFilesButton->Connect(
"Clicked()",
"QGCanvasSetupFrame",
this,
"HandleCloseFilesButton()");
47 fListOpenFilesButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"ListOpenFiles", (
char**)ImageListOpenFiles));
50 fListOpenFilesButton->Connect(
"Clicked()",
"QGCanvasSetupFrame",
this,
"HandleListOpenFilesButton()");
52 fOpenSessionButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"OpenSession", (
char**)ImageOpenSession));
57 fSaveSessionButton =
new TGPictureButton(
this, gClient->GetPicturePool()->GetPicture(
"SaveSession", (
char**)ImageSaveSession));
60 fSaveSessionButton->Connect(
"Clicked()",
"QGCanvasSetupFrame",
this,
"HandleSaveSessionButton()");
103 delete sessionHandler;
110 delete sessionHandler;
Part of a canvas window for doing setup tasks.
void HandleSaveSessionButton()
Handle save session button.
void HandleListOpenFilesButton()
Handle list open files button.
virtual ~QGCanvasSetupFrame()
Destructor.
void OpenSession()
Pop up the session open dialog.
TGPictureButton * fListOpenFilesButton
Button to list open files.
TGPictureButton * fCloseFilesButton
Button to close files.
void OpenFile()
Pop up the file open dialog.
QGCanvasWindow * fCanvasWindow
Parent canvas window.
TGPictureButton * fSaveSessionButton
Button to save a session.
QGCanvasSetupFrame(QGCanvasWindow *p, UInt_t w, UInt_t h)
Private constructor.
TGPictureButton * fOpenFileButton
Button to open a file.
void HandleCloseFilesButton()
Handle close files button.
TGPictureButton * fOpenSessionButton
Button to open a session.
void SetDisplay()
Set the display based on the current state.
Window containing a ROOT canvas.
void DisplayPlotFrame()
Display the plot frame.
QGPlotFrame * GetPlotFrame()
Get pointer to the plot frame.
void DisplaySetupFrame()
Display the setup frame.
std::list< QGPlot * > & GetPlots()
Get collection of plots associated with this window.
void SetPlotsToRegenerate()
Set regenerate for each plot associated with this window.
QGFileHandler * GetFileHandler() const
Get pointer to file handler.
void ClearDrawnPlots()
Clears the collection of drawn plots.
void UpdateVariablesDropDownBoxes()
Update variables drop down boxes for plots associated with this window.
void UpdateFileLabel()
Update the file label.
bool IsFileOpen()
Check whether a file is open.
void OpenFile()
Pop up a file open dialog.
void ListOpenFiles()
Print a list of open files to the console.
void CloseFiles()
Close all open files, empty the chain.
TRootEmbeddedCanvas * GetEmbeddedCanvas()
Get pointer to canvas.
static const std::list< QGPlot * > & GetPlots()
Get collection of plots.
Class to handle saving and opening sessions.
void SaveSession()
Save session.
void OpenSession(QGCanvasWindow *window=0)
Open session.
std::string Resize(const std::string &s, size_t len)
resize a string to len, adding spaces if necessary