LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Canvas.h
Go to the documentation of this file.
1 #ifndef EVDB_CANVAS_H
9 #define EVDB_CANVAS_H
10 
11 #include "TQObject.h"
12 #include "RQ_OBJECT.h"
14 
15 class TGMainFrame;
16 class TGCompositeFrame;
17 class TGLayoutHints;
18 class TRootEmbeddedCanvas;
19 class TCanvas;
20 
21 namespace evdb {
22  class Canvas : public Printable {
23  RQ_OBJECT("evdb::Canvas")
24 
25  public:
26  Canvas(TGMainFrame* mf);
27  virtual ~Canvas();
28 
29  virtual void Draw(const char* opt=0) = 0;
30 
31  // Sub-classes must define these
32  virtual const char* PrintTag() const {return "sub-class needs print tag"; }
33  virtual const char* Description() const {return "sub-class needs description"; }
34  virtual void Print(const char* f);
35 
36  void Connect();
37 
38  protected:
39  TGCompositeFrame* fFrame;
40  TGLayoutHints* fLayout;
41  TRootEmbeddedCanvas* fEmbCanvas;
42  TCanvas* fCanvas;
43 
44  unsigned short fXsize;
45  unsigned short fYsize;
46  float fAspectRatio;
47  };
48 }
49 
50 #endif // EVDB_CANVAS_H
51 
void Connect()
Make signal/slot connections.
Definition: Canvas.cxx:68
Base class for printable objects.
Definition: Printable.h:15
TGCompositeFrame * fFrame
Graphics frame.
Definition: Canvas.h:39
TCanvas * fCanvas
The ROOT drawing canvas.
Definition: Canvas.h:42
TGLayoutHints * fLayout
Layout hints for frame.
Definition: Canvas.h:40
Manage all things related to colors for the event display.
float fAspectRatio
fYsize/fXsize
Definition: Canvas.h:46
TFile f
Definition: plotHisto.C:6
Base class for printable objects.
virtual const char * Description() const
Definition: Canvas.h:33
unsigned short fXsize
Size of the canvas;.
Definition: Canvas.h:44
unsigned short fYsize
Size of the canvas;.
Definition: Canvas.h:45
Canvas(TGMainFrame *mf)
Definition: Canvas.cxx:33
virtual const char * PrintTag() const
Definition: Canvas.h:32
virtual void Print(const char *f)
Definition: Canvas.cxx:88
TRootEmbeddedCanvas * fEmbCanvas
Embedded canvas.
Definition: Canvas.h:41
virtual void Draw(const char *opt=0)=0
virtual ~Canvas()
Definition: Canvas.cxx:78