Logo ROOT   6.08/07
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 #ifndef ROOT_TCanvas
17 #include "TCanvas.h"
18 #endif
19 #ifndef ROOT_TAttText
20 #include "TAttText.h"
21 #endif
22 
23 class TDialogCanvas : public TCanvas, public TAttText {
24 
25 private:
28 
29 protected:
30  TObject *fRefObject; ///< Pointer to object to set attributes
31  TPad *fRefPad; ///< Pad containing object
32 
33 public:
34  TDialogCanvas();
35  TDialogCanvas(const char *name, const char *title, Int_t ww, Int_t wh);
36  TDialogCanvas(const char *name, const char *title, Int_t wtopx, Int_t wtopy, UInt_t ww, UInt_t wh);
37  virtual ~TDialogCanvas();
38  virtual void Apply(const char *action="");
39  virtual void BuildStandardButtons();
40  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);
41  TObject *GetRefObject() const { return fRefObject; }
42  TPad *GetRefPad() const { return fRefPad; }
43  virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
44  virtual void RecursiveRemove(TObject *obj);
45  virtual void SetBorderMode(Short_t bordermode){ fBorderMode = bordermode; }
46  virtual void SetGrid(Int_t valuex = 1, Int_t valuey = 1);
47  virtual void SetLogx(Int_t value = 1);
48  virtual void SetLogy(Int_t value = 1);
49  virtual void SetName(const char *name) { fName = name; }
50  virtual void SetRefObject(TObject*obj) { fRefObject=obj; }
51  virtual void SetRefPad(TPad *pad) { fRefPad=pad; }
52  virtual void x3d(Option_t *option="");
53 
54  ClassDef(TDialogCanvas,0) //A specialized canvas to set attributes.
55 };
56 
59 inline void TDialogCanvas::SetLogx(Int_t) { }
60 inline void TDialogCanvas::SetLogy(Int_t) { }
61 inline void TDialogCanvas::x3d(Option_t *) { }
62 
63 #endif
64 
const int nx
Definition: kalman.C:16
TObject * GetRefObject() const
Definition: TDialogCanvas.h:41
float Float_t
Definition: RtypesCore.h:53
virtual void SetName(const char *name)
Definition: TDialogCanvas.h:49
const char Option_t
Definition: RtypesCore.h:62
virtual void BuildStandardButtons()
Create APPLY, gStyle and CLOSE buttons.
int Int_t
Definition: RtypesCore.h:41
TDialogCanvas & operator=(const TDialogCanvas &)
virtual void SetRefObject(TObject *obj)
Definition: TDialogCanvas.h:50
static const double x2[5]
#define ClassDef(name, id)
Definition: Rtypes.h:254
const int ny
Definition: kalman.C:17
virtual void x3d(Option_t *option="")
Deprecated: use TPad::GetViewer3D() instead.
Definition: TDialogCanvas.h:61
virtual void SetLogy(Int_t value=1)
Set Lin/Log scale for Y.
Definition: TDialogCanvas.h:60
virtual void SetBorderMode(Short_t bordermode)
Definition: TDialogCanvas.h:45
virtual ~TDialogCanvas()
DialogCanvas default destructor.
virtual void Apply(const char *action="")
Called when the APPLY button is executed.
Text Attributes class.
Definition: TAttText.h:24
unsigned int UInt_t
Definition: RtypesCore.h:42
The most important graphics class in the ROOT system.
Definition: TPad.h:37
short Short_t
Definition: RtypesCore.h:35
TPad * GetRefPad() const
Definition: TDialogCanvas.h:42
The Canvas class.
Definition: TCanvas.h:41
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from a pad and its sub-pads.
TPad * fRefPad
Pad containing object.
Definition: TDialogCanvas.h:31
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
virtual void SetRefPad(TPad *pad)
Definition: TDialogCanvas.h:51
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
Definition: TDialogCanvas.h:58
TObject * fRefObject
Pointer to object to set attributes.
Definition: TDialogCanvas.h:30
A canvas specialized to set attributes.
Definition: TDialogCanvas.h:23
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void SetLogx(Int_t value=1)
Set Lin/Log scale for X.
Definition: TDialogCanvas.h:59
TString fName
Pad name.
Definition: TPad.h:116
virtual void Range(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Set world coordinate system for the pad.
TDialogCanvas()
DialogCanvas default constructor.
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:57
char name[80]
Definition: TGX11.cxx:109
Short_t fBorderMode
Bordermode (-1=down, 0 = no border, 1=up)
Definition: TPad.h:105