Logo ROOT  
Reference Guide
TDialogCanvas.h
Go to the documentation of this file.
1 // @(#)root/gpad:$Id$
2 // Author: Rene Brun 03/07/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TDialogCanvas
13 #define ROOT_TDialogCanvas
14 
15 
16 #include "TCanvas.h"
17 #include "TAttText.h"
18 
19 class TDialogCanvas : public TCanvas, public TAttText {
20 
21 private:
24 
25 protected:
26  TObject *fRefObject; ///< Pointer to object to set attributes
27  TPad *fRefPad; ///< Pad containing object
28 
29 public:
30  TDialogCanvas();
31  TDialogCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
32  TDialogCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy, UInt_t ww, UInt_t wh);
33  virtual ~TDialogCanvas();
34  virtual void Apply(const char *action="");
35  virtual void BuildStandardButtons();
36  virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0);
37  TObject *GetRefObject() const { return fRefObject; }
38  TPad *GetRefPad() const { return fRefPad; }
39  virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
40  virtual void RecursiveRemove(TObject *obj);
41  virtual void SetBorderMode(Short_t bordermode){ fBorderMode = bordermode; }
42  virtual void SetGrid(Int_t valuex = 1, Int_t valuey = 1);
43  virtual void SetLogx(Int_t value = 1);
44  virtual void SetLogy(Int_t value = 1);
45  virtual void SetName(const char *name) { fName = name; }
46  virtual void SetRefObject(TObject*obj) { fRefObject=obj; }
47  virtual void SetRefPad(TPad *pad) { fRefPad=pad; }
48  virtual void x3d(Option_t *option="");
49 
50  ClassDef(TDialogCanvas,0) //A specialized canvas to set attributes.
51 };
52 
55 inline void TDialogCanvas::SetLogx(Int_t) { }
56 inline void TDialogCanvas::SetLogy(Int_t) { }
57 inline void TDialogCanvas::x3d(Option_t *) { }
58 
59 #endif
60 
TAttText
Definition: TAttText.h:18
TDialogCanvas::Range
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
Definition: TDialogCanvas.cxx:124
TDialogCanvas::SetName
virtual void SetName(const char *name)
Set canvas name. In case name is an empty string, a default name is set.
Definition: TDialogCanvas.h:51
TDialogCanvas::fRefObject
TObject * fRefObject
Pointer to object to set attributes.
Definition: TDialogCanvas.h:32
TDialogCanvas::Divide
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Definition: TDialogCanvas.h:53
TPad
Definition: TPad.h:26
TDialogCanvas::x3d
virtual void x3d(Option_t *option="")
Deprecated: use TPad::GetViewer3D() instead.
Definition: TDialogCanvas.h:57
TAttText.h
TDialogCanvas::SetBorderMode
virtual void SetBorderMode(Short_t bordermode)
Definition: TDialogCanvas.h:47
TDialogCanvas::Apply
virtual void Apply(const char *action="")
Called when the APPLY button is executed.
Definition: TDialogCanvas.cxx:72
Float_t
float Float_t
Definition: RtypesCore.h:57
TDialogCanvas::SetGrid
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Definition: TDialogCanvas.h:54
Int_t
int Int_t
Definition: RtypesCore.h:45
TDialogCanvas::SetLogx
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
Definition: TDialogCanvas.h:55
TCanvas.h
TDialogCanvas::GetRefPad
TPad * GetRefPad() const
Definition: TDialogCanvas.h:44
TDialogCanvas::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a pad and its sub-pads.
Definition: TDialogCanvas.cxx:133
TPad::fName
TString fName
Pad name.
Definition: TPad.h:105
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
TDialogCanvas::SetRefPad
virtual void SetRefPad(TPad *pad)
Definition: TDialogCanvas.h:53
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TPad::fBorderMode
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
Definition: TPad.h:94
TDialogCanvas::SetLogy
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
Definition: TDialogCanvas.h:56
TDialogCanvas::~TDialogCanvas
virtual ~TDialogCanvas()
DialogCanvas default destructor.
Definition: TDialogCanvas.cxx:65
TDialogCanvas::fRefPad
TPad * fRefPad
Pad containing object.
Definition: TDialogCanvas.h:33
TDialogCanvas::SetRefObject
virtual void SetRefObject(TObject *obj)
Definition: TDialogCanvas.h:52
Short_t
short Short_t
Definition: RtypesCore.h:39
unsigned int
TDialogCanvas::BuildStandardButtons
virtual void BuildStandardButtons()
Create APPLY, gStyle and CLOSE buttons.
Definition: TDialogCanvas.cxx:99
Double_t
double Double_t
Definition: RtypesCore.h:59
TCanvas
Definition: TCanvas.h:23
TDialogCanvas::operator=
TDialogCanvas & operator=(const TDialogCanvas &)
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TDialogCanvas::TDialogCanvas
TDialogCanvas()
DialogCanvas default constructor.
Definition: TDialogCanvas.cxx:34
TDialogCanvas
Definition: TDialogCanvas.h:19
TDialogCanvas::GetRefObject
TObject * GetRefObject() const
Definition: TDialogCanvas.h:43
int