Diana Software
QGPlotFrame.cc
Go to the documentation of this file.
1 #include "QGPlotFrame.hh"
2 #include "QGCanvasWindow.hh"
3 #include "QGPlotIconsFrame.hh"
4 #include "TCanvas.h"
5 #include "TGaxis.h"
6 #include "TGButton.h"
7 #include "TRootEmbeddedCanvas.h"
8 
10 
11 QGPlotFrame::QGPlotFrame(QGCanvasWindow* p, UInt_t w, UInt_t h) :
12 TGHorizontalFrame(p, w, h),
13 fCanvasWindow(p)
14 {
15  SetCleanup(kDeepCleanup);
16 
17  fCanvas = new TRootEmbeddedCanvas("Canvas", this, w, h);
18  AddFrame(fCanvas, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0));
19  fCanvas->GetCanvas()->SetBorderMode(0);
20  fCanvas->GetCanvas()->SetRightMargin(0.05);
21  fCanvas->GetCanvas()->SetTopMargin(0.075);
22 
23  fPlotIconsFrame = new QGPlotIconsFrame(this, 60, h);
24  AddFrame(fPlotIconsFrame, new TGLayoutHints(kLHintsRight, 2, 0, 0, 0));
25 
26  TGaxis::SetMaxDigits(4);
27 }
28 
30 {
31  Cleanup();
32 }
ClassImp(QGPlotFrame) QGPlotFrame
Definition: QGPlotFrame.cc:9
Window containing a ROOT canvas.
Part of a canvas window containing the ROOT canvas.
Definition: QGPlotFrame.hh:17
virtual ~QGPlotFrame()
Destructor.
Definition: QGPlotFrame.cc:29
QGPlotFrame(QGCanvasWindow *p, UInt_t w, UInt_t h)
Private constructor.
Part of a QGPlotFrame containing buttons to add new plots.